Bugzilla – Bug 14857
Pandora "I like this song" doesn't work in Playlist Context Menu
Last modified: 2010-03-08 02:57:26 UTC
The "I like this song" and "I don't like this song" menu items in the playlist context menu don't work. The Thumbs Up/Thumbs Down Buttons do work This is in iPeng, I don't know whether this may be the same issue as this: https://bugs-archive.lyrion.org/show_bug.cgi?id=14617 and this: https://bugs-archive.lyrion.org/show_bug.cgi?id=14358 Here's the command I issue and the result: [09-10-20 17:40:50.2607] Slim::Web::Cometd::handler (143) Cometd request: [ { channel => "/slim/request", data => { request => [ "00:04:20:1e:01:de", [ "trackinfo", "items", "track_id:-249581212", "url:pandora://16297287819738089.mp3", "menu:trackinfo", "favorites_url:http://www.mysqueezebox.com/api/pandora/v1/opml/trackinfo/rate?trackId=7c3dd7e8e6f2eb868dd3955db95f8d655d37ce654a59960fa623ef159fc507de805de4ef85c1c828&stationId=16297287819738089&rating=1", "favorites_title:I like this song", "type:link", "item_id:a4f61ed8.0", "favorites_type:link", ], ], response => "/3c31d28b/slim/request", }, id => 315, }, ] [09-10-20 17:40:50.2644] Slim::Web::Cometd::sendHTTPResponse (662) Sending Cometd Response: HTTP/1.1 200 OK Cache-Control: no-cache Connection: keep-alive Pragma: no-cache Content-Length: 108 Content-Type: application/json Expires: -1 [{"error":"request failed with error: Bad params!","id":"315","channel":"/slim/request","successful":false}] And the menu where it comes from: do { my $a = [ { channel => "/3c31d28b/slim/request", data => { base => { actions => { add => { cmd => ["trackinfo", "playlist", "add"], itemsParams => "params", params => { menu => "trackinfo", track_id => -249_581_212, url => "pandora://16297287819738089.mp3", }, player => 0, }, "add-hold" => { cmd => ["trackinfo", "playlist", "insert"], itemsParams => "params", params => 'fix', player => 0, }, go => { cmd => ["trackinfo", "items"], itemsParams => "params", params => 'fix' }, more => { cmd => ["trackinfo", "items"], itemsParams => "params", params => 'fix', player => 0, window => { isContextMenu => 1 }, }, play => { cmd => ["trackinfo", "playlist", "play"], itemsParams => "params", nextWindow => "nowPlaying", params => 'fix', player => 0, }, "set-preset-0" => { cmd => ["jivefavorites", "set_preset", "key:0"], itemsParams => "params", player => 0, }, "set-preset-1" => { cmd => ["jivefavorites", "set_preset", "key:1"], itemsParams => "params", player => 0, }, "set-preset-2" => { cmd => ["jivefavorites", "set_preset", "key:2"], itemsParams => "params", player => 0, }, "set-preset-3" => { cmd => ["jivefavorites", "set_preset", "key:3"], itemsParams => "params", player => 0, }, "set-preset-4" => { cmd => ["jivefavorites", "set_preset", "key:4"], itemsParams => "params", player => 0, }, "set-preset-5" => { cmd => ["jivefavorites", "set_preset", "key:5"], itemsParams => "params", player => 0, }, "set-preset-6" => { cmd => ["jivefavorites", "set_preset", "key:6"], itemsParams => "params", player => 0, }, "set-preset-7" => { cmd => ["jivefavorites", "set_preset", "key:7"], itemsParams => "params", player => 0, }, "set-preset-8" => { cmd => ["jivefavorites", "set_preset", "key:8"], itemsParams => "params", player => 0, }, "set-preset-9" => { cmd => ["jivefavorites", "set_preset", "key:9"], itemsParams => "params", player => 0, }, }, }, count => 21, item_loop => [ { actions => { add => { cmd => ["trackinfo", "items"], params => { favorites_title => "I like this song", favorites_type => "link", favorites_url => "http://www.mysqueezebox.com/api/pandora/v1/opml/trackinfo/rate?trackId=7c3dd7e8e6f2eb868dd3955db95f8d655d37ce654a59960fa623ef159fc507de805de4ef85c1c828&stationId=16297287819738089&rating=1", item_id => "a4f61ed8.0", menu => "trackinfo", track_id => -249_581_212, type => "link", url => "pandora://16297287819738089.mp3", }, }, go => { cmd => ["trackinfo", "items"], nextWindow => "parent", params => 'fix' }, }, addAction => "go", text => "I like this song", }, { actions => { add => { cmd => ["trackinfo", "items"], params => { favorites_title => "I don't like this song", favorites_type => "link", favorites_url => "http://www.mysqueezebox.com/api/pandora/v1/opml/trackinfo/rate?trackId=7c3dd7e8e6f2eb868dd3955db95f8d655d37ce654a59960fa623ef159fc507de805de4ef85c1c828&stationId=16297287819738089&rating=0", item_id => "a4f61ed8.1", menu => "trackinfo", track_id => -249_581_212, type => "link", url => "pandora://16297287819738089.mp3", }, }, go => { cmd => ["trackinfo", "items"], nextWindow => "parent", params => 'fix' }, }, addAction => "go", text => "I don't like this song", }, { actions => { add => { cmd => ["trackinfo", "items"], params => { favorites_title => "Don't play this song for a month", favorites_type => "link", favorites_url => "http://www.mysqueezebox.com/api/pandora/v1/opml/trackinfo/sleepSong?trackId=7c3dd7e8e6f2eb868dd3955db95f8d655d37ce654a59960fa623ef159fc507de805de4ef85c1c828&stationId=16297287819738089", item_id => "a4f61ed8.2", menu => "trackinfo", track_id => -249_581_212, type => "link", url => "pandora://16297287819738089.mp3", }, }, go => { cmd => ["trackinfo", "items"], nextWindow => "parent", params => 'fix' }, }, addAction => "go", text => "Don't play this song for a month", }, { actions => { add => { cmd => ["trackinfo", "items"], params => { item_id => "a4f61ed8.3", menu => "trackinfo", track_id => -249_581_212, url => "pandora://16297287819738089.mp3", }, }, go => { cmd => ["trackinfo", "items"], params => 'fix' }, }, addAction => "go", text => "Bookmark", }, { actions => { add => { cmd => ["trackinfo", "items"], params => { favorites_title => "Why did you play this song?", favorites_type => "link", favorites_url => "http://www.mysqueezebox.com/api/pandora/v1/opml/trackinfo/explainTrack?trackId=7c3dd7e8e6f2eb868dd3955db95f8d655d37ce654a59960fa623ef159fc507de805de4ef85c1c828&stationId=16297287819738089", item_id => "a4f61ed8.4", menu => "trackinfo", track_id => -249_581_212, type => "link", url => "pandora://16297287819738089.mp3", }, }, go => { cmd => ["trackinfo", "items"], params => 'fix' }, }, addAction => "go", text => "Why did you play this song?", }, { actions => { add => { cmd => ["trackinfo", "items"], params => { item_id => "a4f61ed8.5", menu => "trackinfo", track_id => -249_581_212, url => "pandora://16297287819738089.mp3", }, }, go => { cmd => ["trackinfo", "items"], params => 'fix' }, }, addAction => "go", text => "On Rhapsody", }, { actions => { add => { cmd => ["trackinfo", "items"], params => { item_id => "a4f61ed8.6", menu => "trackinfo", track_id => -249_581_212, url => "pandora://16297287819738089.mp3", }, }, go => { cmd => ["trackinfo", "items"], params => 'fix' }, }, addAction => "go", text => "On Napster", }, { actions => { add => { cmd => ["trackinfo", "items"], params => { favorites_title => "On Last.fm Radio", favorites_type => "link", favorites_url => "http://www.mysqueezebox.com/api/lastfm/v1/opml/search_artist?q=Black%20Eyed%20Peas", item_id => "a4f61ed8.7", menu => "trackinfo", track_id => -249_581_212, type => "link", url => "pandora://16297287819738089.mp3", }, }, go => { cmd => ["trackinfo", "items"], params => 'fix' }, }, addAction => "go", text => "On Last.fm Radio", }, { actions => { add => { cmd => ["trackinfo", "items"], params => { item_id => "a4f61ed8.8", menu => "trackinfo", track_id => -249_581_212, url => "pandora://16297287819738089.mp3", }, }, go => { cmd => ["trackinfo", "items"], params => 'fix' }, }, addAction => "go", text => "Share on Facebook", }, { actions => { add => { cmd => ["trackinfo", "items"], params => { favorites_title => "On Flickr", favorites_type => "slideshow", favorites_url => "http://www.mysqueezebox.com/api/flickr/v1/opml/search?tags=Black%20Eyed%20Peas", item_id => "a4f61ed8.9", menu => "trackinfo", track_id => -249_581_212, type => "slideshow", url => "pandora://16297287819738089.mp3", }, }, go => { cmd => ["trackinfo", "items"], params => 'fix' }, }, addAction => "go", text => "On Flickr", }, { actions => { add => { cmd => ["trackinfo", "items"], params => { item_id => "a4f61ed8.10", menu => "trackinfo", track_id => -249_581_212, url => "pandora://16297287819738089.mp3", }, }, go => { cmd => ["trackinfo", "items"], params => 'fix' }, }, addAction => "go", text => "On Amazon", }, { actions => { add => { cmd => ["trackinfo", "items"], params => { favorites_title => "Station: Nelly Furtado Radio", favorites_type => "link", favorites_url => "http://www.mysqueezebox.com/api/pandora/v1/opml/station?stationId=16297287819738089", item_id => "a4f61ed8.11", menu => "trackinfo", track_id => -249_581_212, type => "link", url => "pandora://16297287819738089.mp3", }, }, go => { cmd => ["trackinfo", "items"], params => 'fix' }, }, addAction => "go", text => "Station: Nelly Furtado Radio", }, { actions => { add => { cmd => ["trackinfo", "items"], params => { favorites_title => "Create new station from artist", favorites_type => "link", favorites_url => "http://www.mysqueezebox.com/api/pandora/v1/opml/createFromTrack?trackId=7c3dd7e8e6f2eb868dd3955db95f8d655d37ce654a59960fa623ef159fc507de805de4ef85c1c828&musicType=artist", item_id => "a4f61ed8.12", menu => "trackinfo", track_id => -249_581_212, type => "link", url => "pandora://16297287819738089.mp3", }, }, go => { cmd => ["trackinfo", "items"], params => 'fix' }, }, addAction => "go", text => "Create new station from artist", }, { actions => { add => { cmd => ["trackinfo", "items"], params => { favorites_title => "Create new station from song", favorites_type => "link", favorites_url => "http://www.mysqueezebox.com/api/pandora/v1/opml/createFromTrack?trackId=7c3dd7e8e6f2eb868dd3955db95f8d655d37ce654a59960fa623ef159fc507de805de4ef85c1c828&musicType=song", item_id => "a4f61ed8.13", menu => "trackinfo", track_id => -249_581_212, type => "link", url => "pandora://16297287819738089.mp3", }, }, go => { cmd => ["trackinfo", "items"], params => 'fix' }, }, addAction => "go", text => "Create new station from song", }, { action => "none", actions => { add => { cmd => ["trackinfo", "items"], params => { menu => "trackinfo", track_id => -249_581_212, url => "pandora://16297287819738089.mp3", }, }, go => { cmd => ["trackinfo", "items"], params => 'fix' }, }, addAction => "go", style => "itemNoAction", text => "Artist: Black Eyed Peas", }, { action => "none", actions => { add => { cmd => ["trackinfo", "items"], params => { menu => "trackinfo", track_id => -249_581_212, url => "pandora://16297287819738089.mp3", }, }, go => { cmd => ["trackinfo", "items"], params => 'fix' }, }, addAction => "go", style => "itemNoAction", text => "Album: The E.N.D. (The Energy Never Dies)", }, { action => "none", actions => { add => { cmd => ["trackinfo", "items"], params => { menu => "trackinfo", track_id => -249_581_212, url => "pandora://16297287819738089.mp3", }, }, go => { cmd => ["trackinfo", "items"], params => 'fix' }, }, addAction => "go", style => "itemNoAction", text => "Song: I Gotta Feeling", }, { action => "none", actions => { add => { cmd => ["trackinfo", "items"], params => { menu => "trackinfo", track_id => -249_581_212, url => "pandora://16297287819738089.mp3", }, }, go => { cmd => ["trackinfo", "items"], params => 'fix' }, }, addAction => "go", style => "itemNoAction", text => "Duration: 4:50", }, { action => "none", actions => { add => { cmd => ["trackinfo", "items"], params => { menu => "trackinfo", track_id => -249_581_212, url => "pandora://16297287819738089.mp3", }, }, go => { cmd => ["trackinfo", "items"], params => 'fix' }, }, addAction => "go", style => "itemNoAction", text => "Volume Adjustment: -4.11 dB", }, { action => "none", actions => { add => { cmd => ["trackinfo", "items"], params => { menu => "trackinfo", track_id => -249_581_212, url => "pandora://16297287819738089.mp3", }, }, go => { cmd => ["trackinfo", "items"], params => 'fix' }, }, addAction => "go", style => "itemNoAction", text => "File Format: MP3", }, { action => "none", actions => { add => { cmd => ["trackinfo", "items"], params => { menu => "trackinfo", track_id => -249_581_212, url => "pandora://16297287819738089.mp3", }, }, go => { cmd => ["trackinfo", "items"], params => 'fix' }, }, addAction => "go", style => "itemNoAction", text => "Bitrate: 128kbps CBR", }, ], offset => 0, title => "I Gotta Feeling by Black Eyed Peas from The E.N.D. (The Energy Never Dies)", window => { windowStyle => "text_list" }, }, ext => { priority => "" }, id => 256, }, ]; $a->[0]{data}{base}{actions}{"add-hold"}{params} = $a->[0]{data}{base}{actions}{add}{params}; $a->[0]{data}{base}{actions}{go}{params} = $a->[0]{data}{base}{actions}{add}{params}; $a->[0]{data}{base}{actions}{more}{params} = $a->[0]{data}{base}{actions}{add}{params}; $a->[0]{data}{base}{actions}{play}{params} = $a->[0]{data}{base}{actions}{add}{params}; $a->[0]{data}{item_loop}[0]{actions}{go}{params} = $a->[0]{data}{item_loop}[0]{actions}{add}{params}; $a->[0]{data}{item_loop}[1]{actions}{go}{params} = $a->[0]{data}{item_loop}[1]{actions}{add}{params}; $a->[0]{data}{item_loop}[2]{actions}{go}{params} = $a->[0]{data}{item_loop}[2]{actions}{add}{params}; $a->[0]{data}{item_loop}[3]{actions}{go}{params} = $a->[0]{data}{item_loop}[3]{actions}{add}{params}; $a->[0]{data}{item_loop}[4]{actions}{go}{params} = $a->[0]{data}{item_loop}[4]{actions}{add}{params}; $a->[0]{data}{item_loop}[5]{actions}{go}{params} = $a->[0]{data}{item_loop}[5]{actions}{add}{params}; $a->[0]{data}{item_loop}[6]{actions}{go}{params} = $a->[0]{data}{item_loop}[6]{actions}{add}{params}; $a->[0]{data}{item_loop}[7]{actions}{go}{params} = $a->[0]{data}{item_loop}[7]{actions}{add}{params}; $a->[0]{data}{item_loop}[8]{actions}{go}{params} = $a->[0]{data}{item_loop}[8]{actions}{add}{params}; $a->[0]{data}{item_loop}[9]{actions}{go}{params} = $a->[0]{data}{item_loop}[9]{actions}{add}{params}; $a->[0]{data}{item_loop}[10]{actions}{go}{params} = $a->[0]{data}{item_loop}[10]{actions}{add}{params}; $a->[0]{data}{item_loop}[11]{actions}{go}{params} = $a->[0]{data}{item_loop}[11]{actions}{add}{params}; $a->[0]{data}{item_loop}[12]{actions}{go}{params} = $a->[0]{data}{item_loop}[12]{actions}{add}{params}; $a->[0]{data}{item_loop}[13]{actions}{go}{params} = $a->[0]{data}{item_loop}[13]{actions}{add}{params}; $a->[0]{data}{item_loop}[14]{actions}{go}{params} = $a->[0]{data}{item_loop}[14]{actions}{add}{params}; $a->[0]{data}{item_loop}[15]{actions}{go}{params} = $a->[0]{data}{item_loop}[15]{actions}{add}{params}; $a->[0]{data}{item_loop}[16]{actions}{go}{params} = $a->[0]{data}{item_loop}[16]{actions}{add}{params}; $a->[0]{data}{item_loop}[17]{actions}{go}{params} = $a->[0]{data}{item_loop}[17]{actions}{add}{params}; $a->[0]{data}{item_loop}[18]{actions}{go}{params} = $a->[0]{data}{item_loop}[18]{actions}{add}{params}; $a->[0]{data}{item_loop}[19]{actions}{go}{params} = $a->[0]{data}{item_loop}[19]{actions}{add}{params}; $a->[0]{data}{item_loop}[20]{actions}{go}{params} = $a->[0]{data}{item_loop}[20]{actions}{add}{params}; $a; }
This works in SBS and SP for us, can you have another look at your code?
I know it does. Several menus don't work when I process them from the Current Playlist Context menu (see the other bugs I linked). The commands generated by iPeng are exactly the same as the ones generated by SP (see below), however, they don't work. I suspect there is some kind of internal state in the server's client object that isn't set correctly if the context menu is being called directly instead of having a menu-mode playlist generated (I use traditional playlist queries in iPeng). As far as I can see from the protocol my code is correct (it generates the same commands as SP), since all other aspects are undocumented there is nothing I can do from my side.
cli command arguments sent from squeezeplay that works: [ "trackinfo", "items", "item_id:032d7bcd.0", "favorites_title:I like this song", "favorites_type:link", "type:link", "favorites_url:http://www.mysqueezebox.com/api/pandora/v1/opml/trackinfo/rate?trackId=48bf0984f074b1cb7e7a053eb02ff59d4f6785ef89cea6ffb07c44771422ed7ff527cf9d005dfe7a&stationId=7498531905705254&rating=1", "url:pandora://7498531905705254.mp3", "menu:trackinfo", "track_id:-201623284", "useContextMenu:1", ], cli command arguments sent from iPeng that fails: [ "trackinfo", "items", "item_id:8c1fdcb3.0", "favorites_title:I like this song", "favorites_type:link", "type:link", "favorites_url:http://www.mysqueezebox.com/api/pandora/v1/opml/trackinfo/rate?trackId=75b1e105e50429df7e7a053eb02ff59d4f6785ef89cea6ff738b3471b1521b8a41977c8e19f0ebf6&stationId=7498531905705254&rating=1", "url:pandora://7498531905705254.mp3", "menu:trackinfo", ], what I see there is that iPeng doesn't have a track_id param in its command. That would cause a bad params failure to the command. Why it is absent in the callback I'm not sure...
Ben, I used a different iPeng version to test this which does already fix a few issues. I'll send it to you later tonight. It has the track parameter (see my logs below) but still doesn't work. The difference is probably between contextmenu and trackinfo commands which should be identical but aren't, maybe I got some parameters wrong.
One more thing: I just noticed that this _does_ work in 7.3.3.
Not sure whether you made changes to this but I finally got this working by preserving some states in my menu structure. I see the parameters sent by SP have changed (there's now also a context:playlist and currentTrack:1 parameter, adding these fixes the issue. If you've done anything to fix this: thanks! :)