2017-01-27, 23:47
(2017-01-27, 21:52)spiderlane Wrote: Notice the %0A being added after the MBID which is the escaped linefeed character. What appears to be happening is that this call at line 534
Code:rawdata = readFile( filename )
is returning the contents of the file with a "\n" at the end.
So I made an edit to the default.py adding the following at line 536 to strip this away
Code:rawdata = rawdata.rstrip('\n')
...and bingo everything starts working as expected. So, I'm a happy man, but aware that might just be a hack. Is this something you've come across before? It would appear that readFile() always adds the "\n" at the end in python (I'm a Java programmer by background and don't have much python experience)
Those musicbrainz.nfo files weren't originally meant to be manually added, so I suspect this has never come up. My bet is it has something to do with the default line ending python uses versus what your specific platform does. Since python was writing the file and then reading it, it never mattered, but with you creating them manually it probably does. Anyway, your solution probably makes the most sense. I'll add that to the AS code (since there's no harm in stripping something that isn't there is most cases). It'll get pushed out whenever I do the next update (which might not be for awhile).