Fix the logic for populating somafm and di.fm lists the first time they are expanded

This commit is contained in:
David Sansome 2011-11-29 14:22:02 +00:00
parent 6f4fab54a2
commit c1aaed91be
3 changed files with 58 additions and 50 deletions

View File

@ -121,8 +121,8 @@ void DigitallyImportedServiceBase::RefreshStreamsFinished(QNetworkReply* reply,
saved_channels_.Update(channels);
// Only update the item's children if it's already been expanded
if (root_->hasChildren())
// Only update the item's children if it's already been populated
if (!root_->data(InternetModel::Role_CanLazyLoad).toBool())
PopulateStreams();
emit StreamsChanged();

View File

@ -122,8 +122,8 @@ void SomaFMService::RefreshStreamsFinished(QNetworkReply* reply, int task_id) {
streams_.Update(list);
// Only update the item's children if it's already been expanded
if (root_->hasChildren())
// Only update the item's children if it's already been populated
if (!root_->data(InternetModel::Role_CanLazyLoad).toBool())
PopulateStreams();
emit StreamsChanged();

View File

@ -424,11 +424,11 @@ msgstr ""
msgid "Add stream..."
msgstr ""
#: internet/groovesharkservice.cpp:917
#: internet/groovesharkservice.cpp:969
msgid "Add to Grooveshark favorites"
msgstr ""
#: internet/groovesharkservice.cpp:923
#: internet/groovesharkservice.cpp:975
msgid "Add to Grooveshark playlists"
msgstr ""
@ -474,7 +474,7 @@ msgstr ""
msgid "Added within three months"
msgstr ""
#: internet/groovesharkservice.cpp:1164
#: internet/groovesharkservice.cpp:1216
msgid "Adding song to favorites"
msgstr ""
@ -633,7 +633,7 @@ msgstr ""
msgid "Are you sure you want to delete the \"%1\" preset?"
msgstr ""
#: internet/groovesharkservice.cpp:1088
#: internet/groovesharkservice.cpp:1140
msgid "Are you sure you want to delete this playlist?"
msgstr ""
@ -992,7 +992,7 @@ msgstr ""
msgid "Composer"
msgstr ""
#: internet/groovesharkservice.cpp:512
#: internet/groovesharkservice.cpp:493
msgid "Configure Grooveshark..."
msgstr ""
@ -1045,7 +1045,7 @@ msgstr ""
msgid "Convert any music that the device can't play"
msgstr ""
#: internet/groovesharkservice.cpp:970
#: internet/groovesharkservice.cpp:1022
msgid "Copy to clipboard"
msgstr ""
@ -1125,7 +1125,7 @@ msgstr ""
msgid "Covers from %1"
msgstr ""
#: internet/groovesharkservice.cpp:493 internet/groovesharkservice.cpp:1039
#: internet/groovesharkservice.cpp:474 internet/groovesharkservice.cpp:1091
msgid "Create a new Grooveshark playlist"
msgstr ""
@ -1265,7 +1265,7 @@ msgstr ""
msgid "Delay between visualizations"
msgstr ""
#: internet/groovesharkservice.cpp:496 internet/groovesharkservice.cpp:1087
#: internet/groovesharkservice.cpp:477 internet/groovesharkservice.cpp:1139
msgid "Delete Grooveshark playlist"
msgstr ""
@ -1697,7 +1697,7 @@ msgstr ""
msgid "Fast"
msgstr ""
#: internet/groovesharkservice.cpp:551
#: internet/groovesharkservice.cpp:541
msgid "Favorites"
msgstr ""
@ -1880,11 +1880,11 @@ msgstr ""
msgid "Genre"
msgstr ""
#: internet/groovesharkservice.cpp:934
#: internet/groovesharkservice.cpp:986
msgid "Get an URL to share this Grooveshark song"
msgstr ""
#: internet/groovesharkservice.cpp:713
#: internet/groovesharkservice.cpp:704
msgid "Getting Grooveshark popular songs"
msgstr ""
@ -1930,11 +1930,11 @@ msgstr ""
msgid "Grooveshark"
msgstr ""
#: internet/groovesharkservice.cpp:416
#: internet/groovesharkservice.cpp:397
msgid "Grooveshark login error"
msgstr ""
#: internet/groovesharkservice.cpp:966
#: internet/groovesharkservice.cpp:1018
msgid "Grooveshark song's URL"
msgstr ""
@ -2081,7 +2081,7 @@ msgstr ""
msgid "Increase volume"
msgstr ""
#: ../bin/src/ui_deviceproperties.h:373 wiimotedev/wiimotesettingspage.cpp:124
#: wiimotedev/wiimotesettingspage.cpp:124 ../bin/src/ui_deviceproperties.h:373
msgid "Information"
msgstr ""
@ -2129,7 +2129,7 @@ msgstr ""
msgid "Invalid session key"
msgstr ""
#: internet/groovesharkservice.cpp:409
#: internet/groovesharkservice.cpp:390
msgid "Invalid username and/or password"
msgstr ""
@ -2166,9 +2166,9 @@ msgstr ""
msgid "Keep buttons for %1 second..."
msgstr ""
#: ../bin/src/ui_wiimoteshortcutgrabber.h:127
#: wiimotedev/wiimoteshortcutgrabber.cpp:73
#: wiimotedev/wiimoteshortcutgrabber.cpp:117
#: ../bin/src/ui_wiimoteshortcutgrabber.h:127
#, qt-format
msgid "Keep buttons for %1 seconds..."
msgstr ""
@ -2565,8 +2565,8 @@ msgstr ""
msgid "Music Library"
msgstr ""
#: core/globalshortcuts.cpp:54 ../bin/src/ui_mainwindow.h:692
#: wiimotedev/wiimotesettingspage.cpp:105
#: core/globalshortcuts.cpp:54 wiimotedev/wiimotesettingspage.cpp:105
#: ../bin/src/ui_mainwindow.h:692
msgid "Mute"
msgstr ""
@ -2602,7 +2602,7 @@ msgstr ""
msgid "My Recommendations"
msgstr ""
#: internet/groovesharkservice.cpp:1040 internet/groovesharkservice.cpp:1132
#: internet/groovesharkservice.cpp:1092 internet/groovesharkservice.cpp:1184
#: ui/equalizer.cpp:172 ../bin/src/ui_deviceproperties.h:369
#: ../bin/src/ui_magnatunedownloaddialog.h:135
#: ../bin/src/ui_wizardfinishpage.h:84
@ -2667,8 +2667,8 @@ msgstr ""
msgid "Next"
msgstr ""
#: core/globalshortcuts.cpp:50 ../bin/src/ui_mainwindow.h:635
#: wiimotedev/wiimotesettingspage.cpp:99
#: core/globalshortcuts.cpp:50 wiimotedev/wiimotesettingspage.cpp:99
#: ../bin/src/ui_mainwindow.h:635
msgid "Next track"
msgstr ""
@ -2772,7 +2772,7 @@ msgid "Only show the first"
msgstr ""
#: internet/digitallyimportedservicebase.cpp:178
#: internet/groovesharkservice.cpp:511 internet/icecastservice.cpp:299
#: internet/groovesharkservice.cpp:492 internet/icecastservice.cpp:299
#: internet/jamendoservice.cpp:415 internet/magnatuneservice.cpp:273
#: internet/somafmservice.cpp:84
#, qt-format
@ -2892,8 +2892,8 @@ msgstr ""
#: core/globalshortcuts.cpp:45 ui/mainwindow.cpp:506 ui/mainwindow.cpp:841
#: ui/mainwindow.cpp:860 ui/mainwindow.cpp:1262 ui/qtsystemtrayicon.cpp:166
#: ui/qtsystemtrayicon.cpp:192 ../bin/src/ui_mainwindow.h:631
#: wiimotedev/wiimotesettingspage.cpp:101
#: ui/qtsystemtrayicon.cpp:192 wiimotedev/wiimotesettingspage.cpp:101
#: ../bin/src/ui_mainwindow.h:631
msgid "Play"
msgstr ""
@ -2967,7 +2967,7 @@ msgstr ""
msgid "Playlist type"
msgstr ""
#: internet/groovesharkservice.cpp:547
#: internet/groovesharkservice.cpp:537
msgid "Playlists"
msgstr ""
@ -2979,15 +2979,15 @@ msgstr ""
msgid "Pop"
msgstr ""
#: internet/groovesharkservice.cpp:529
#: internet/groovesharkservice.cpp:510
msgid "Popular songs"
msgstr ""
#: internet/groovesharkservice.cpp:533
#: internet/groovesharkservice.cpp:514
msgid "Popular songs of the Month"
msgstr ""
#: internet/groovesharkservice.cpp:540
#: internet/groovesharkservice.cpp:521
msgid "Popular songs today"
msgstr ""
@ -3065,8 +3065,8 @@ msgstr ""
msgid "Previous"
msgstr ""
#: core/globalshortcuts.cpp:51 ../bin/src/ui_mainwindow.h:629
#: wiimotedev/wiimotesettingspage.cpp:100
#: core/globalshortcuts.cpp:51 wiimotedev/wiimotesettingspage.cpp:100
#: ../bin/src/ui_mainwindow.h:629
msgid "Previous track"
msgstr ""
@ -3083,8 +3083,8 @@ msgstr ""
msgid "Progress"
msgstr ""
#: ../bin/src/ui_wiimoteshortcutgrabber.h:125
#: wiimotedev/wiimotesettingspage.cpp:227
#: ../bin/src/ui_wiimoteshortcutgrabber.h:125
msgid "Push Wiiremote button"
msgstr ""
@ -3121,6 +3121,10 @@ msgstr ""
msgid "Radio (equal loudness for all tracks)"
msgstr ""
#: internet/groovesharkservice.cpp:528
msgid "Radios"
msgstr ""
#: core/backgroundstreams.cpp:31 ../bin/src/ui_mainwindow.h:669
msgid "Rain"
msgstr ""
@ -3211,11 +3215,11 @@ msgstr ""
msgid "Remove folder"
msgstr ""
#: internet/groovesharkservice.cpp:506
#: internet/groovesharkservice.cpp:487
msgid "Remove from favorites"
msgstr ""
#: internet/groovesharkservice.cpp:503 ../bin/src/ui_mainwindow.h:674
#: internet/groovesharkservice.cpp:484 ../bin/src/ui_mainwindow.h:674
msgid "Remove from playlist"
msgstr ""
@ -3223,16 +3227,16 @@ msgstr ""
msgid "Remove playlist"
msgstr ""
#: internet/groovesharkservice.cpp:1222
#: internet/groovesharkservice.cpp:1274
msgid "Removing song from favorites"
msgstr ""
#: internet/groovesharkservice.cpp:1131
#: internet/groovesharkservice.cpp:1183
#, qt-format
msgid "Rename \"%1\" playlist"
msgstr ""
#: internet/groovesharkservice.cpp:499
#: internet/groovesharkservice.cpp:480
msgid "Rename Grooveshark playlist"
msgstr ""
@ -3310,11 +3314,11 @@ msgstr ""
msgid "Results"
msgstr ""
#: internet/groovesharkservice.cpp:684
#: internet/groovesharkservice.cpp:675
msgid "Retrieving Grooveshark favorites songs"
msgstr ""
#: internet/groovesharkservice.cpp:593
#: internet/groovesharkservice.cpp:584
msgid "Retrieving Grooveshark playlists"
msgstr ""
@ -3392,11 +3396,11 @@ msgid "Search"
msgstr ""
#: internet/groovesharksearchplaylisttype.cpp:32
#: internet/groovesharkservice.cpp:852
#: internet/groovesharkservice.cpp:893
msgid "Search Grooveshark"
msgstr ""
#: internet/groovesharkservice.cpp:509 internet/groovesharkservice.cpp:523
#: internet/groovesharkservice.cpp:490 internet/groovesharkservice.cpp:504
msgid "Search Grooveshark (opens a new tab)"
msgstr ""
@ -3448,7 +3452,7 @@ msgstr ""
msgid "Search terms"
msgstr ""
#: internet/groovesharkservice.cpp:276
#: internet/groovesharkservice.cpp:281
msgid "Searching on Grooveshark"
msgstr ""
@ -3795,8 +3799,12 @@ msgstr ""
msgid "Starting..."
msgstr ""
#: core/globalshortcuts.cpp:48 ../bin/src/ui_mainwindow.h:633
#: wiimotedev/wiimotesettingspage.cpp:102
#: internet/groovesharkservice.cpp:532
msgid "Stations"
msgstr ""
#: core/globalshortcuts.cpp:48 wiimotedev/wiimotesettingspage.cpp:102
#: ../bin/src/ui_mainwindow.h:633
msgid "Stop"
msgstr ""
@ -3828,7 +3836,7 @@ msgstr ""
msgid "Streaming membership"
msgstr ""
#: internet/groovesharkservice.cpp:560
#: internet/groovesharkservice.cpp:550
msgid "Subscribed playlists"
msgstr ""
@ -4152,7 +4160,7 @@ msgstr ""
msgid "Unset cover"
msgstr ""
#: internet/groovesharkservice.cpp:994
#: internet/groovesharkservice.cpp:1046
msgid "Update Grooveshark playlist"
msgstr ""
@ -4234,7 +4242,7 @@ msgstr ""
msgid "Used"
msgstr ""
#: internet/groovesharkservice.cpp:412
#: internet/groovesharkservice.cpp:393
#, qt-format
msgid "User %1 doesn't have a Grooveshark Anywhere account"
msgstr ""