Bug 3044 - Lyrics do not display with line spacing correctly.
: Lyrics do not display with line spacing correctly.
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Player UI
: 6.2.2
: PC Windows XP
: P3 minor (vote)
: ---
Assigned To: KDF
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-02-21 23:07 UTC by Rick Berguist
Modified: 2008-12-18 11:11 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 Rick Berguist 2006-02-21 23:07:46 UTC
I have lyrics entered via Musicmatch and iTunes.  Both show the lyrics with correct line breaks.  The Song Info display does not contain any line breaks -- text is just strung together.  [I think song lyrics were added in Bug# 1793]

Same behaviour in SlimServer Version: 6.2.1 - 5194 - Windows XP - EN - cp1252  and  6.5b1 - (SlimServer_v2006-02-21.exe)
Same behavior in Default and Fishbone UI.


Also, it sure would be nice if when the Now Playing song isupdated, that it updates the Song Info window if it is being displayed.  With this, what is playing would be a glance away.
Comment 1 KDF 2006-02-22 10:08:32 UTC
for 6.5, HTML/EN/Songinfo.html, quick fix.

change:
<div class="songInfoText">[% itemobj.lyrics | html %]</div>

to:
<div class="songInfoText"><pre>[% itemobj.lyrics | html %]</pre></div>


similarly for 6.2.1, wrap the [% itemobj.lyrics | html %] in <pre></pre>

not sure if there is any better way, really.  Might be useful to do this same thing for the comments block.
Comment 2 Rick Berguist 2006-02-22 12:14:03 UTC
(In reply to comment #1)
> for 6.5, HTML/EN/Songinfo.html, quick fix.
> 
> change:
> <div class="songInfoText">[% itemobj.lyrics | html %]</div>
> 
> to:
> <div class="songInfoText"><pre>[% itemobj.lyrics | html %]</pre></div>
> 
> 
> similarly for 6.2.1, wrap the [% itemobj.lyrics | html %] in <pre></pre>
> 
> not sure if there is any better way, really.  Might be useful to do this same
> thing for the comments block.
> 

checked out in 6.2.1 -- had to change HTML for each selected directory - (e.g Default, Fishbone).

Linespacing is now correct, however font reverts to Courier and doesn't match font on rest of page. 
Comment 3 KDF 2006-02-22 12:24:22 UTC
that's the cost of using <pre>
Comment 4 KDF 2006-02-22 12:55:59 UTC
more complex fix:

add a filter to Slim/Web/HTTP.pm (this means you can't test if you are using windows exe)

in sub newSkinTemplate, add:
'pre'        => \&preFormatted,
to FILTERS

and:
sub preFormatted {
	my $string = shift;
	$string =~ s/[\r\n]/<br>/g;
	return $string;
}

This munges the lyrics to use an html line break instead of the linefeed/carriage return of standard text.  

the line in songinfo then becomes:
[% itemobj.lyrics | html | pre %]

Probably need something that handles unicode characters in lyrics as well.  The stuff I pasted into a test file didn't work so well, but I can't guarantee that it was psted with proper locale.
Comment 5 Dan Sully 2006-06-14 16:37:16 UTC
Fixed in change 7986
Comment 6 Rick Berguist 2006-10-01 11:26:50 UTC
I just installed 6.5 and the line spacing is still incorrect.  Both Default and Fishbone Interface.  Version installed:

VERSION INFO
SlimServer Version: 6.5.0 - 9916 - Windows XP - EN - cp1252
Server IP address: 172.16.10.32
Perl Version: 5.8.7 MSWin32-x86-multi-thread
MySQL Version: 5.0.22-community-nt 
Comment 7 KDF 2006-10-01 14:36:27 UTC
make sure it's not a caching issue by refreshing the page a few times.  Try an uninstall and reinstall, making sure none of the old html stuff is left around from c:\program files\slimserver\server\HTML
Comment 8 KDF 2006-10-02 10:50:09 UTC
looks like this fix was accidentally reverted at change 8014.  as I broke it, I'll fix it.
Comment 9 KDF 2006-10-02 18:24:41 UTC
fix committed to trunk at change 10136 and 6.5.1 builds at change 10137
please update and let us know if you find any issues with it.
Comment 10 Rick Berguist 2006-10-15 10:45:41 UTC
Not functioning for me.  Have uninstalled SlimServer and reinstalled.
VERSION INFO
SlimServer Version: 6.5.1 - 10311 - Windows XP - EN - cp1252
Server IP address: 172.16.10.36
Perl Version: 5.8.8 MSWin32-x86-multi-thread
MySQL Version: 5.0.22-community-nt 


Lyrics are stored as:
My heart is sad and lonely
For you I pine, for you dear only
Why haven't you seen it?
I'm all for you, body and soul.

I spend my days in longing
And wondering why it's me you're wronging
I tell you I mean it
I'm all for you, body and soul.

...



Display as:
My heart is sad and lonely For you I pine, for you dear only Why haven't you seen it? I'm all for you, body and soul. 

I spend my days in longing And wondering why it's me you're wronging I tell you I mean it I'm all for you, body and soul. 

I can't believe it, it's hard to conceive it That you'd turn away romance. Are you pretending? It looks like the ending -- Unless I can have Just one more chance, dear. 

My life a wreck you're making My heart is yours for just the taking. I'll gladly surrender Myself to you, body and soul!
Comment 11 KDF 2006-10-15 11:22:26 UTC
*** Bug 4375 has been marked as a duplicate of this bug. ***
Comment 12 KDF 2006-10-15 11:39:16 UTC
another patch merged in at change 10342.  please update and let us know if that works fully.
Comment 13 Rick Berguist 2006-10-18 12:25:30 UTC
Working correctly for me with Fishbone UI.