Merge pull request #9526 from FreeShippingParty/delete_playlist

Add option to delete playlists
This commit is contained in:
Twinaphex 2019-09-29 17:52:00 +02:00 committed by GitHub
commit 8a68c620ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
26 changed files with 75 additions and 0 deletions

View File

@ -15,6 +15,7 @@ operation had run
- MENU/OZONE: Add option to toggle between static and scrolling content metadata - MENU/OZONE: Add option to toggle between static and scrolling content metadata
- MENU/OSX: Fixed mouse buttons - mouse down events were not hooked up - MENU/OSX: Fixed mouse buttons - mouse down events were not hooked up
- MENU: When navigating backwards from a core options drop-down list (i.e. pressing select or cancel), the last menu position is remembered (instead of resetting back to the first core option item each time) - MENU: When navigating backwards from a core options drop-down list (i.e. pressing select or cancel), the last menu position is remembered (instead of resetting back to the first core option item each time)
- MENU: Add option to delete playlists (Settings > Playlists > Playlist Management)
- OSD: Memory details should now be available on every platform (get_mem_total and get_mem_free need to be implemented in the frontend driver for it to work) - OSD: Memory details should now be available on every platform (get_mem_total and get_mem_free need to be implemented in the frontend driver for it to work)
- OSD: Memory details can now be shown individually without FPS and frame count - OSD: Memory details can now be shown individually without FPS and frame count
- OSX/METAL: CoreAudio V3 driver should now be the default audio driver on first startup - OSX/METAL: CoreAudio V3 driver should now be the default audio driver on first startup

View File

@ -4118,3 +4118,5 @@ MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_SETTINGS,
"Adjust settings influencing the frame time counter (only active when threaded video is disabled).") "Adjust settings influencing the frame time counter (only active when threaded video is disabled).")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE, MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE,
"Use modern decorated animations, notifications, indicators and controls instead of the old text only system.") "Use modern decorated animations, notifications, indicators and controls instead of the old text only system.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DELETE_PLAYLIST,
"إحذف قائمة التشغيل")

View File

@ -5136,3 +5136,5 @@ MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_SETTINGS,
"Adjust settings influencing the frame time counter (only active when threaded video is disabled).") "Adjust settings influencing the frame time counter (only active when threaded video is disabled).")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE, MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE,
"Use modern decorated animations, notifications, indicators and controls instead of the old text only system.") "Use modern decorated animations, notifications, indicators and controls instead of the old text only system.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DELETE_PLAYLIST,
"删除播放列表")

View File

@ -3894,3 +3894,5 @@ MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_SETTINGS,
"Adjust settings influencing the frame time counter (only active when threaded video is disabled).") "Adjust settings influencing the frame time counter (only active when threaded video is disabled).")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE, MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE,
"Use modern decorated animations, notifications, indicators and controls instead of the old text only system.") "Use modern decorated animations, notifications, indicators and controls instead of the old text only system.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DELETE_PLAYLIST,
"刪除播放清單")

View File

@ -4023,3 +4023,5 @@ MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_SETTINGS,
"Adjust settings influencing the frame time counter (only active when threaded video is disabled).") "Adjust settings influencing the frame time counter (only active when threaded video is disabled).")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE, MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE,
"Use modern decorated animations, notifications, indicators and controls instead of the old text only system.") "Use modern decorated animations, notifications, indicators and controls instead of the old text only system.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DELETE_PLAYLIST,
"Wiedergabeliste löschen")

View File

@ -3782,3 +3782,5 @@ MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_SETTINGS,
"Adjust settings influencing the frame time counter (only active when threaded video is disabled).") "Adjust settings influencing the frame time counter (only active when threaded video is disabled).")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE, MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE,
"Use modern decorated animations, notifications, indicators and controls instead of the old text only system.") "Use modern decorated animations, notifications, indicators and controls instead of the old text only system.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DELETE_PLAYLIST,
"Forigi ludliston")

View File

@ -8252,3 +8252,5 @@ MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_SETTINGS,
"Adjust settings influencing the frame time counter (only active when threaded video is disabled).") "Adjust settings influencing the frame time counter (only active when threaded video is disabled).")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE, MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE,
"Use modern decorated animations, notifications, indicators and controls instead of the old text only system.") "Use modern decorated animations, notifications, indicators and controls instead of the old text only system.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DELETE_PLAYLIST,
"Borrar lista de reproducción")

View File

@ -9040,3 +9040,5 @@ MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_SETTINGS,
"Adjust settings influencing the frame time counter (only active when threaded video is disabled).") "Adjust settings influencing the frame time counter (only active when threaded video is disabled).")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE, MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE,
"Use modern decorated animations, notifications, indicators and controls instead of the old text only system.") "Use modern decorated animations, notifications, indicators and controls instead of the old text only system.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DELETE_PLAYLIST,
"Supprimer la liste de lecture")

View File

@ -4003,3 +4003,5 @@ MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_SETTINGS,
"Adjust settings influencing the frame time counter (only active when threaded video is disabled).") "Adjust settings influencing the frame time counter (only active when threaded video is disabled).")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE, MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE,
"Use modern decorated animations, notifications, indicators and controls instead of the old text only system.") "Use modern decorated animations, notifications, indicators and controls instead of the old text only system.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DELETE_PLAYLIST,
"Elimina scaletta")

View File

@ -9745,3 +9745,7 @@ MSG_HASH(
MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_DELAY, MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_DELAY,
"シェーダの自動ロード遅延 (ms)" "シェーダの自動ロード遅延 (ms)"
) )
MSG_HASH(
MENU_ENUM_LABEL_VALUE_DELETE_PLAYLIST,
"プレイリストを削除"
)

View File

@ -9603,3 +9603,5 @@ MSG_HASH(MENU_ENUM_SUBLABEL_MENU_XMB_ANIMATION_MOVE_UP_DOWN,
"위 아래를 움직일때 발생하는 애니메이션입니다.") "위 아래를 움직일때 발생하는 애니메이션입니다.")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_XMB_ANIMATION_OPENING_MAIN_MENU, MSG_HASH(MENU_ENUM_SUBLABEL_MENU_XMB_ANIMATION_OPENING_MAIN_MENU,
"메뉴를 열때 발생하는 애니메이션입니다.") "메뉴를 열때 발생하는 애니메이션입니다.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DELETE_PLAYLIST,
"재생목록 삭제")

View File

@ -2083,3 +2083,5 @@ MSG_HASH(MENU_ENUM_LABEL_FRAME_TIME_COUNTER_RESET_AFTER_LOAD_STATE,
"frame_time_counter_reset_after_load_state") "frame_time_counter_reset_after_load_state")
MSG_HASH(MENU_ENUM_LABEL_FRAME_TIME_COUNTER_RESET_AFTER_SAVE_STATE, MSG_HASH(MENU_ENUM_LABEL_FRAME_TIME_COUNTER_RESET_AFTER_SAVE_STATE,
"frame_time_counter_reset_after_save_state") "frame_time_counter_reset_after_save_state")
MSG_HASH(MENU_ENUM_LABEL_DELETE_PLAYLIST,
"delete_playlist")

View File

@ -3776,3 +3776,5 @@ MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_SETTINGS,
"Adjust settings influencing the frame time counter (only active when threaded video is disabled).") "Adjust settings influencing the frame time counter (only active when threaded video is disabled).")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE, MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE,
"Use modern decorated animations, notifications, indicators and controls instead of the old text only system.") "Use modern decorated animations, notifications, indicators and controls instead of the old text only system.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DELETE_PLAYLIST,
"Afspeellijst verwijderen")

View File

@ -4622,3 +4622,6 @@ MSG_HASH(MENU_ENUM_SUBLABEL_FPS_UPDATE_INTERVAL,
MSG_HASH(MENU_ENUM_SUBLABEL_START_CORE, MSG_HASH(MENU_ENUM_SUBLABEL_START_CORE,
"Zacznij rdzeń bez zawartości." "Zacznij rdzeń bez zawartości."
) )
MSG_HASH(MENU_ENUM_LABEL_VALUE_DELETE_PLAYLIST,
"Usuń listę odtwarzania"
)

View File

@ -9607,3 +9607,5 @@ MSG_HASH(MENU_ENUM_SUBLABEL_MENU_XMB_ANIMATION_MOVE_UP_DOWN,
"A animação que é acionada ao mover para cima ou para baixo.") "A animação que é acionada ao mover para cima ou para baixo.")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_XMB_ANIMATION_OPENING_MAIN_MENU, MSG_HASH(MENU_ENUM_SUBLABEL_MENU_XMB_ANIMATION_OPENING_MAIN_MENU,
"A animação que é acionada ao abrir um submenu.") "A animação que é acionada ao abrir um submenu.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DELETE_PLAYLIST,
"Excluir lista de reprodução")

View File

@ -3848,3 +3848,5 @@ MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_SETTINGS,
"Adjust settings influencing the frame time counter (only active when threaded video is disabled).") "Adjust settings influencing the frame time counter (only active when threaded video is disabled).")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE, MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE,
"Use modern decorated animations, notifications, indicators and controls instead of the old text only system.") "Use modern decorated animations, notifications, indicators and controls instead of the old text only system.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DELETE_PLAYLIST,
"Apagar a lista de reprodução")

View File

@ -4046,3 +4046,5 @@ MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_SETTINGS,
"Adjust settings influencing the frame time counter (only active when threaded video is disabled).") "Adjust settings influencing the frame time counter (only active when threaded video is disabled).")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE, MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE,
"Use modern decorated animations, notifications, indicators and controls instead of the old text only system.") "Use modern decorated animations, notifications, indicators and controls instead of the old text only system.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DELETE_PLAYLIST,
"Удалить список воспроизведения")

View File

@ -9052,3 +9052,5 @@ MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_SETTINGS,
"Kare zaman sayacını etkileyen ayarları yapın (yalnızca threaded video devre dışı olduğunda etkindir).") "Kare zaman sayacını etkileyen ayarları yapın (yalnızca threaded video devre dışı olduğunda etkindir).")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE, MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE,
"Yalnızca eski metin sistemi yerine modern dekore edilmiş animasyonları, bildirimleri, göstergeleri ve kontrolleri kullanın.") "Yalnızca eski metin sistemi yerine modern dekore edilmiş animasyonları, bildirimleri, göstergeleri ve kontrolleri kullanın.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DELETE_PLAYLIST,
"Parça listesini sil")

View File

@ -9690,3 +9690,5 @@ MSG_HASH(MENU_ENUM_SUBLABEL_MENU_XMB_ANIMATION_MOVE_UP_DOWN,
"The animation that triggers when moving up or down.") "The animation that triggers when moving up or down.")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_XMB_ANIMATION_OPENING_MAIN_MENU, MSG_HASH(MENU_ENUM_SUBLABEL_MENU_XMB_ANIMATION_OPENING_MAIN_MENU,
"The animation that triggers when opening a submenu.") "The animation that triggers when opening a submenu.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DELETE_PLAYLIST,
"Delete Playlist")

View File

@ -3940,3 +3940,5 @@ MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_SETTINGS,
"Adjust settings influencing the frame time counter (only active when threaded video is disabled).") "Adjust settings influencing the frame time counter (only active when threaded video is disabled).")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE, MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE,
"Use modern decorated animations, notifications, indicators and controls instead of the old text only system.") "Use modern decorated animations, notifications, indicators and controls instead of the old text only system.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DELETE_PLAYLIST,
"Xoá danh mục")

View File

@ -5864,6 +5864,26 @@ static int action_ok_core_delete(const char *path,
return 0; return 0;
} }
static int action_ok_delete_playlist(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx)
{
playlist_t *playlist = playlist_get_cached();
menu_ctx_environment_t menu_environ = {0};
if (!playlist)
return -1;
path = playlist_get_conf_path(playlist);
filestream_delete(path);
menu_environ.type = MENU_ENVIRON_RESET_HORIZONTAL_LIST;
menu_driver_ctl(RARCH_MENU_CTL_ENVIRONMENT, &menu_environ);
return action_cancel_pop_default(NULL, NULL, 0, 0);
}
static int action_ok_pl_content_thumbnails(const char *path, static int action_ok_pl_content_thumbnails(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx) const char *label, unsigned type, size_t idx, size_t entry_idx)
{ {
@ -6666,6 +6686,9 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_CORE_DELETE: case MENU_ENUM_LABEL_CORE_DELETE:
BIND_ACTION_OK(cbs, action_ok_core_delete); BIND_ACTION_OK(cbs, action_ok_core_delete);
break; break;
case MENU_ENUM_LABEL_DELETE_PLAYLIST:
BIND_ACTION_OK(cbs, action_ok_delete_playlist);
break;
case MENU_ENUM_LABEL_ACHIEVEMENT_PAUSE: case MENU_ENUM_LABEL_ACHIEVEMENT_PAUSE:
case MENU_ENUM_LABEL_ACHIEVEMENT_RESUME: case MENU_ENUM_LABEL_ACHIEVEMENT_RESUME:
BIND_ACTION_OK(cbs, action_ok_cheevos_toggle_hardcore_mode); BIND_ACTION_OK(cbs, action_ok_cheevos_toggle_hardcore_mode);

View File

@ -221,6 +221,7 @@ menu_texture_item ozone_entries_icon_get_texture(ozone_handle_t *ozone,
case MENU_ENUM_LABEL_REMAP_FILE_REMOVE_GAME: case MENU_ENUM_LABEL_REMAP_FILE_REMOVE_GAME:
case MENU_ENUM_LABEL_REMAP_FILE_REMOVE_CONTENT_DIR: case MENU_ENUM_LABEL_REMAP_FILE_REMOVE_CONTENT_DIR:
case MENU_ENUM_LABEL_CORE_DELETE: case MENU_ENUM_LABEL_CORE_DELETE:
case MENU_ENUM_LABEL_DELETE_PLAYLIST:
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_CLOSE]; return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_CLOSE];
case MENU_ENUM_LABEL_ONSCREEN_DISPLAY_SETTINGS: case MENU_ENUM_LABEL_ONSCREEN_DISPLAY_SETTINGS:
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_OSD]; return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_OSD];

View File

@ -2518,6 +2518,7 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb,
case MENU_ENUM_LABEL_REMAP_FILE_REMOVE_GAME: case MENU_ENUM_LABEL_REMAP_FILE_REMOVE_GAME:
case MENU_ENUM_LABEL_REMAP_FILE_REMOVE_CONTENT_DIR: case MENU_ENUM_LABEL_REMAP_FILE_REMOVE_CONTENT_DIR:
case MENU_ENUM_LABEL_CORE_DELETE: case MENU_ENUM_LABEL_CORE_DELETE:
case MENU_ENUM_LABEL_DELETE_PLAYLIST:
return xmb->textures.list[XMB_TEXTURE_CLOSE]; return xmb->textures.list[XMB_TEXTURE_CLOSE];
case MENU_ENUM_LABEL_ONSCREEN_DISPLAY_SETTINGS: case MENU_ENUM_LABEL_ONSCREEN_DISPLAY_SETTINGS:
return xmb->textures.list[XMB_TEXTURE_OSD]; return xmb->textures.list[XMB_TEXTURE_OSD];

View File

@ -2840,6 +2840,12 @@ static bool menu_displaylist_parse_playlist_manager_settings(
/* TODO - Add: /* TODO - Add:
* - Remove invalid entries */ * - Remove invalid entries */
menu_entries_append_enum(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DELETE_PLAYLIST),
msg_hash_to_str(MENU_ENUM_LABEL_DELETE_PLAYLIST),
MENU_ENUM_LABEL_DELETE_PLAYLIST,
MENU_SETTING_ACTION_DELETE_PLAYLIST, 0, 0);
return true; return true;
} }

View File

@ -203,6 +203,7 @@ enum menu_settings_type
MENU_SET_CDROM_LIST, MENU_SET_CDROM_LIST,
MENU_SET_LOAD_CDROM_LIST, MENU_SET_LOAD_CDROM_LIST,
MENU_SET_CDROM_INFO, MENU_SET_CDROM_INFO,
MENU_SETTING_ACTION_DELETE_PLAYLIST,
MENU_SETTINGS_LAST MENU_SETTINGS_LAST
}; };

View File

@ -2599,6 +2599,7 @@ enum msg_hash_enums
MSG_DISC_DUMP_FAILED_TO_WRITE_TO_DISK, MSG_DISC_DUMP_FAILED_TO_WRITE_TO_DISK,
MSG_NO_DISC_INSERTED, MSG_NO_DISC_INSERTED,
MSG_INCOMPATIBLE_CORE_FOR_VIDEO_DRIVER, MSG_INCOMPATIBLE_CORE_FOR_VIDEO_DRIVER,
MENU_LABEL(DELETE_PLAYLIST),
MSG_LAST MSG_LAST
}; };