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

Local lyrics are not displayed when switching panel visibility #452

Open
regorxxx opened this issue Feb 21, 2025 · 4 comments
Open

Local lyrics are not displayed when switching panel visibility #452

regorxxx opened this issue Feb 21, 2025 · 4 comments
Labels
bug Something isn't working

Comments

@regorxxx
Copy link

regorxxx commented Feb 21, 2025

Foobar v1.6.18 and openlyrics 1.12

Not sure if this is a bug or just an omission in your design logic.

The default behavior is that no search is performed when the panel is not visible. That's ok for online sources.

But it seems it also applies to lyrics from files and tags. Therefore, if you have the panel on a hidden tab, if you start playback and then open the tab, it shows no lyrics (since no search was performed), even if there is zero need to search anything since the lyrics are already present at the file.

I see there are multiple possibilities:

  1. The panel could automatically perform a search after switching visibility if it was hidden first (and thus no lyrics shown yet). I may agree there is no need to search lyrics if nothing is shown, but then we may also see the expectation is to see something when the panel is shown (so a search at that point makes sense).
  2. Or local lyrics should always be searched even if the panel is hidden, so they would be displayed in these cases even if no online search was performed (following the preferences setting for hidden panels). This is a good minimum, since at least local lyrics should be available.

I would say in any case the current behavior is not desirable or expected, since -as user- I would expect "search" to refer to online searching. And local lyrics should always display in any case when I open the panel.

Neither 1 nor 2 do anything which contradicts the available hidden panel setting behavior.

See the gif for the "problem".

Image

Note even if the file has lyrics tags, when I double click to restart playback on the same track, it doesn't force a lyric search. Only when I switch to another track and then to the same track, it looks for the local tags. (or if I stop playback)

I have tested it with the "search with hidden panel" setting enabled, and obviously it works fine in such case.

@jacquesh
Copy link
Owner

Ah, can you check/upload debug logs of this happening? I suspect it is searching, it's just not picking it up when the panel becomes visible.

I also expect this is not at new in v1.12

@jacquesh jacquesh added the bug Something isn't working label Feb 21, 2025
@regorxxx
Copy link
Author

Nope, this has been present on previous releases. I was not understanding many times why I had no lyrics even if they were on files, and just now I was able to reproduce and understand the behavior.

Playback with panel on not visible tab

Opening track for playback: "H:\Musica_Web\Samurai\Artilleria {2023 Tidal 299053306}\05 - Mechero.flac"
Using decoder shim instead of DSP: Skip Track
Skip Track found partial skip info from tags
INFO-OpenLyrics: Skipping new-playback search. The track has changed, we're not waiting for dynamic track info, there are no visible openlyrics panels
INFO-OpenLyrics: New album art data retrieved
INFO-OpenLyrics: LyricPanel::compute_background_image took 59940us
INFO-OpenLyrics: LyricPanel::on_album_art_retrieved took 68200us
Biography Server: wikipedia: Samuraï: not found
Seekbar: Analysis file path -> .\js_data\seekbar\samurai\artilleria {2023 tidal 299053306}\05 - mechero.aw.lz16
HDD wakeup - touching file: H:{A53AE67A-5343-4E7C-9C19-63BC430EA8C7}
HDD wakeup - touched file: H:{A53AE67A-5343-4E7C-9C19-63BC430EA8C7}
Biography Server: wikipedia: Artillería: not found

Switching to lyrics tab

INFO-OpenLyrics: LyricPanel::compute_background_image took 37956us

Stop and playing track again with visible tab

Opening track for playback: "H:\Musica_Web\Samurai\Artilleria {2023 Tidal 299053306}\05 - Mechero.flac"
Using decoder shim instead of DSP: Skip Track
Skip Track found partial skip info from tags
INFO-OpenLyrics: No search avoidance info available for track
INFO-OpenLyrics: Searching for lyrics for artist='Samuraï', album='Artillería', title='Mechero'...
INFO-OpenLyrics: Save file name format '[%Track% - ][$ascii($replace(%title%,,,/,))]' with directory class 'Custom('H:_lyrics$directory(%path%,2)$directory(%path%,1)\lyrics')' evaluated to 'H:_lyrics\Samurai\Artilleria {2023 Tidal 299053306}\lyrics\05 - Mechero'
INFO-OpenLyrics: Querying for lyrics in H:_lyrics\Samurai\Artilleria {2023 Tidal 299053306}\lyrics\05 - Mechero.lrc...
INFO-OpenLyrics: Querying for lyrics in H:_lyrics\Samurai\Artilleria {2023 Tidal 299053306}\lyrics\05 - Mechero.txt...
INFO-OpenLyrics: Found 0 lyrics in local files: H:_lyrics\Samurai\Artilleria {2023 Tidal 299053306}\lyrics\05 - Mechero
INFO-OpenLyrics: Failed to retrieve lyrics from source: Local files
INFO-OpenLyrics: Searching for lyrics in tag: 'LYRICS'
INFO-OpenLyrics: Found lyrics in tag: 'LYRICS'
INFO-OpenLyrics: Parsing LRC lyric text...
INFO-OpenLyrics: Searching for lyrics in tag: 'SYNCEDLYRICS'
INFO-OpenLyrics: Searching for lyrics in tag: 'UNSYNCED LYRICS'
INFO-OpenLyrics: Searching for lyrics in tag: 'UNSYNCEDLYRICS'
INFO-OpenLyrics: Successfully retrieved lyrics from source: Metadata tags
INFO-OpenLyrics: Parsing lyrics text...
INFO-OpenLyrics: Loaded lyrics already form a valid UTF-8 sequence
INFO-OpenLyrics: Parsing LRC lyric text...
INFO-OpenLyrics: Lyric loading complete
INFO-OpenLyrics: New album art data retrieved
INFO-OpenLyrics: LyricPanel::compute_background_image took 46298us
INFO-OpenLyrics: LyricPanel::on_album_art_retrieved took 53460us
INFO-OpenLyrics: Skipping lyric save. Type: 1, Local: yes, Timestamped: yes, Autosave: 1

I would say it only searches if initially visible, not at switching.

@jacquesh
Copy link
Owner

I would say it only searches if initially visible, not at switching.

Yeah searches aren't currently triggered when a panel becomes visible. We could consider adding it but that might be a bit more complicated than it used to be now that searches have been taken out of the panel code to support searching when no panels are visible.

That said, I agree there isn't much reason not to at least search the local sources and off the top of my head I would have said that's what we were doing but...clearly not. Woops.

Historically I've not worried too much about there not being lyrics when a panel is created because you're not usually changing your layout, but tabs are a different story so that's a fair callout.

@regorxxx
Copy link
Author

Historically I've not worried too much about there not being lyrics when a panel is created because you're not usually changing your layout, but tabs are a different story so that's a fair callout.

I agree with this.

Note CUI also allows to witch panel visibility by L. Clicking at the left area, so layouts where horizontal elements may be hidden (thus actually changing the layout) are also possible -without tabs-. And I would say that's particularly useful for lyrics or biography panels, since you may only want to see them on playback but hidden while managing the library or tagging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants