jacquesh / foo_openlyrics

An open-source lyric display panel for foobar2000
MIT License
450 stars 26 forks source link

When lyrics are saved, track number is set to 0 #62

Closed SpamReceiver closed 3 years ago

SpamReceiver commented 3 years ago

Strange observation: When a track is played without a track number (%track% doesn't exist), and lyrics a re searched and found, the track number will be set to 0 in the moment the lyrics are saved.

Steps to reproduce:

  1. Configure OpenLyrics for auto-save to tag
  2. Play a track where
    • %track% (track number) doesn't exist
    • but lyrics exist on one of the sources

Expected:

  1. OpenLyrics searches for lyrics and finds some
  2. OpenLyrics saves lyrics to tag
  3. No other tags are touched

Observed:

  1. OpenLyrics searches for lyrics and finds some
  2. OpenLyrics saves lyrics to tag
  3. %track% (track number) is updated and set to 0 (zero)
jacquesh commented 3 years ago

Odd. Do you know if this happens in LSP3 (for example)?

SpamReceiver commented 3 years ago

What is LSP3?

jacquesh commented 3 years ago

Lyric Show Panel 3, the thing people used to use for lyrics (which is no longer maintained and largely not working). It's the thing openlyrics was created to replace :)

SpamReceiver commented 3 years ago

I uninstalled LSP3 after I saw OpenLyrics working well. I can't answer the question if the issue appears with LSP3.

Have you been able to reproduce the issue?

SpamReceiver commented 3 years ago

I re-installed LSP3, played a track without track number and without lyrics. Lyrics were found and saved, but track number was also updated to 0 (zero).

SpamReceiver commented 3 years ago

For completeness: If no lyrics are found, the track number will not be modified and stays empty.

jacquesh commented 3 years ago

Oh awesome, thanks for checking that. I haven't checked the tag-saving code in openlyrics recently but I do remember there being concerns about overwriting tags that are not the ones you're specifically changing. It is entirely possible that I've done this incorrectly (the docs are rather sparse on this).

LSP3 doing the same makes me feel just a little bit better but of course its always possible that we're both wrong >_<

Although I'm trying to reproduce it now and it appears to be functioning as you expected. Delete lyrics and track number for track, set saving to tag, search for lyrics, lyrics found and saved to tag, track number still 0. =/

Where are you seeing the track number update to zero. Is it possible that whatever you're using to view them is misrepresenting the available information and just showing 0 if there isn't a track number set? I don't actually know the details of how ID3 tags are stored in the file but at least in one of the tools I use to fiddle with them kid3, I actually can't "delete" the track number tag, it just clears the value and still shows in the list of tags (unlike other, less standard tags like album artist or lyrics). Similarly if I open the foobar dialog for the track properties (right-click -> properties in the playlist view) it does still have the row for "Track Title", there's just nothing there (its just blank, not a zero).

jacquesh commented 3 years ago

Oh, also just to be sure: what version of OpenLyrics are you using? 0.9?

SpamReceiver commented 3 years ago

Hello Jaques! I currently use Open Lyrics 0.9.

Referring to your question of "whatever you're using to view them": I used the playlist view and the properties window of foobar2000 to check the values before and after the lyrics update.

Because of your question, I used a different tool today (MP3Tag https://www.mp3tag.de/). Well, what should I say: The 0 track numbers were already there! Before the lyrics update!

It's just that foobar2000 doen't re-read the tags on startup and hence just didn't notice the change. After saving the lyrics, all tags seem to be re-read from the file and -- oops -- the 0 track numbers show up.

The question of where the 0 track numbers came from, is a different story, but nothing for this discussion.

I have to beg your pardon for the noise here! Please apologize and close the issue.

jacquesh commented 3 years ago

Haha no problem. I'm glad you managed to resolve the issue! :)