[Slim-Checkins] r8860 - in /branches/BRANCH_SN_API/server: ./
HTML/EN/html/
HTML/EN/html/docs/ HTML/Fishbone/html/ HTML/Nokia770/ Plugins/RandomPlay/
Slim/Networking/ Slim/Player/
andy at svn.slimdevices.com
andy at svn.slimdevices.com
Tue Aug 8 10:42:43 PDT 2006
Author: andy
Date: Tue Aug 8 10:42:37 2006
New Revision: 8860
URL: http://svn.slimdevices.com?rev=8860&view=rev
Log:
Merge from trunk: -r8851:8859
Modified:
branches/BRANCH_SN_API/server/Changelog6.html
branches/BRANCH_SN_API/server/HTML/EN/html/common.js
branches/BRANCH_SN_API/server/HTML/EN/html/docs/cli-api.html
branches/BRANCH_SN_API/server/HTML/EN/html/global.js
branches/BRANCH_SN_API/server/HTML/Fishbone/html/ajax.js
branches/BRANCH_SN_API/server/HTML/Nokia770/browsedb.html
branches/BRANCH_SN_API/server/Plugins/RandomPlay/Plugin.pm
branches/BRANCH_SN_API/server/Slim/Networking/Slimproto.pm
branches/BRANCH_SN_API/server/Slim/Player/Client.pm
branches/BRANCH_SN_API/server/strings.txt
Modified: branches/BRANCH_SN_API/server/Changelog6.html
URL: http://svn.slimdevices.com/branches/BRANCH_SN_API/server/Changelog6.html?rev=8860&r1=8859&r2=8860&view=diff
==============================================================================
--- branches/BRANCH_SN_API/server/Changelog6.html (original)
+++ branches/BRANCH_SN_API/server/Changelog6.html Tue Aug 8 10:42:37 2006
@@ -472,6 +472,7 @@
<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=3861">#3861</a> - Search crashes slimserver</li>
<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=3866">#3866</a> - Multidisc albums in different folders not recognized as same album</li>
<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=3867">#3867</a> - Rescan.pm misdisplay of scan type</li>
+ <li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=3870">#3870</a> - Nokia770 skin doesn't show tooltip for unknown album artwork</li>
<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=3874">#3874</a> - fishbone skin does not refresh playlist correctly</li>
</ul>
</ul>
Modified: branches/BRANCH_SN_API/server/HTML/EN/html/common.js
URL: http://svn.slimdevices.com/branches/BRANCH_SN_API/server/HTML/EN/html/common.js?rev=8860&r1=8859&r2=8860&view=diff
==============================================================================
--- branches/BRANCH_SN_API/server/HTML/EN/html/common.js (original)
+++ branches/BRANCH_SN_API/server/HTML/EN/html/common.js Tue Aug 8 10:42:37 2006
@@ -95,7 +95,7 @@
function chooseAlbumOrderBy(value, option)
{
- var url = '[% webroot %]browsedb.html?hierarchy=[% hierarchy %]&level=[% level %][% attributes %]&player=[% playerURI %]';
+ var url = '[% webroot %]browsedb.html?hierarchy=[% hierarchy %]&level=[% level %][% attributes %][% IF artwork %]&artwork=1[% END %]&player=[% playerURI %]';
if (option) {
url = url + '&orderBy=' + option;
Modified: branches/BRANCH_SN_API/server/HTML/EN/html/docs/cli-api.html
URL: http://svn.slimdevices.com/branches/BRANCH_SN_API/server/HTML/EN/html/docs/cli-api.html?rev=8860&r1=8859&r2=8860&view=diff
==============================================================================
--- branches/BRANCH_SN_API/server/HTML/EN/html/docs/cli-api.html (original)
+++ branches/BRANCH_SN_API/server/HTML/EN/html/docs/cli-api.html Tue Aug 8 10:42:37 2006
@@ -79,12 +79,12 @@
playlist information if appropriate.
</li>
<li>
- Command "<a href="#dc_mode">mode <play|pause|stop></a>"
+ Command "<a href="#mode">mode <play|pause|stop></a>"
is deprecated. Please use commands
"<a href="#play">play</a>",
"<a href="#stop">stop</a>" and
"<a href="#pause">pause</a>". The query
- "<a href="#mode">mode ?</a>" is not affected by this change.
+ "<a href="#mode ?">mode ?</a>" is not affected by this change.
</li>
<li>
Query "<a href="#playlisttracks">playlisttracks</a>" is
@@ -1005,10 +1005,31 @@
<li>
<strong><code><a href="#player model ?">player model ?</a></code></strong>
</li>
+ <li>
+ <strong><code><a href="#player displaytype ?">player displaytype ?</a></code></strong>
+ </li>
+ <li>
+ <strong><code><a href="#signalstrength ?">signalstrength ?</a></code></strong>
+ </li>
+ <li>
+ <strong><code><a href="#connected ?">connected ?</a></code></strong>
+ </li>
+ <li>
+ <strong><code><a href="#sleep">sleep</a></code></strong>
+ </li>
+ <li>
+ <strong><code><a href="#sync">sync</a></code></strong>
+ </li>
+ <li>
+ <strong><code><a href="#power">power</a></code></strong>
+ </li>
+ <li>
+ <strong><code><a href="#mixer volume">mixer volume</a></code></strong>
+ </li>
+ <li>
+ <strong><code><a href="#show">show</a></code></strong>
+ </li>
<!-- MISSING COMMANDS HERE ! -->
- <li>
- <strong><code><a href="#connected ?">connected ?</a></code></strong>
- </li>
</ul>
<p id="player count ?">
@@ -1144,47 +1165,156 @@
</p>
</blockquote>
-
-<br><p><strong><code>player displaytype <playerindex|playerid> ?</code></strong></p>
-<p>The "player displaytype" command returns the display model of the player. Graphical
-display types start with "graphic-", non-graphical display type with "noritake-".</p>
-<blockquote>
- <p> Request: "player displaytype 0 ?<LF>"<br>
- Response: "player displaytype 0 noritake-katakana<LF>"</p>
-</blockquote>
-
-<br><p><strong><code><playerid> sleep <number|?></code></strong></p>
-<p>The "sleep" command specifies a number of seconds to continue playing
- before powering off the player. You may query the amount of time until the player
- sleeps by passing in a "?" parameter.</p>
-<p>Examples: </p>
-<blockquote>
- <p>Request: "04:20:00:12:23:45 sleep ?<LF>"<br>Response: "04:20:00:12:23:45 sleep 105.3<LF>"</p>
- <p>Request: "04:20:00:12:23:45 sleep 300<LF>"<br>Response: "04:20:00:12:23:45 sleep 300<LF>"</p>
-</blockquote>
-
-<br><p id="sync">
- <strong>
- <code><playerid> sync <playerindex|playerid|-|?></code>
- </strong>
-</p>
-<p>The "sync" command specifies the player to synchronise with the
- given playerid. You may query which players are already synced with this
- player by passing in a "?" parameter. Multiple playerids are
- separated by a comma. If the player is not synced, "-" is returned.
- To unsync a player, use the "-" parameter.</p>
-<p>Examples: </p>
-<blockquote>
- <p>Request: "04:20:00:12:23:45 sync 1<LF>"
- <br>Response: "04:20:00:12:23:45 sync 1<LF>"</p>
- <p>Request: "04:20:00:12:23:45 sync ?<LF>"
- <br>Response: "04:20:00:12:23:45 sync 04:20:00:12:23:21<LF>"</p>
- <p>Request: "04:20:00:12:23:45 sync -<LF>"
- <br>Response: "04:20:00:12:23:45 sync -<LF>"</p>
-</blockquote>
-
-<br>
-<p>
+<br>
+<p id="player displaytype ?">
+ <strong>
+ <code>
+ player
+ displaytype
+ <playerindex|playerid>
+ ?
+ </code>
+ </strong>
+</p>
+<p>
+ The "player displaytype ?" query returns the display model of the
+ player. Graphical display types start with "graphic-",
+ non-graphical display type with "noritake-".
+</p>
+<p>
+ Example:
+</p>
+<blockquote>
+ <p>
+ Request: "player displaytype 0 ?<LF>"
+ <br>
+ Response: "player displaytype 0 noritake-katakana<LF>"
+ </p>
+</blockquote>
+
+<br>
+<p id="signalstrength ?">
+ <strong>
+ <code>
+ <playerid>
+ signalstrength
+ ?
+ </code>
+ </strong>
+</p>
+<p>
+ Returns the wireless signal strength for the player, range is 1 to 100.
+ Returns 0 if not connected wirelessly.
+</p>
+<p>
+ Example:
+</p>
+<blockquote>
+ <p>
+ Request: "04:20:00:12:23:45 signalstrength ?<LF>"
+ <br>
+ Response: "04:20:00:12:23:45 signalstrength 76<LF>"
+ </p>
+</blockquote>
+
+<br>
+<p id="connected ?">
+ <strong>
+ <code>
+ <playerid>
+ connected
+ ?
+ </code>
+ </strong>
+</p>
+<p>
+ Returns the connected state of the player, 1 or 0 depending on the state of
+ the TCP connection to the player. SLIMP3 players, since they use UDP,
+ always return 1.
+</p>
+<p>
+ Examples:
+</p>
+<blockquote>
+ <p>
+ Request: "04:20:00:12:23:45 connected ?<LF>"
+ <br>
+ Response: "04:20:00:12:23:45 connected 1<LF>"
+ </p>
+</blockquote>
+
+<br>
+<p id="sleep">
+ <strong>
+ <code>
+ <playerid>
+ sleep
+ <number|?>
+ </code>
+ </strong>
+</p>
+<p>
+ The "sleep" command specifies a number of seconds to continue
+ playing before powering off the player. You may query the amount of time
+ until the player sleeps by passing in "?".</p>
+<p>
+ Examples:
+</p>
+<blockquote>
+ <p>
+ Request: "04:20:00:12:23:45 sleep ?<LF>"
+ <br>
+ Response: "04:20:00:12:23:45 sleep 105.3<LF>"
+ </p>
+ <p>
+ Request: "04:20:00:12:23:45 sleep 300<LF>"
+ <br>
+ Response: "04:20:00:12:23:45 sleep 300<LF>"
+ </p>
+</blockquote>
+
+<br>
+<p id="sync">
+ <strong>
+ <code>
+ <playerid>
+ sync
+ <playerindex|playerid|-|?>
+ </code>
+ </strong>
+</p>
+<p>
+ The "sync" command specifies the player to synchronise with the
+ given playerid. The command accepts only one playerindex or playerid.
+ To unsync the player, use the "-" parameter.
+ <br>
+ You may query which players are already synced with this player by passing
+ in a "?" parameter. Multiple playerids are separated by a comma.
+ If the player is not synced, "-" is returned.
+</p>
+<p>
+ Examples:
+</p>
+<blockquote>
+ <p>
+ Request: "04:20:00:12:23:45 sync 1<LF>"
+ <br>
+ Response: "04:20:00:12:23:45 sync 1<LF>"
+ </p>
+ <p>
+ Request: "04:20:00:12:23:45 sync ?<LF>"
+ <br>
+ Response: "04:20:00:12:23:45 sync 04:20:00:12:23:21<LF>"
+ </p>
+ <p>
+ Request: "04:20:00:12:23:45 sync -<LF>"
+ <br>
+ Response: "04:20:00:12:23:45 sync -<LF>"
+ </p>
+</blockquote>
+
+<br>
+<p id="power">
<strong>
<code>
<playerid>
@@ -1197,6 +1327,7 @@
The "power" command turns the player on or off. Use 0 to turn off,
1 to turn on, ? to query and no parameter to toggle the power state of the
player.
+ <br>
For remote streaming connections, the command does nothing and the query
always returns 1.
</p>
@@ -1217,71 +1348,29 @@
</blockquote>
<br>
-<p>
+<p id="mixer volume">
<strong>
<code>
<playerid>
- signalstrength
- ?
- </code>
- </strong>
-</p>
-<p>
- Returns the wireless signal strength for the player, range is 1 to 100.
- Returns 0 if not connected wirelessly.
-</p>
-<p>
- Examples:
-</p>
-<blockquote>
- <p>
- Request: "04:20:00:12:23:45 signalstrength ?<LF>"
- <br>
- Response: "04:20:00:12:23:45 signalstrength 76<LF>"
- </p>
-</blockquote>
-
-<br>
-<p id="connected ?">
- <strong>
- <code>
- <playerid>
- connected
- ?
- </code>
- </strong>
-</p>
-<p>
- Returns the connected state of the player, 1 or 0 depending on the state of
- the TCP connection to the player. SLIMP3 players, since they use UDP,
- always return 1.
-</p>
-<p>
- Examples:
-</p>
-<blockquote>
- <p>
- Request: "04:20:00:12:23:45 connected ?<LF>"
- <br>
- Response: "04:20:00:12:23:45 connected 1<LF>"
- </p>
-</blockquote>
-
-<br>
- <p id="volume">
- <strong>
- <code><playerid> mixer volume <0 .. 100|-100 .. +100|?></code>
- </strong>
- </p>
-<p>The "mixer volume" command returns or sets the current volume
+ mixer
+ volume
+ <0 .. 100|-100 .. +100|?>
+ </code>
+ </strong>
+</p>
+<p>
+ The "mixer volume" command returns or sets the current volume
setting for the player. The scale is 0 to 100, in real numbers (i.e. 34.5
is valid). If the player is muted, the volume is returned as a negative
value. Note that players display a 0 to 40 scale, that is, the 0..100
volume divided by 2,5. Likewise, using the
- "<a href="#button">button</a>"command with "volume_up"
+ "<a href="#button">button</a>" command with "volume_up"
or "volume_down" parameters increases or decreases the volume by
- 2,5.</p>
-<p> Example: </p>
+ 2,5.
+</p>
+<p>
+ Examples:
+</p>
<blockquote>
<p>
Request: "04:20:00:12:23:45 mixer volume ?<LF>"
@@ -1304,7 +1393,7 @@
<strong><code><playerid> mixer muting <0|1|?|></code></strong></p>
<p>The "mixer muting" command mutes or unmutes the player. Use 0 to
unmute, 1 to mute, ? to query and no parameter to toggle the muting state
- of the player. Note also the "<a href="#volume">mixer volume</a>"
+ of the player. Note also the "<a href="#mixer volume">mixer volume</a>"
command returns a negative value if the player is muted.</p>
<p> Example: </p>
<blockquote>
@@ -1326,7 +1415,7 @@
The "mixer bass" command returns or sets the current bass setting
for the player. This is only supported by SliMP3 and SqueezeBox (SB1)
players. For more information on the 0 to 100 scale, please refer to
- the "<a href="#volume">mixer volume</a>" command.
+ the "<a href="#mixer volume">mixer volume</a>" command.
</p>
<p>
Example:
@@ -1355,7 +1444,7 @@
<p>The "mixer treble" command returns or sets the current treble
setting for the player. This is only supported by SliMP3 and SqueezeBox (SB1)
players. For more information on the 0 to 100 scale, please refer to
- the "<a href="#volume">mixer volume</a>" command. </p>
+ the "<a href="#mixer volume">mixer volume</a>" command. </p>
<p> Example: </p><p> Example: </p>
<blockquote>
<p>Request: "04:20:00:12:23:45 mixer treble ?<LF>"
@@ -4124,7 +4213,58 @@
<h2 id="PL">
Playlist commands and queries
</h2>
-
+<ul>
+ <li>
+ <strong><code><a href="#play">play</a></code></strong>
+ </li>
+ <li>
+ <strong><code><a href="#stop">stop</a></code></strong>
+ </li>
+ <li>
+ <strong><code><a href="#pause">pause</a></code></strong>
+ </li>
+ <li>
+ <strong><code><a href="#mode ?">mode ?</a></code></strong>
+ </li>
+ <li>
+ <strong><code><a href="#time">time</a></code></strong>
+ </li>
+ <li>
+ <strong><code><a href="#cursonginfo">genre ?</a></code></strong>
+ </li>
+ <li>
+ <strong><code><a href="#cursonginfo">artist ?</a></code></strong>
+ </li>
+ <li>
+ <strong><code><a href="#cursonginfo">album ?</a></code></strong>
+ </li>
+ <li>
+ <strong><code><a href="#cursonginfo">title ?</a></code></strong>
+ </li>
+ <li>
+ <strong><code><a href="#cursonginfo">duration ?</a></code></strong>
+ </li>
+ <li>
+ <strong><code><a href="#cursonginfo">remote ?</a></code></strong>
+ </li>
+ <li>
+ <strong><code><a href="#cursonginfo">current_title ?</a></code></strong>
+ </li>
+ <li>
+ <strong><code><a href="#cursonginfo">path ?</a></code></strong>
+ </li>
+ <li>
+ <strong><code><a href="#playlist play">playlist play</a></code></strong>
+ </li>
+ <li>
+ <strong><code><a href="#playlist add">playlist add</a></code></strong>
+ </li>
+ <li>
+ <strong><code><a href="#playlist insert">playlist insert</a></code></strong>
+ </li>
+</ul>
+
+<br>
<p id="play">
<strong>
<code>
@@ -4136,6 +4276,9 @@
<p>
The "play" command allows to start playing the current playlist.
</p>
+<p>
+ Example:
+</p>
<blockquote>
<p>
Request: "04:20:00:12:23:45 play<LF>"
@@ -4155,6 +4298,9 @@
</p>
<p>
The "stop" command allows to stop playing the current playlist.
+</p>
+<p>
+ Example:
</p>
<blockquote>
<p>
@@ -4175,6 +4321,9 @@
</strong>
</p>
<p>
+ Example:
+</p>
+<p>
You may use "pause 1" to force the player to pause,
"pause 0" to force the player to unpause and "pause" to
toggle the pause state.
@@ -4188,7 +4337,7 @@
</blockquote>
<br>
-<p id="mode">
+<p id="mode ?">
<strong>
<code>
<playerid>
@@ -4201,6 +4350,9 @@
The "mode" command allows to query the player state and returns
one of "play", "stop" or "pause". If the
player is off, "mode ?" returned value is undefined.
+</p>
+<p>
+ Example:
</p>
<blockquote>
<p>
@@ -4211,7 +4363,7 @@
</blockquote>
<br>
-<p>
+<p id="time">
<strong>
<code>
<playerid>
@@ -4355,7 +4507,7 @@
</p>
</blockquote>
-<br><p><strong><code><playerid> playlist add <item></code></strong></p>
+<br><p id="playlist add"><strong><code><playerid> playlist add <item></code></strong></p>
<p>The "playlist add" command adds the specified song URL, playlist or directory contents to the end of the current playlist.
Songs currently playing or already on the playlist are not affected.</p>
<p>Examples:</p>
@@ -4364,7 +4516,7 @@
<p>Request: "04:20:00:12:23:45 playlist add /playlists/abba.m3u<LF>"<br>Response: "04:20:00:12:23:45 playlist add /playlists/abba.m3u<LF>"</p>
</blockquote>
-<br><p><strong><code><playerid> playlist insert <item></code></strong></p>
+<br><p id="playlist insert"><strong><code><playerid> playlist insert <item></code></strong></p>
<p>The "playlist insert" command inserts the specified song URL, playlist or directory contents to be played immediately after the current song in the current playlist.
Any songs currently playing or already on the playlist are not affected.</p>
<p>Examples:</p>
Modified: branches/BRANCH_SN_API/server/HTML/EN/html/global.js
URL: http://svn.slimdevices.com/branches/BRANCH_SN_API/server/HTML/EN/html/global.js?rev=8860&r1=8859&r2=8860&view=diff
==============================================================================
--- branches/BRANCH_SN_API/server/HTML/EN/html/global.js (original)
+++ branches/BRANCH_SN_API/server/HTML/EN/html/global.js Tue Aug 8 10:42:37 2006
@@ -45,19 +45,21 @@
// params is a list of args to send to url
// action is the function to be called after the ajaxRequest.txt file is spit back
function getStatusData(params, action) {
- var requesttype = 'post';
- if (window.XMLHttpRequest) {
- requesttype = 'get';
- }
- var myAjax = new Ajax.Request(
- url,
- {
- method: requesttype,
+ var requesttype = 'post';
+
+ if (window.XMLHttpRequest) {
+ requesttype = 'get';
+ }
+
+ var myAjax = new Ajax.Request(
+ url,
+ {
+ method: requesttype,
postBody: params,
- parameters: params,
- onComplete: action,
- requestHeaders:['Referer', document.location.href]
- });
+ parameters: params,
+ onComplete: action,
+ requestHeaders:['Referer', document.location.href]
+ });
}
// doRefresh
@@ -166,8 +168,8 @@
}
function displayLibraryInfo(theData) {
- var myData = theData.responseText;
- var homeParsedData = parseData(myData);
+ var myData = theData.responseText;
+ var homeParsedData = parseData(myData);
var libraryString = homeParsedData['song_count'] +', '+ homeParsedData['artist_count'] +', '+ homeParsedData['album_count'];
if ($('libraryInfo')) {
$('libraryInfo').innerHTML = libraryString;
@@ -190,7 +192,7 @@
tableObj.deleteRow(r);
}
return null;
- }
+ }
}
// miniControls is for putting play/pause on any page. ajax request is made via status.html
Modified: branches/BRANCH_SN_API/server/HTML/Fishbone/html/ajax.js
URL: http://svn.slimdevices.com/branches/BRANCH_SN_API/server/HTML/Fishbone/html/ajax.js?rev=8860&r1=8859&r2=8860&view=diff
==============================================================================
--- branches/BRANCH_SN_API/server/HTML/Fishbone/html/ajax.js (original)
+++ branches/BRANCH_SN_API/server/HTML/Fishbone/html/ajax.js Tue Aug 8 10:42:37 2006
@@ -190,16 +190,14 @@
showElements(['notplaying']);
}
- if (parsedData['isplayer']) {
- showElements(['playCtlffwd']);
- showElements(['playCtlrew']);
- showElements(['playCtlmute']);
- showElements(['volumeControl']);
- } else {
- hideElements(['playCtlffwd']);
- hideElements(['playCtlrew']);
- hideElements(['playCtlmute']);
- hideElements(['volumeControl']);
+ var playeronly = ['playCtlffwd', 'playCtlrew', 'playCtlmute', 'volumeControl'];
+ for (var i=0; i < playeronly.length; i++) {
+ var key = playeronly[i];
+ if (parsedData['isplayer']) {
+ showElements([key]);
+ } else {
+ showElements([key]);
+ }
}
// refresh cover art
Modified: branches/BRANCH_SN_API/server/HTML/Nokia770/browsedb.html
URL: http://svn.slimdevices.com/branches/BRANCH_SN_API/server/HTML/Nokia770/browsedb.html?rev=8860&r1=8859&r2=8860&view=diff
==============================================================================
--- branches/BRANCH_SN_API/server/HTML/Nokia770/browsedb.html (original)
+++ branches/BRANCH_SN_API/server/HTML/Nokia770/browsedb.html Tue Aug 8 10:42:37 2006
@@ -70,11 +70,13 @@
[% FOREACH item = browse_items %]
[%# IF browseby == 'BROWSE_BY_ARTWORK' && level == 0 %]
[%- IF artwork == 1 && (levelName == 'album' || levelName == 'age') %]
- [% IF loop.index mod 6 == 0 || loop.first %]<tr>[% END %]
+ [% IF loop.index mod 6 == 1 || loop.first %]<tr>[% END %]
+ [% IF loop.first %][% ELSE %]
<td>
[% PROCESS browsedb_artwork.html %]
</td>
- [% IF loop.index mod 6 == 5 %]</tr>[% END %]
+ [% END %]
+ [% IF loop.index mod 6 == 0 %]</tr>[% END %]
[% ELSE %]
[% PROCESS browsedbitems_list.html %]
[% END %]
Modified: branches/BRANCH_SN_API/server/Plugins/RandomPlay/Plugin.pm
URL: http://svn.slimdevices.com/branches/BRANCH_SN_API/server/Plugins/RandomPlay/Plugin.pm?rev=8860&r1=8859&r2=8860&view=diff
==============================================================================
--- branches/BRANCH_SN_API/server/Plugins/RandomPlay/Plugin.pm (original)
+++ branches/BRANCH_SN_API/server/Plugins/RandomPlay/Plugin.pm Tue Aug 8 10:42:37 2006
@@ -254,13 +254,14 @@
};
# Prevent items that have already been played from being played again
- # Following doesn't work as it excludes tracks that haven't
- # ever been played. Need to be able to say NULL OR < startTime
- # Additionally, this fails when multiple clients are playing
- # random mixes. -- Max
- #if ($mixInfo{$client->id}->{'startTime'}) {
- # $find->{'lastPlayed'} = {'<' => $mixInfo{$client->id}->{'startTime'}};
- #}
+ # This fails when multiple clients are playing random mixes. -- Max
+ if ($mixInfo{$client->id}->{'startTime'}) {
+
+ $find->{'lastPlayed'} = [
+ { '=' => undef },
+ { '<' => $mixInfo{$client->id}->{'startTime'} }
+ ];
+ }
if ($type eq 'track' || $type eq 'year') {
Modified: branches/BRANCH_SN_API/server/Slim/Networking/Slimproto.pm
URL: http://svn.slimdevices.com/branches/BRANCH_SN_API/server/Slim/Networking/Slimproto.pm?rev=8860&r1=8859&r2=8860&view=diff
==============================================================================
--- branches/BRANCH_SN_API/server/Slim/Networking/Slimproto.pm (original)
+++ branches/BRANCH_SN_API/server/Slim/Networking/Slimproto.pm Tue Aug 8 10:42:37 2006
@@ -39,13 +39,13 @@
my $slimproto_socket;
-our %ipport; # ascii IP:PORT
-our %inputbuffer; # inefficiently append data here until we have a full slimproto frame
-our %parser_state; # 'LENGTH', 'OP', or 'DATA'
+our %ipport; # ascii IP:PORT
+our %inputbuffer; # inefficiently append data here until we have a full slimproto frame
+our %parser_state; # 'LENGTH', 'OP', or 'DATA'
our %parser_framelength; # total number of bytes for data frame
our %parser_frametype; # frame type eg "HELO", "IR ", etc.
-our %sock2client; # reference to client for each sonnected sock
-our %heartbeat; # the last time we heard from a client
+our %sock2client; # reference to client for each sonnected sock
+our %heartbeat; # the last time we heard from a client
our %status;
our %callbacks;
@@ -176,19 +176,26 @@
my $now = time();
- for my $client ( values %sock2client ) {
-
- # SoftSqueeze does not report status
- next if $client->isa('Slim::Player::SoftSqueeze');
+ for my $id ( keys %heartbeat ) {
+
+ my $client = Slim::Player::Client::getClient($id) || next;
+
+ # SoftSqueeze does not report status (yet)
+ if ( $client->isa('Slim::Player::SoftSqueeze') ) {
+ delete $heartbeat{ $client->id };
+ next;
+ }
# skip if we haven't yet heard anything
- if ( !defined $heartbeat{$client} ) {
+ if ( !defined $heartbeat{ $client->id } ) {
$client->requestStatus();
next;
}
+ $::d_slimproto && msgf("Checking if %s is still alive\n", $client->id);
+
# check when we last heard a stat response from the player
- my $last_heard = $now - $heartbeat{$client};
+ my $last_heard = $now - $heartbeat{ $client->id };
# disconnect client if we haven't heard from it in 3 poll intervals and no time travel
if ( $last_heard >= $check_all_clients_time * 3 && $now - $check_time <= $check_all_clients_time ) {
@@ -227,7 +234,7 @@
if ( my $client = $sock2client{$clientsock} ) {
- delete $heartbeat{$client};
+ delete $heartbeat{ $client->id };
# check client not forgotten and this is the active slimproto socket for this client
if ( Slim::Player::Client::getClient( $client->id ) && $clientsock == $client->tcpsock ) {
@@ -531,7 +538,7 @@
my $data_ref = shift;
# update the heartbeat value for this player
- $heartbeat{$client} = time();
+ $heartbeat{ $client->id } = time();
#struct status_struct {
# u32_t event;
@@ -649,10 +656,14 @@
my $data_ref = shift;
# THIS IS ONLY FOR SDK5.X-BASED FIRMWARE OR LATER
- $::d_slimproto && msg("Client requests firmware update");
+ $::d_slimproto && msg("Client requests firmware update\n");
$client->unblock();
Slim::Hardware::IR::forgetQueuedIR($client);
- $client->upgradeFirmware();
+
+ # Bug 3881, stop watching this client
+ delete $heartbeat{ $client->id };
+
+ $client->upgradeFirmware();
}
sub _animation_complete_handler {
@@ -874,6 +885,9 @@
$client->audio_outputs_enable($client->power());
$client->volume($client->volume(),
defined($client->tempVolume()));
+
+ # add the player to the list of clients we're watching for signs of life
+ $heartbeat{ $client->id } = time();
}
return;
}
Modified: branches/BRANCH_SN_API/server/Slim/Player/Client.pm
URL: http://svn.slimdevices.com/branches/BRANCH_SN_API/server/Slim/Player/Client.pm?rev=8860&r1=8859&r2=8860&view=diff
==============================================================================
--- branches/BRANCH_SN_API/server/Slim/Player/Client.pm (original)
+++ branches/BRANCH_SN_API/server/Slim/Player/Client.pm Tue Aug 8 10:42:37 2006
@@ -917,6 +917,9 @@
Slim::Web::HTTP::forgetClient($client);
Slim::Utils::Timers::forgetTimer($client);
delete $clientHash{$client->id()};
+
+ # stop watching this player
+ delete $Slim::Networking::Slimproto::heartbeat{ $client->id };
}
}
Modified: branches/BRANCH_SN_API/server/strings.txt
URL: http://svn.slimdevices.com/branches/BRANCH_SN_API/server/strings.txt?rev=8860&r1=8859&r2=8860&view=diff
==============================================================================
--- branches/BRANCH_SN_API/server/strings.txt (original)
+++ branches/BRANCH_SN_API/server/strings.txt Tue Aug 8 10:42:37 2006
@@ -12264,6 +12264,7 @@
NL Modern
SORT_BY
+ DE Sortieren nach
EN Sort By
SORT_ARTISTALBUM
@@ -12324,16 +12325,30 @@
EN Optical S/PDIF
VISUALIZER_EXTENDED_TEXT
+ DE Erweiterte Textanzeige
EN Extended Text Display
VISUALIZER_VUMETER_AN
+ DE Analoger VU Meter
EN Analogue VU Meter
+ ES VUmetro análogo
+ FI Analoginen VU-mittari
+ IT VU meter analogico
+ NL Analoge VU meter
VISUALIZER_VUMETER_DIG
+ DE Digitaler VU Meter
EN Digital VU Meter
+ ES VUmetro digital
+ FI Digitaalinen VU-mittari
+ IT VU meter digitale
+ NL Digitale VU meter
+ EN Digital VU Meter
SETUP_VISUALIZERMODE
+ DE Visualizer Bildschirm
EN Visualizer Screen
SETUP_VISUALIZERMODE_DESC
+ DE Der Player can auf dem rechten Bildschirm Visualisierungen oder erweiterte Informationen anzeigen. Wählen Sie hier, was dargestellt werden soll. Mit dem "Visual" Knopf auf dem Player können Sie diese Wahl jederzeit ändern.
EN The player can display visualizers or extended text information on the right hand screen. Choose which you wish to be displayed. The Visual button on the player will cycle through each of the options selected below.
More information about the checkins
mailing list