Bug 2457 - X-Playerduration header has the wrong value
: X-Playerduration header has the wrong value
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Web Interface
: 6.2.0
: Macintosh MacOS X 10.4
: P1 normal (vote)
: ---
Assigned To: Blackketter Dean
http://clicker.salling.com
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-11-01 08:26 UTC by Jonas Salling
Modified: 2008-09-15 14:37 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 Jonas Salling 2005-11-01 08:26:25 UTC
Seems to be the length of the full library instead of the length of the currently playing song (in seconds).
Comment 1 KDF 2005-11-01 09:08:06 UTC
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
Comment 2 Blackketter Dean 2005-11-01 10:24:01 UTC
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.
Comment 3 KDF 2005-11-01 10:33:04 UTC
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.
Comment 4 KDF 2005-11-01 11:02:05 UTC
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.
Comment 5 Blackketter Dean 2005-11-01 19:57:56 UTC
fixed for tonight's nightly, both 6.2.1 and 6.5
Comment 6 Jonas Salling 2005-11-02 03:17:53 UTC
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; 
}
Comment 7 Blackketter Dean 2005-11-02 12:07:36 UTC
Sorry, my commit failed n the 6.2.1 branch.  It just worked, look for it tonight.  
Comment 8 Jonas Salling 2005-11-06 06:14:54 UTC
Seems fixed. Thx!