TVLukeProductions / TrashPlay

Other
3 stars 0 forks source link

sometimes titles are cut off when scrobbling to last.fm #12

Closed phibo23 closed 9 years ago

phibo23 commented 9 years ago

seems to have something to do with parentheses http://www.lastfm.de/music/K.I.Z./_/Jimi+Blue+%28live%29+%28feat.+Jimi+B http://www.lastfm.de/music/Toto+Cutugno/_/L%27Italiano+%28Lasciatemi+Cantare http://www.lastfm.de/music/Ten+Masked+Men/_/You+Spin+Me+Round+%28Like+A+Reco http://www.lastfm.de/music/DJ+Jazzy+Jeff+&+The+Fresh+Prince/_/The+Fresh+Prince+Of+Bel+Air+%28T

TVLuke commented 9 years ago

Hm "Like a Reco..." I don't see a parentethis right there... I think ist just that long titles are more likely to include one. This isn't an unknown issue and I have tried to fix it (apparently that did not work).

afaik the issue is this. Old ID3 had a very short maximum length. Many song titles are longer than that. The ID3 Library I use sux. As you may notice, each of these titles is exactly 31 characters before it cuts off.

To fix this the app now preferes creating artist and title from the filename to using the id3 and only uses id3 if the songname is longer than it was using the filename. However, this has brought on a whole new set of issues (like some files using a symbol that looks like "-" to sepperate song and artist but isn't actually "-".

I will explore what other pure java ID3 libraries are out there but if i remember correctly from... a year ago (?)... not that many.

TVLuke commented 9 years ago

OK, I just realized that, while the titles displayed in the app now use filename preferentially the scrobbled data still uses the ID3 Library as a preferred way to get the data (yes, I know.... ). OK 1.0.11 fixes that but as I said, this does not end all issues with titles...

phibo23 commented 9 years ago

Ha, another one of those 5 bit problems... In case you ever have to face this challenge: Internet Explorer before version 10 could only process a maximum of 31 css files per page. We have a page where we have 32 and that last one contains all the colours... :D

TVLuke commented 9 years ago

Isn't this more of a 4 byte problem...?

phibo23 commented 9 years ago

enumerating stuff with 5 bits -> max number = 31

TVLuke commented 9 years ago

Giving song titles 4 bytes storage because what could possible go wrong....

actually, aparentl just 30. Not sure how they got the last character in that library. http://de.wikipedia.org/wiki/ID3-Tag#ID3v1

PS: OK, I'm tired. 4 bytes are 32 bits but here we clearly have 30 bytes, which is a different animal all together. Another very stupid animal.

phibo23 commented 9 years ago

hm... anyway probably an issue with said ID3 library because actual tags in the files are obviously longer that the library is able to read. this looks promising: https://github.com/mpatric/mp3agic

TVLuke commented 9 years ago

looks good. Let's see how early I get out of work tomorrow... #ReplacingLibrariesIsAlwaysFun

TVLuke commented 9 years ago

hm... the quick fix for 1.0.11 seems to kinda work http://www.lastfm.de/music/Dave+Darell/_/Transrapid+Surfer+(Peppschmier+meets+Ede+Mix)

TVLuke commented 9 years ago

Should be "fixed" with the new library for 1.0.11 now, but wrong tracks and artists would stay in the database. It "repairs" files when it plays them so after a while all should be fine.