Index: /Users/mh/Documents/workspace/Boom/server/HTML/EN/settings/player/basic.html =================================================================== --- /Users/mh/Documents/workspace/Boom/server/HTML/EN/settings/player/basic.html (revision 20732) +++ /Users/mh/Documents/workspace/Boom/server/HTML/EN/settings/player/basic.html (working copy) @@ -108,6 +108,10 @@ [% END %] [% END %] + [% WRAPPER setting title="SETUP_RESET_PLAYER" desc="SETUP_RESET_PLAYER_DESC" %] + [% "SETUP_RESET_PLAYER" | string %] + [% END %] + [% IF !macaddress; WRAPPER setting title="FORGET_PLAYER" desc="FORGET_PLAYER_DESC" %]
[% IF useAJAX %] Index: /Users/mh/Documents/workspace/Boom/server/Slim/Player/Client.pm =================================================================== --- /Users/mh/Documents/workspace/Boom/server/Slim/Player/Client.pm (revision 20732) +++ /Users/mh/Documents/workspace/Boom/server/Slim/Player/Client.pm (working copy) @@ -287,6 +287,8 @@ Accessors for the list of known clients. These are functions, and do not need clients passed. They should be moved to be class methods. +=cut + =head2 clients() Returns an array of all client objects. @@ -297,6 +299,19 @@ return values %clientHash; } +=head2 resetPrefs() + +Resets a client's preference object. + +=cut + +sub resetPrefs { + my $client = shift; + + delete $prefs->client($client)->{'prefs'}; + $client->init(); +} + =head2 clientCount() Returns the number of known clients. Index: /Users/mh/Documents/workspace/Boom/server/Slim/Web/Settings/Player/Basic.pm =================================================================== --- /Users/mh/Documents/workspace/Boom/server/Slim/Web/Settings/Player/Basic.pm (revision 20732) +++ /Users/mh/Documents/workspace/Boom/server/Slim/Web/Settings/Player/Basic.pm (working copy) @@ -65,6 +65,11 @@ return $class->SUPER::handler($client, $paramRef); } + # reset all client preferences to factory defaults + if ($paramRef->{resetprefs}) { + $client->resetPrefs(); + } + # array prefs handled by this handler not handler::SUPER my @prefs = (); Index: /Users/mh/Documents/workspace/Boom/server/strings.txt =================================================================== --- /Users/mh/Documents/workspace/Boom/server/strings.txt (revision 20732) +++ /Users/mh/Documents/workspace/Boom/server/strings.txt (working copy) @@ -3121,6 +3121,12 @@ SV Spelarens namn: ZH_CN 播放机名字: +SETUP_RESET_PLAYER + EN Reset player preferences + +SETUP_RESET_PLAYER_DESC + EN You can reset a player's settings like player name, title format, menus etc. to factory defaults. Please note that this will not reset the player's hardware settings like eg. networking parameters. + SETUP_POWERONBRIGHTNESS EN Power On Brightness