kbuffington / Georgia

Dynamic foobar2000 theme
284 stars 16 forks source link

First tracks repeats when double clicking album from library #104

Closed voc0der closed 3 years ago

voc0der commented 3 years ago

Thanks for all of your continued work on this project! 🥇

I've noticed that sometimes a track will repeat itself; and foobar is not set to repeat tracks ever. It's almost always the first track in the playlist; then it doesn't do it again as it plays the rest of the list.

It seems to happen if I go the library, search an artist, then double click the selection to add it to the playlist (e.g. an album).

lastfm: [] foobar: [] on_metadb_changed(): 1 handles, fromhook: true lastfm: [] foobar: [1621428269000] Library Initialized in: 0.007 seconds Library Initialized in: 0.187 seconds Library Initialized in: 0.112 seconds Library Initialized in: 0.144 seconds Library Initialized in: 0.167 seconds Opening track for playback: "N:\music\XYZ\ABC (2015)\XYZ - ABC - 01 - Hello.mp3" Fetching new art on_metadb_changed(): 0 handles, fromhook: undefined lastfm: [] foobar: [1610012862000, 1610025572000, 1611342688000, 1615054857000, 1617280797000, 1620825662000, 1620830624000, 1620932724000, 1620994126000] Playlist initialized in 2ms on_metadb_changed(): 1 handles, fromhook: true lastfm: [] foobar: [1610012862000, 1610025572000, 1611342688000, 1615054857000, 1617280797000, 1620825662000, 1620830624000, 1620932724000, 1620994126000, 1621428438000] Opening track for playback: "N:\music\XYZ\ABC (2015)\XYZ - ABC - 01 - Hello.mp3" Fetching new art on_metadb_changed(): 0 handles, fromhook: undefined

I'll try and debug later on and see if I can't figure out why it's happening; since I don't think the log file is explaining why, but you'd know better!

For reference I'm only 3-4 commits behind or so in my environment.

voc0der commented 3 years ago

100% reproduction rate with these steps: 1) Search for album in library 2) Double click the result without expanding it to add to playlist 3) Wait or skip to end of song using seekbar 4) Track 1 plays again

voc0der commented 3 years ago

Hmm, so I pulled :latest and it seems to have a different issue now. Kind of difficult to say if the original issue remains because of the (new) bug. I can't double click like in the steps above to add to playlist; it seems nothing happens.

Sometimes, when I double click, it seems to restart the current playlist instead. On a fresh f2k instance (or reloading when it crashes), it works as expected. But the bug (below) seems to happen after ~70 seconds of playback consistently but maybe it's m,ore lik. I've tracked it down to the music having started FROM the library. Starting music from the playlist seems to act differently.

Error: Spider Monkey Panel v1.4.1 (Georgia: Georgia v2.0.3-dev by Mordred) arr1 is undefined

File: Panel_Library.js Line: 1154, Column: 46 Stack trace: arraysEqual@Panel_Library.js:1154:46 treeState/<@Panel_Library.js:1282:42 treeState@Panel_Library.js:1279:50 on_metadb_changed@Panel_Library.js:4197:25 on_metadb_changed@georgia-main.js:1732:12

Edit : looks like "this.node" in treeState is an array with my currently FILTERED library items. Somehow "i" ends up being 26199, so asking for this.node[i] is going to be out of bounds. I wonder if 26199 is the arraysize of an unfiltered playlist for me.

kbuffington commented 3 years ago

I can't get it to crash, but I definitely broke something with library selection last night. Once you've selected something in the library you can't even single click something else.

Wasn't able to reproduce your original problem either.

I'll let you know once it's fixed.

kbuffington commented 3 years ago

@noblesigma I believe this is fixed now. Can you pull the latest and let me know? If it continues to crash you can also try right-clicking >> Properties and clear properties. Don't think that'll be necessary but you might have a weird saved state on your machine.

voc0der commented 3 years ago

As always, thanks! I just pulled the latest build and it's working now. So far I haven't seen any of the issues reported about above anymore, but I'll keep my eyes peeled! Great work!