dyphire / mpv-scripts

userscripts for mpv
MIT License
53 stars 5 forks source link

[track-list.lua] Bug Report + Feature Request + Question #23

Closed KonoVitoDa closed 7 months ago

KonoVitoDa commented 7 months ago

Screenshots for reference: Screenshot (103) image

dyphire commented 7 months ago

If subtitle's filename contains video's filename, this part is trimmed and ignored in the track list; and in the same way if the sub and video filenames are identical, no track name is shown at all. Is this a bug or is it on purpose? If it's the second, what can I do to always show the full track name? How to avoid showing these generic track names (Sub 11) for tracks with no name? Thus bringing back the old script behavior.

You can achieve this by commenting out the following content in the script: https://github.com/dyphire/mpv-scripts/blob/6e8ba340c6d4c5451084a3d144b5c2a2565308c0/track-list.lua#L134-L137 https://github.com/dyphire/mpv-scripts/blob/6e8ba340c6d4c5451084a3d144b5c2a2565308c0/track-list.lua#L141-L144

A second keybinding press should hide the list, not reopen it. I'd like to press , for example, Ctrl+s to open the subs list and press it again to hide it. It would be much more intuitive than having to press ESC.

No, this is a limitation of the script's working mechanism, not a bug, and cannot be implemented.

KonoVitoDa commented 7 months ago

You can achieve this by commenting out the following content in the script:

Thanks, it worked. But the comma before the language code remains. I had the impression that it wasn't like that before, but checking the old versions it seems like it always was. Isn't there an easy way to conditionally add the comma only when the track has a name?

dyphire commented 7 months ago

You can achieve this by commenting out the following content in the script:

Thanks, it worked. But the comma before the language code remains. I had the impression that it wasn't like that before, but checking the old versions it seems like it always was. Isn't there an easy way to conditionally add the comma only when the track has a name?

This is because when you comment out the code above, the title may be empty, which will not appear in the original code. For this, you also need to modify the following code: https://github.com/dyphire/mpv-scripts/blob/1596f85ceea069159ed20e9173da614530348511/track-list.lua#L156-L157

dyphire commented 6 months ago

A second keybinding press should hide the list, not reopen it. I'd like to press , for example, Ctrl+s to open the subs list and press it again to hide it. It would be much more intuitive than having to press ESC.

Implement it in the latest commit

KonoVitoDa commented 6 months ago

mplement it in the latest commit

Thanks!