cglatot / pasta

Audio & Subtitle Track Changer for Plex
https://www.pastatool.com
270 stars 7 forks source link

Incorrect episode sort order for "Entire series" selection #51

Closed SnoFox closed 2 months ago

SnoFox commented 2 years ago

Describe the bug When setting the audio/subtitles for an entire season, the modal displays the episodes changed out of order

To Reproduce Steps to reproduce the behavior:

  1. Select "Entire series" on something with multiple seasons
  2. Set audio/subs

Expected behavior Output would be in season/episode sort order for easily spotting episodes that didn't get changed

Screenshots vlcsnap-2022-03-02-19h57m24s462 vlcsnap-2022-03-02-19h57m32s906

Or a lot of screenshots at 30fps: https://user-images.githubusercontent.com/37625/156493810-336d7e15-f687-4a59-af23-e1a10c50091f.mp4

Desktop (please complete the following information):

cglatot commented 2 years ago

This isn't a bug, but a feature request. Since the processing is done entirely client side, I wrote it to work as quickly as possible. That means asynchronous processing of the updates, and I have no control over which ones will be completed first. When a track is completed, it's added to the list, and the progress bar is updated.

If I were to try to sort these in order I would need to either make it a synchronous process, or some sort of post-processing where I manipulate the UI and sort the list based on the S?E? nomenclature. Both of these will add additional time to the processing, which is something I want to avoid.

I will see if I can do something about this that doesn't add a lot of time, but it is going to be a very low priority - there are other areas I want to focus my time first.

SnoFox commented 2 years ago

What is the intended purpose behind the log output after the progress bar? I intended to use it to spot problems in execution. In its current form, it is difficult to use for this purpose as it acts as a simple log file of changes. For example, in my current library, Attack on Titan Season 4 has 28 episodes, but only 16 of them are dual audio. Selecting "Entire Series" and picking an English track currently just tells you "everything succeeded" and it is non-obvious that half the season did not do as intended.

A couple of alternatives:

  1. Only display non-matched and non-perfectly matched episodes
  2. Assign a color to each of the match confidences (full match, no match, name only, code only) and paint the span/some word that color

Both of these would help to see if, at a glance, something went wrong during execution without jeopardizing async calls or creating post-processing time.

cglatot commented 2 months ago

Fixed in #69