diff -u -r rockbox/apps/filetree.c rockbox_pached/apps/filetree.c
--- rockbox/apps/filetree.c 2008-08-29 01:30:02.000000000 +0100
+++ rockbox_pached/apps/filetree.c 2008-08-29 16:53:42.000000000 +0100
@@ -404,8 +404,11 @@
if (!warn_on_pl_erase())
break;
- if (global_settings.party_mode && audio_status())
+ if (global_settings.party_mode_selection)
{
+ if (!playlist_check(1) && playlist_create(NULL, NULL) < 0)
+ break;
+
playlist_insert_track(NULL, buf,
PLAYLIST_INSERT_LAST, true, true);
splash(HZ, ID2P(LANG_QUEUE_LAST));
Only in rockbox_pached/apps: filetree.c~
diff -u -r rockbox/apps/lang/english.lang rockbox_pached/apps/lang/english.lang
--- rockbox/apps/lang/english.lang 2008-08-29 01:25:59.000000000 +0100
+++ rockbox_pached/apps/lang/english.lang 2008-08-29 16:18:01.000000000 +0100
@@ -1543,6 +1543,20 @@
+ id: LANG_PARTY_MODE_SELECTION
+ desc: party selection mode
+ user:
+
+ *: "Party Selection Mode"
+
+
+ *: "Party Selection Mode"
+
+
+ *: "Party Selection Mode"
+
+
+
id: LANG_ALL
desc: generic string used both in dir file filter and repeat mode selection
user:
Only in rockbox_pached/apps/lang: english.lang~
diff -u -r rockbox/apps/menus/playback_menu.c rockbox_pached/apps/menus/playback_menu.c
--- rockbox/apps/menus/playback_menu.c 2008-08-29 01:28:31.000000000 +0100
+++ rockbox_pached/apps/menus/playback_menu.c 2008-08-29 16:26:15.000000000 +0100
@@ -88,6 +88,7 @@
#endif /*HAVE_FLASH_STORAGE */
MENUITEM_SETTING(fade_on_stop, &global_settings.fade_on_stop, NULL);
MENUITEM_SETTING(party_mode, &global_settings.party_mode, NULL);
+MENUITEM_SETTING(party_mode_selection, &global_settings.party_mode_selection, NULL);
#if CONFIG_CODEC == SWCODEC
/* crossfade submenu */
@@ -184,7 +185,7 @@
#ifndef HAVE_FLASH_STORAGE
&buffer_margin,
#endif
- &fade_on_stop, &party_mode,
+ &fade_on_stop, &party_mode, &party_mode_selection,
#if CONFIG_CODEC == SWCODEC
&crossfade_settings_menu, &replaygain_settings_menu, &beep,
Only in rockbox_pached/apps/menus: playback_menu.c~
diff -u -r rockbox/apps/settings.h rockbox_pached/apps/settings.h
--- rockbox/apps/settings.h 2008-08-29 01:30:02.000000000 +0100
+++ rockbox_pached/apps/settings.h 2008-08-29 16:23:52.000000000 +0100
@@ -647,6 +647,7 @@
int lst_color; /* color of the text for the selector */
#endif
bool party_mode; /* party mode - unstoppable music */
+ bool party_mode_selection;
#ifdef HAVE_BACKLIGHT
bool bl_filter_first_keypress; /* filter first keypress when dark? */
Only in rockbox_pached/apps: settings.h~
diff -u -r rockbox/apps/settings_list.c rockbox_pached/apps/settings_list.c
--- rockbox/apps/settings_list.c 2008-08-29 01:30:02.000000000 +0100
+++ rockbox_pached/apps/settings_list.c 2008-08-29 16:29:09.000000000 +0100
@@ -689,6 +689,7 @@
/* more playback */
OFFON_SETTING(0,play_selected,LANG_PLAY_SELECTED,true,"play selected",NULL),
OFFON_SETTING(0,party_mode,LANG_PARTY_MODE,false,"party mode",NULL),
+ OFFON_SETTING(0,party_mode_selection,LANG_PARTY_MODE_SELECTION,false,"party selection mode",NULL),
OFFON_SETTING(0,fade_on_stop,LANG_FADE_ON_STOP,true,"volume fade",NULL),
TABLE_SETTING(F_ALLOW_ARBITRARY_VALS, ff_rewind_min_step,
LANG_FFRW_STEP, 1, "scan min step", NULL, UNIT_SEC,
Only in rockbox_pached/apps: settings_list.c~
diff -u -r rockbox/apps/tagtree.c rockbox_pached/apps/tagtree.c
--- rockbox/apps/tagtree.c 2008-08-29 01:30:02.000000000 +0100
+++ rockbox_pached/apps/tagtree.c 2008-08-29 16:38:07.000000000 +0100
@@ -1695,15 +1695,60 @@
static int tagtree_play_folder(struct tree_context* c)
{
- if (playlist_create(NULL, NULL) < 0)
+
+ if (global_settings.party_mode_selection )
{
- logf("Failed creating playlist\n");
- return -1;
+ cpu_boost(true);
+ if (!playlist_check(1) && playlist_create(NULL, NULL) < 0)
+ {
+ cpu_boost(false);
+ logf("Failed creating playlist\n");
+ return -1;
+ }
+ if (!tagcache_search(&tcs, tag_filename))
+ {
+ splash(HZ, str(LANG_TAGCACHE_BUSY));
+ cpu_boost(false);
+ return -3;
+ }
+
+ char buf[MAX_PATH];
+ bool success;
+
+ if (!tagcache_retrieve(&tcs, tagtree_get_entry(c, c->selected_item)->extraseek,
+ tcs.type, buf, sizeof buf) ||
+ playlist_insert_track(NULL, buf, PLAYLIST_INSERT_LAST, true, true) < 0)
+ {
+ success = false;
+ }
+ else
+ {
+ success = true;
+ }
+
+ tagcache_search_finish(&tcs);
+ cpu_boost(false);
+
+ if (success)
+ {
+ splash(HZ, str(LANG_QUEUE_LAST));
+ }
+ else
+ {
+ return -3;
+ }
}
+ else
+ {
+ if (playlist_create(NULL, NULL) < 0)
+ {
+ logf("Failed creating playlist\n");
+ return -1;
+ }
if (!insert_all_playlist(c, PLAYLIST_INSERT_LAST, false))
return -2;
-
+
if (global_settings.playlist_shuffle)
c->selected_item = playlist_shuffle(current_tick, c->selected_item);
if (!global_settings.play_selected)
@@ -1711,7 +1756,7 @@
gui_synclist_select_item(&tree_lists, c->selected_item);
playlist_start(c->selected_item,0);
-
+ }
return 0;
}