[PR #2333] [MERGED] Add ability to fetch book data on upload #3699

Closed
opened 2026-04-25 00:16:42 +02:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf/pull/2333
Author: @kieraneglin
Created: 11/20/2023
Status: Merged
Merged: 12/2/2023
Merged by: @advplyr

Base: masterHead: ke/feature/upload-auto-fetch-data


📝 Commits (8)

  • 3cc900f Adds fetching book data on upload
  • 8c43470 Added computed metadata check to UI dropdown
  • 2f6756e Merged parent
  • e5579b2 Improved UI; Added tooltips; Fixed unrelated layout issues
  • d9c9289 Added error handling; Made querystring helper
  • 88078ff Fix undefined series string when match has no series, minor ui updates
  • 9350c55 Removed unneeded mixin
  • 57a5005 Addressed feedback changes

📊 Changes

6 files changed (+168 additions, -72 deletions)

View changed files

📝 client/components/cards/ItemUploadCard.vue (+70 -19)
📝 client/pages/upload/index.vue (+67 -15)
📝 client/plugins/init.client.js (+1 -0)
📝 client/strings/en-us.json (+8 -1)
📝 server/controllers/MiscController.js (+21 -37)
📝 server/utils/fileUtils.js (+1 -0)

📄 Description

IMPORTANT NOTE

This PR is work-in-progress, mainly when it comes to the finishing touches in the UI. I will likely eventually need some UI direction, but for now the focus is on the general concept's viability.

Issue:

When importing media via the upload page, it can be tedious to import lots of media if you also want to ensure the author/series name is correct. This has the most impact to the structure of files stored on-disk - keeping this data correct will namespace media under the desired author/series directories. Keeps things clean!

A secondary issue comes from the details of media not actually being what you expect or may casually call it. For example, people (me) may call this series The Kingkiller Chronicles, according to Audible it's just Kingkiller Chronicle. Again, this mostly impacts keeping the directory structure of things well-formed and consistent.

Fix Description

I've added some UI to allow for automatic fetching of media data based on what data you have entered in so far (title is required). This fires on-selection of media as long as the title gets auto-populated! If it returns the wrong information, you can always edit it to your preference OR give it a little hint by updating, say, the author and fire a re-fetch manually.

As mentioned, this also provides a way to manually fetch details for a single piece of media. This is helpful for re-fetching media if-needed, but it's also good for when the uploaded filename is VERY different than the actual title of the media.

NOTE: this only works on audiobooks.

Additional Fixes:

  • Fixed directory input being smaller and misaligned compared to the series input on upload page
  • Added .trim modifier to upload form inputs to chop leading/trailing whitespace
  • Updated error string in the ItemUploadCard's getData method to use an I18n string rather than hardcoding

Regressions:

None known.

GitHub Issues Resolved:

None known.

Screen Captures

https://github.com/advplyr/audiobookshelf/assets/569917/68e9f6c4-8741-4cbd-88b4-930fc13d117a


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/advplyr/audiobookshelf/pull/2333 **Author:** [@kieraneglin](https://github.com/kieraneglin) **Created:** 11/20/2023 **Status:** ✅ Merged **Merged:** 12/2/2023 **Merged by:** [@advplyr](https://github.com/advplyr) **Base:** `master` ← **Head:** `ke/feature/upload-auto-fetch-data` --- ### 📝 Commits (8) - [`3cc900f`](https://github.com/advplyr/audiobookshelf/commit/3cc900ffbfc3c3c6d2f08e64a717e73c62c2d82b) Adds fetching book data on upload - [`8c43470`](https://github.com/advplyr/audiobookshelf/commit/8c434703fb5b24afde800cd00de62bb235f9090b) Added computed metadata check to UI dropdown - [`2f6756e`](https://github.com/advplyr/audiobookshelf/commit/2f6756eddf03f758bea0f5dc7a154ba57ab1e69d) Merged parent - [`e5579b2`](https://github.com/advplyr/audiobookshelf/commit/e5579b2c3346c816856e7a9f47740661c6c66699) Improved UI; Added tooltips; Fixed unrelated layout issues - [`d9c9289`](https://github.com/advplyr/audiobookshelf/commit/d9c9289d655f6050e1db97c62a62944eaf5591e9) Added error handling; Made querystring helper - [`88078ff`](https://github.com/advplyr/audiobookshelf/commit/88078ff813ac1763eb1fa7b94d42e381e1cb67a6) Fix undefined series string when match has no series, minor ui updates - [`9350c55`](https://github.com/advplyr/audiobookshelf/commit/9350c5513ebeee88d686f77530f548b6ee92efb4) Removed unneeded mixin - [`57a5005`](https://github.com/advplyr/audiobookshelf/commit/57a5005197e3864025c0638470766ab93d81c833) Addressed feedback changes ### 📊 Changes **6 files changed** (+168 additions, -72 deletions) <details> <summary>View changed files</summary> 📝 `client/components/cards/ItemUploadCard.vue` (+70 -19) 📝 `client/pages/upload/index.vue` (+67 -15) 📝 `client/plugins/init.client.js` (+1 -0) 📝 `client/strings/en-us.json` (+8 -1) 📝 `server/controllers/MiscController.js` (+21 -37) 📝 `server/utils/fileUtils.js` (+1 -0) </details> ### 📄 Description **IMPORTANT NOTE** This PR is work-in-progress, mainly when it comes to the finishing touches in the UI. I will likely eventually need some UI direction, but for now the focus is on the general concept's viability. **Issue:** When importing media via the upload page, it can be tedious to import lots of media if you also want to ensure the author/series name is correct. This has the most impact to the structure of files stored on-disk - keeping this data correct will namespace media under the desired author/series directories. Keeps things clean! A secondary issue comes from the details of media not _actually_ being what you expect or may casually call it. For example, people (me) may call [this series](https://en.wikipedia.org/wiki/The_Kingkiller_Chronicle) `The Kingkiller Chronicles`, according to Audible it's just `Kingkiller Chronicle`. Again, this mostly impacts keeping the directory structure of things well-formed and consistent. **Fix Description** I've added some UI to allow for automatic fetching of media data based on what data you have entered in so far (title is required). This fires on-selection of media as long as the title gets auto-populated! If it returns the wrong information, you can always edit it to your preference OR give it a little hint by updating, say, the author and fire a re-fetch manually. As mentioned, this also provides a way to manually fetch details for a single piece of media. This is helpful for re-fetching media if-needed, but it's also good for when the uploaded filename is VERY different than the actual title of the media. NOTE: this only works on audiobooks. **Additional Fixes:** - Fixed `directory` input being smaller and misaligned compared to the `series` input on upload page - Added `.trim` modifier to upload form inputs to chop leading/trailing whitespace - Updated error string in the `ItemUploadCard`'s `getData` method to use an I18n string rather than hardcoding **Regressions:** None known. **GitHub Issues Resolved:** None known. **Screen Captures** https://github.com/advplyr/audiobookshelf/assets/569917/68e9f6c4-8741-4cbd-88b4-930fc13d117a --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2026-04-25 00:16:42 +02:00
adam closed this issue 2026-04-25 00:16:42 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#3699