Bug 8595 - don't add Favorite button to all and every entry in XMLBrowser
: don't add Favorite button to all and every entry in XMLBrowser
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Web Interface
: 7.1
: PC Windows XP
: P1 normal (vote)
: 7.x
Assigned To: Michael Herger
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-06-28 02:53 UTC by Michael Herger
Modified: 2009-07-31 10:23 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 Michael Herger 2008-06-28 02:53:29 UTC
 
Comment 1 Michael Herger 2008-06-30 05:25:46 UTC
We could xmlbrowser.pm have not set the favorites property if it's already defined in an item:

Index: /Users/mh/Documents/workspace/unstable/server/Slim/Web/XMLBrowser.pm
===================================================================
--- /Users/mh/Documents/workspace/unstable/server/Slim/Web/XMLBrowser.pm	(revision 21325)
+++ /Users/mh/Documents/workspace/unstable/server/Slim/Web/XMLBrowser.pm	(working copy)
@@ -494,9 +494,9 @@
 				$favs->deleteUrl( $item->{'play'} || $item->{'url'} );
 			}
 		}

 		for my $item (@items) {
-			if ($item->{'url'}) {
+			if ($item->{'url'} && !defined $item->{'favorites'}) {
 				$item->{'favorites'} = $favs->hasUrl( $item->{'play'} || $item->{'url'} ) ? 2 : 1;
 			}
 		}

Then go through our trackinfo procedures to predefine it with an empty value to have the heart disappear:

Index: /Users/mh/Documents/workspace/unstable/server/Slim/Plugin/Pandora/Plugin.pm
===================================================================
--- /Users/mh/Documents/workspace/unstable/server/Slim/Plugin/Pandora/Plugin.pm	(revision 21325)
+++ /Users/mh/Documents/workspace/unstable/server/Slim/Plugin/Pandora/Plugin.pm	(working copy)
@@ -204,6 +204,7 @@
 			type => 'link',
 			name => $client->string('PLUGIN_PANDORA_ON_PANDORA'),
 			url  => $snURL,
+			favorites => 0,
 		};
 	}
 }
 
This obviously only works with OPML created in SC. But I don't see how we could get rid of it in only certain places without introducing a flag. Too simplistic?
Comment 2 Michael Herger 2008-06-30 06:39:04 UTC
change 21335 - checked that in for the existing plugins providing a trackinfo time. We'll probably need to add the flag to other stuff, too.
Comment 3 Chris Owens 2008-07-30 15:31:25 UTC
This bug has now been fixed in the 7.1 release version of SqueezeCenter!  Please download the new version from http://www.slimdevices.com if you haven't already.  

If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.
Comment 4 Chris Owens 2009-07-31 10:23:28 UTC
Reduce number of active targets for SC