Bugzilla – Bug 2457
X-Playerduration header has the wrong value
Last modified: 2008-09-15 14:37:04 UTC
Seems to be the length of the full library instead of the length of the currently playing song (in seconds).
the x-headers were deprecated quite some time ago. As such, this isn't critical severity, nor is it even major loss of function. Can you explain why these are require and/or result in a crash due to the value? can you use the CLI to get the current song duration instead? see help section of slimserver, technical information for docs on the command-line interface. thanks
Let's fix this thing for 6.2.1 so that Jonas can continue to support SlimServer. The badness of the x- header interface has already been made clear, but this is a dumb and trivial bug that we should fix.
ok then... try this for line 1839 of HTTP.pm: $headers{"x-playerduration"} = Slim::Player::Source::playingSongDuration($client); I'll have to rely one someone else to tell me if that works right.
also, removing the use of Slim::Music::Info::total_time means there is only one other. I'll clear that one out with the the direct db accessor if this turns out to be used as above.
fixed for tonight's nightly, both 6.2.1 and 6.5
Still not fixed in the nightly 6.2.1 build. Please see header dump below: { Connection = "keep-alive"; "Content-Length" = 49; "Content-Type" = "text/plain"; Date = "Wed, 02 Nov 2005 11:15:50 GMT, Wed, 02 Nov 2005 11:15:50 GMT"; Refresh = "30; url=status.txt"; Server = "SlimServer (6.2.1 - 4990)"; "X-P0" = version; "X-P1" = "?"; "X-Player" = "00:d0:90:50:33:ee"; "X-Playeralbum" = "10'000 Hz Legend"; "X-Playerartist" = air; "X-Playercoverart" = "/music/26/cover.jpg"; "X-Playerduration" = "1201347.19589596"; "X-Playergenre" = Lounge; "X-Playerindex" = 1; "X-Playermode" = play; "X-Playername" = "127.0.0.1"; "X-Playerrepeat" = 1; "X-Playershuffle" = 1; "X-Playersleep" = 0; "X-Playertime" = 83; "X-Playertitle" = "Electronic Performers"; "X-Playertrack" = "file:///Users/salling/Music/iTunes/iTunes%20Music/Air/10%27000%20Hz% 20Legen= d/01%20Electronic%20Performers.mp3"; "X-Playertracks" = 1; "X-Playervolume" = 76; }
Sorry, my commit failed n the 6.2.1 branch. It just worked, look for it tonight.
Seems fixed. Thx!