Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi select quick match #1005

Merged
merged 18 commits into from
Sep 24, 2022
Merged

Conversation

Undergrid
Copy link
Contributor

Adds a feature to allow the user to batch Quick Match the selected audiobooks.

A button is added to the Appbar when one or more audiobooks are selected using the multi-select option (left most button on the below image).

button

Once clicked, a dialog is shown allowing the user to select the metadata provider and to select whether exiting covers or metadata should be overwritten.

dialog

When "Continue" is selected, a quick match is run against each selected audiobook, updating metadata and covers as required.

@advplyr
Copy link
Owner

advplyr commented Sep 23, 2022

Awesome. I think we should initialize the provider to whatever the default provider is for the library.

There are some getters in libraries.js to get a library provider or get the current library.

Also, we can show the user how many items were updated and how many items were unable to find a match.
Currently the quickMatchLibraryItem function is returning a warning if it doesn't find a match. https://github.com/advplyr/audiobookshelf/blob/master/server/scanner/Scanner.js#L695

@Undergrid
Copy link
Contributor Author

How would you like to show the updated and unmatched count? Would in the toast be okay?

@advplyr
Copy link
Owner

advplyr commented Sep 23, 2022

Yeah that works, the toast message can have line breaks \n.

Eventually we will probably have to change this so that the API request doesn't need to wait for the matches to finish and instead gets the result from a socket event. The reason for that is because some people have very slow systems and the API request will timeout before it finishes.

@Undergrid
Copy link
Contributor Author

If you can point me at an example of doing that, I can probably get it working that way. Might as well do it properly from the start.

@skyzuma
Copy link

skyzuma commented Sep 23, 2022

is possible to select details if the switch goes to on, like (update only) language, genre, ... (for selected) ?

li > switch > details
ul > swicth > language
ul > switch > genre

@advplyr
Copy link
Owner

advplyr commented Sep 23, 2022

If you can point me at an example of doing that, I can probably get it working that way. Might as well do it properly from the start.

I don't have a good example to point to yet for this. We would need to set some temporary id locally for the quick match request and setup a socket event listener (something like batch_quickmatch_complete). Once finished the backend emits that event including the temporary id so know it is this clients request that was completed.
Most of the socket event listeners are set in the default.vue layout.
If you want to go for this that would be great but up to you.

@advplyr
Copy link
Owner

advplyr commented Sep 23, 2022

is possible to select details if the switch goes to on, like (update only) language, genre, ... (for selected) ?

li > switch > details ul > swicth > language ul > switch > genre

We don't have support for this in the backend and would be a lot of re-working that is out of the scope of this PR

…the batch quick match is first opened or if the user has switched libraries.
@Undergrid
Copy link
Contributor Author

So I'm going to look at the websocket part, but in the mean time I've set the provider and added the counts to the toast. The toast looks a little different depending on the counts:

match
nomatch
matchunmatch
nomatchunmatch

@Undergrid
Copy link
Contributor Author

@advplyr PR has now been updated as request, including with the websocket feedback etc.

client/components/modals/BatchQuickMatchModel.vue Outdated Show resolved Hide resolved
client/components/modals/BatchQuickMatchModel.vue Outdated Show resolved Hide resolved
client/components/modals/BatchQuickMatchModel.vue Outdated Show resolved Hide resolved
client/components/modals/BatchQuickMatchModel.vue Outdated Show resolved Hide resolved
server/controllers/LibraryItemController.js Outdated Show resolved Hide resolved
server/controllers/LibraryItemController.js Outdated Show resolved Hide resolved
client/components/modals/BatchQuickMatchModel.vue Outdated Show resolved Hide resolved
client/components/modals/BatchQuickMatchModel.vue Outdated Show resolved Hide resolved
client/components/modals/BatchQuickMatchModel.vue Outdated Show resolved Hide resolved
Undergrid and others added 9 commits September 24, 2022 23:37
Co-authored-by: advplyr <67830747+advplyr@users.noreply.github.com>
Co-authored-by: advplyr <67830747+advplyr@users.noreply.github.com>
Co-authored-by: advplyr <67830747+advplyr@users.noreply.github.com>
Co-authored-by: advplyr <67830747+advplyr@users.noreply.github.com>
Co-authored-by: advplyr <67830747+advplyr@users.noreply.github.com>
Co-authored-by: advplyr <67830747+advplyr@users.noreply.github.com>
Co-authored-by: advplyr <67830747+advplyr@users.noreply.github.com>
Co-authored-by: advplyr <67830747+advplyr@users.noreply.github.com>
Co-authored-by: advplyr <67830747+advplyr@users.noreply.github.com>
@advplyr
Copy link
Owner

advplyr commented Sep 24, 2022

Works beautifully, thanks!

@advplyr advplyr merged commit a35b35c into advplyr:master Sep 24, 2022
@Undergrid Undergrid deleted the multi_select_quick_match branch October 10, 2022 21:31
Oasis256 pushed a commit to Oasis256/StoryTeller that referenced this pull request Jun 3, 2024
Add togglePlayPauseCommand route to iOS
Oasis256 pushed a commit to Oasis256/StoryTeller that referenced this pull request Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants