ozone: fix is_playlist, fix thumbnails display

This commit is contained in:
natinusala 2019-03-12 11:45:27 +01:00
parent 76d0b4ebd5
commit c1c71f35db
2 changed files with 27 additions and 18 deletions

View File

@ -737,7 +737,7 @@ void ozone_draw_thumbnail_bar(ozone_handle_t *ozone, video_frame_info_t *video_i
} }
/* Bottom row : "left" thumbnail or content metadata */ /* Bottom row : "left" thumbnail or content metadata */
if (left_thumbnail) if (thumbnail && left_thumbnail)
{ {
unsigned thumb_x_position = x_position + sidebar_width/2 - (ozone->dimensions.left_thumbnail_width + ozone->dimensions.sidebar_entry_icon_padding) / 2; unsigned thumb_x_position = x_position + sidebar_width/2 - (ozone->dimensions.left_thumbnail_width + ozone->dimensions.sidebar_entry_icon_padding) / 2;
unsigned thumb_y_position = video_info->height / 2 + ozone->dimensions.sidebar_entry_icon_padding / 2; unsigned thumb_y_position = video_info->height / 2 + ozone->dimensions.sidebar_entry_icon_padding / 2;

View File

@ -746,30 +746,39 @@ bool ozone_is_playlist(ozone_handle_t *ozone, bool depth)
{ {
bool is_playlist; bool is_playlist;
switch (ozone->categories_selection_ptr) if (ozone->categories_selection_ptr > ozone->system_tab_end)
{ {
case OZONE_SYSTEM_TAB_MAIN: is_playlist = true;
case OZONE_SYSTEM_TAB_SETTINGS: }
case OZONE_SYSTEM_TAB_ADD: else
is_playlist = false; {
break; switch (ozone->tabs[ozone->categories_selection_ptr])
case OZONE_SYSTEM_TAB_HISTORY: {
case OZONE_SYSTEM_TAB_FAVORITES: case OZONE_SYSTEM_TAB_MAIN:
case OZONE_SYSTEM_TAB_MUSIC: case OZONE_SYSTEM_TAB_SETTINGS:
case OZONE_SYSTEM_TAB_ADD:
#ifdef HAVE_NETWORKING
case OZONE_SYSTEM_TAB_NETPLAY:
#endif
is_playlist = false;
break;
case OZONE_SYSTEM_TAB_HISTORY:
case OZONE_SYSTEM_TAB_FAVORITES:
case OZONE_SYSTEM_TAB_MUSIC:
#if defined(HAVE_FFMPEG) || defined(HAVE_MPV) #if defined(HAVE_FFMPEG) || defined(HAVE_MPV)
case OZONE_SYSTEM_TAB_VIDEO: case OZONE_SYSTEM_TAB_VIDEO:
#endif #endif
#ifdef HAVE_IMAGEVIEWER #ifdef HAVE_IMAGEVIEWER
case OZONE_SYSTEM_TAB_IMAGES: case OZONE_SYSTEM_TAB_IMAGES:
#endif #endif
#ifdef HAVE_NETWORKING default:
case OZONE_SYSTEM_TAB_NETPLAY: is_playlist = true;
#endif break;
default: }
is_playlist = true;
break;
} }
if (depth) if (depth)
return is_playlist && ozone->depth == 1; return is_playlist && ozone->depth == 1;