Bugzilla – Bug 14819
Preset buttons get lost
Last modified: 2009-10-22 11:23:23 UTC
Every once in a while the stations I saved on the hardware preset buttons #1-#6 get lost. I cannot reproduce this, it just sometimes happens. Firmware version is 7.4.0-r7790
Happened to me too. The preset pref seems to get incorrectly saved when syncing with mysb.com. This is what looks ok in my prefs file, migrated from the favorites: presets: - URL: http://asx.skypro.ch/radio/internet-128/DRS3.asx server: ~ text: DRS3 type: audio - URL: http://www.radioparadise.com/musiclinks/rp_128-8.m3u server: ~ text: Radio Paradise type: audio - URL: mood://Gitarrig server: ~ text: Gitarrig type: audio - URL: mood://Rockig server: ~ text: Rockig type: audio - URL: mood://Soft server: ~ text: Soft type: audio - URL: randomplay://track server: ~ text: Zufällige Titel type: audio - URL: randomplay://album server: ~ text: Zufällige Alben type: audio And here's what one of my players had this morning: presets: - URL: http://www.radioparadise.com/musiclinks/rp_128-8.m3u server: ~ text: Radio Paradise type: audio - json:{"URL":"mms://dms-cl-021.skypro-media.net/drs3-128","text":"DRS3","type":"audio","server":null} - json:{"URL":"http://asx.skypro.ch/radio/internet-128/radiocapitalfm.wax","text":"Capital FM","type":"audio","server":null} - json:{"URL":"http://streampoint.radioio.com/streams/220/45ec8c85a2a8a/listen.pls","text":"Eclectic | Alt-rock, pop, jazz and more new favorites when the mix is-IO ECLECTIC","type":"audio","server":null} - json:{"URL":"http://www.shoutcast.com/sbin/tunein-station.pls?id=6772&filename=playlist.pls","text":"SwissGroove - groovy - jazzy - funky - trippy ++ 128 k ++ 24/7 ++ Tune in & groove with us!!!","type": "audio","server":null} - json:{"URL":"http://64.202.98.133:2010","text":"Aural Moon","type":"audio","server":null} - json:{"URL":"http://www.shoutcast.com/sbin/tunein-station.pls?id=5870&filename=playlist.pls","text":"181.fm - The Eagle (Your Home For REAL Classic Rock!)","type":"audio","server":null} - json:{"URL":"http://www.shoutcast.com/sbin/tunein-station.pls?id=311&filename=playlist.pls","text":"Frequence INDIA - ex Nimbooda - Best ! Indian and Bollywood music from Paris France","type":"audio","se rver":null} - json:{"URL":"http://www.shoutcast.com/sbin/tunein-station.pls?id=548&filename=playlist.pls","text":"SKY . FM- 80s, 80s, 80s! - Hear your classic favorites right here! (www.sky.fm)","type":"audio","server ":null} - json:{"URL":"http://www.radioparadise.com/musiclinks/rp_128.m3u","text":"Radio Paradise","type":"audio","server":null} This definitely is the list of favorites I have on mysb.com, while the first section obviously is my local SBS settings (randomplay, MIP mixes etc.).
Ok, so here's what I got during a prefs sync: [09-10-21 10:58:27.9758] Slim::Networking::SqueezeNetwork::PrefSync::_syncDown_done (220) Sync down data from SN: { name => "Boom Vietnam", next_sync => 24, prefs => { power => { ts => "1256115501", value => 1 }, presets => { ts => "1256115426", value => [ { URL => "http://www.radioparadise.com/musiclinks/rp_128-8.m3u", text => "Radio Paradise", type => "audio", }, "", "json:{\"URL\":\"http://www.squeezenetwork.com/api/live365/v1/opml/attr?code=O\",\"text\":\"Official Stations\",\"server\":null,\"type\":\"link\"}", "json:{\"URL\":\"http://www.squeezenetwork.com/api/lastfm/v1/opml/top_tags?account=mherger\",\"text\":\"Top Tags\",\"server\":null,\"type\":\"link\"}", "json:{\"URL\":\"http://www.squeezenetwork.com/api/lastfm/v1/opml/recent?user=mherger&account=mherger\",\"text\":\"My Recent Tracks\",\"server\":null,\"type\":\"link\"}", "json:{\"URL\":\"file:///Users/mh/Music/iTunes/iTunes%20Music/Sting/All%20This%20Time/04%20All%20This%20Time.mp3\",\"text\":\"All This Time - ey!\",\"server\":\"f27643ea-281b-4585-b191-564cb5124e96\",\"type\":\"audio\"}", "json:{\"URL\":\"sirius://thestrobe\",\"text\":\"37. The Strobe - Disco/Classic Dance\",\"server\":\"f27643ea-281b-4585-b191-564cb5124e96\",\"type\":\"audio\"}", "json:{\"URL\":\"http://www.radioparadise.com/musiclinks/rp_128-8.m3u\",\"text\":\"Radio Paradise\",\"server\":null,\"type\":\"audio\"}", "json:{\"URL\":\"http://www.squeezenetwork.com/api/mp3tunes/v1/opml/tracks?albumId=52221\",\"text\":\"...Nothing Like the Sun von Sting\",\"server\":null,\"type\":\"playlist\"}", "json:{\"URL\":\"file:///Users/mh/Music/iTunes/iTunes%20Music/Adele/19/07%20-%20First%20Love.mp3\",\"text\":\"First Love\",\"server\":\"f27643ea-281b-4585-b191-564cb5124e96\",\"type\":\"audio\"}", ], }, }, timestamp => "1256115507", } mysb.com isn't sending correct values
FWIW: this is the log for player 702411
Andy - problem seems only the first element in an array is checked whether the pref is json encoded or not: Index: Pref.pm =================================================================== --- Pref.pm (revision 7648) +++ Pref.pm (working copy) @@ -240,8 +240,18 @@ $sth->execute( $obj->id, $since, @{$filter} ); while ( my ($name, $idx, $value, $ts) = $sth->fetchrow_array ) { + + if ( $value =~ s/^json:// ) { + $value = eval { from_json( $value ) }; + if ( $@ ) { + warn "changed_since JSON error: $@\n"; + next; + } + } + if ( exists $prefs->{$name} ) { my $prev = $prefs->{$name}->{value}; if ( ref $prev eq 'ARRAY' ) { push @{ $prefs->{$name}->{value} }, $value; } @@ -250,14 +260,6 @@ } } else { - if ( $value =~ s/^json:// ) { - $value = eval { from_json( $value ) }; - if ( $@ ) { - warn "changed_since JSON error: $@\n"; - next; - } - } - $prefs->{$name} = { value => $value, ts => $ts,
Created attachment 6184 [details] diff file
== Auto-comment from SVN commit #7650 to the network repo by michael == == https://svn.slimdevices.com/network?view=revision&revision=7650 == Fixed Bug: 14819 Description: convert all items from json, not only the first value in a list.
This bug has been marked as fixed in the 7.4.1 release version of SqueezeBox Server! Please see the Release Notes for all the details: http://wiki.slimdevices.com/index.php/Release_Notes If you haven't already, please download and install the new version from http://www.logitechsqueezebox.com/support/download-squeezebox-server.html If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.