Bug 4686 - SlimServer mangles Vorbis tags containing the equals (=) character
: SlimServer mangles Vorbis tags containing the equals (=) character
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Tagging
: 6.5.1
: All All
: P2 normal (vote)
: ---
Assigned To: Chris Owens
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-01-19 13:07 UTC by Keith Briscoe
Modified: 2008-12-18 11:12 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Keith Briscoe 2007-01-19 13:07:43 UTC
It's not very common, but some tags may contain the equals sign.  For example, Dr. John has a song called "Me - You = Loneliness"

SlimServer scans this track and puts the song name "Me - You" into the database.  Everything past the equals sign, including the equals sign, is truncated.

If it's relevant, I'm using SlimServer 6.5.1 on Linux and the music is in Ogg Vorbis format.
Comment 1 Keith Briscoe 2007-01-29 13:06:50 UTC
The problem is that we use Perl's split function expecting a returned list of only two strings.

From PurePerl.pm::_loadComments:

my ($key, $value) = split(/=/, substr($buffer, 0, $comment_length, ''));

This should actually be something like...

my @commentlist= split(/=/, substr($buffer, 0, $comment_length, ''));
my $key=$commentlist[0];
@commentlist=splice(@commentlist,1);
my $value=join('=',@commentlist);

I'm not sure this is the best way to do it (or even if it's error-free), but I'd made the code change on my machine and it seems to work!  The split/splice/join may be more expensive than a simple index/substr solution, but I'll leave it to you to decide if it's good enough.  The file I modified was under /lib/Ogg/Vorbis/Header but this problem could also exist in other file formats.
Comment 2 Keith Briscoe 2007-04-20 10:15:40 UTC
A look through the modules for other formats indicates this bug is Vorbis-only.  Modified title accordingly.

The existing patch seems to fix the problem without any side-effects as far as I can tell.
Comment 3 Keith Briscoe 2007-07-18 10:02:17 UTC
Bug still exists in 6.5.3, patch still applies and seems to fix the issue.
Comment 4 KDF 2007-07-18 21:00:41 UTC
chris, what are your thoughts here?  6.5 or 7?
Comment 5 Chris Owens 2007-07-19 08:24:46 UTC
Well, it sounds like we have a patch already.  Why not put it in 6.5?
Comment 6 KDF 2007-07-19 19:32:59 UTC
committed slightly altered patch to trunk at change 12404
and to 6.5.4 at change 12405.

available in nightly builds from July 20 onward, please reopen if there are any issues.