[Slim-Checkins] r33935 - /7.8/trunk/server/Slim/Control/Jive.pm

[email protected] Mon, 16 Apr 2012 14:33:25 -0000
Newsgroups gmane.music.equipment.slimdevices.cvs
Message-ID <[email protected]>
Author: mherger
Date: Mon Apr 16 07:33:25 2012
New Revision: 33935

URL: http://svn.slimdevices.com/slim?rev=33935&view=rev
Log:
Bug: n/a
Description: add menu handler to assign anonymous player to named account

Modified:
    7.8/trunk/server/Slim/Control/Jive.pm

Modified: 7.8/trunk/server/Slim/Control/Jive.pm
URL: http://svn.slimdevices.com/slim/7.8/trunk/server/Slim/Control/Jive.pm?rev=33935&r1=33934&r2=33935&view=diff
==============================================================================
--- 7.8/trunk/server/Slim/Control/Jive.pm (original)
+++ 7.8/trunk/server/Slim/Control/Jive.pm Mon Apr 16 07:33:25 2012
@@ -1608,6 +1608,31 @@
 			},
 		},
 	}
+	
+	# allow player linked to anonymous user accounts to be assigned to existing/new named user account
+	if ( main::SLIM_SERVICE && $client->hasAnonymousAccount ) {
+		push @menu, {
+			text           => $client->string("SB_ACCOUNT"),
+			actions => {
+				go => {
+					cmd    => [ 'opml_generic', 'items' ],
+					params => {
+						menu     => 'opml_generic',
+						opml_url => Slim::Networking::SqueezeNetwork->url( '/api/v1/register' ),
+					},
+					player => 0,
+				},
+			},
+			id             => 'registerPlayer',
+			node           => 'home', # XXX - 'settings'?,
+			weight         => 105,
+			window         => {
+				# XXX - need own icon
+				'icon-id'  => Slim::Networking::SqueezeNetwork->url( '/static/images/icons/register.png', 'external' ),
+			},
+		};
+	}
+
 
 	if ($batch) {
 		return \@menu;