diff -Nru kodi-18.0+git20180830.0202-99a8371/BUILDDATE kodi-18.0+git20180831.0202-af7276c/BUILDDATE --- kodi-18.0+git20180830.0202-99a8371/BUILDDATE 2018-08-30 00:02:17.000000000 +0000 +++ kodi-18.0+git20180831.0202-af7276c/BUILDDATE 2018-08-31 00:02:03.000000000 +0000 @@ -1 +1 @@ -20180830 +20180831 diff -Nru kodi-18.0+git20180830.0202-99a8371/debian/changelog kodi-18.0+git20180831.0202-af7276c/debian/changelog --- kodi-18.0+git20180830.0202-99a8371/debian/changelog 2018-08-30 00:03:06.000000000 +0000 +++ kodi-18.0+git20180831.0202-af7276c/debian/changelog 2018-08-31 00:02:54.000000000 +0000 @@ -1,4 +1,32 @@ -kodi (2:18.0+git20180830.0202-99a8371-0bionic) bionic; urgency=high +kodi (2:18.0+git20180831.0202-af7276c-0bionic) bionic; urgency=high + + [ace20022] + * [bluray] modernize casts in DVDInputStreamBluray.cpp. + + [ace20022] + * [bluray] Simple menu: Don't show unplayable item dialog if the simple menu gets closed/aborted. + + [ace20022] + * [bluray] Simple menu: Don't show menu entry if menu isn't supported. + + [ace20022] + * [bluray] Introduce FreeTitleInfo function. + + [ace20022] + * [bluray] Refactor GetStreamInfo(...). + + [ace20022] + * [bluray] Directly store the current BLURAY_CLIP_INFO pointer instead of it's id. + + [Kai Sommerfeld] + * [guiinfo] Fix String.IsEqual if second parameter is a listitem in a given container. + + [ace20022] + * [bluray] Make log message more informative if selection of a playlist fails. + + [mglae] + * [cmake] libdvd wrapper: make sure the correct nm binary is used + [Mário Franco] * Updated estuary skin to show epg image on Dialog Channel Guide diff -Nru kodi-18.0+git20180830.0202-99a8371/debian/changelog.tmp kodi-18.0+git20180831.0202-af7276c/debian/changelog.tmp --- kodi-18.0+git20180830.0202-99a8371/debian/changelog.tmp 2018-08-30 00:03:06.000000000 +0000 +++ kodi-18.0+git20180831.0202-af7276c/debian/changelog.tmp 2018-08-31 00:02:54.000000000 +0000 @@ -1,4 +1,32 @@ -kodi (2:18.0+git20180830.0202-99a8371-0dist) dist; urgency=high +kodi (2:18.0+git20180831.0202-af7276c-0dist) dist; urgency=high + + [ace20022] + * [bluray] modernize casts in DVDInputStreamBluray.cpp. + + [ace20022] + * [bluray] Simple menu: Don't show unplayable item dialog if the simple menu gets closed/aborted. + + [ace20022] + * [bluray] Simple menu: Don't show menu entry if menu isn't supported. + + [ace20022] + * [bluray] Introduce FreeTitleInfo function. + + [ace20022] + * [bluray] Refactor GetStreamInfo(...). + + [ace20022] + * [bluray] Directly store the current BLURAY_CLIP_INFO pointer instead of it's id. + + [Kai Sommerfeld] + * [guiinfo] Fix String.IsEqual if second parameter is a listitem in a given container. + + [ace20022] + * [bluray] Make log message more informative if selection of a playlist fails. + + [mglae] + * [cmake] libdvd wrapper: make sure the correct nm binary is used + [Mário Franco] * Updated estuary skin to show epg image on Dialog Channel Guide diff -Nru kodi-18.0+git20180830.0202-99a8371/debian/changelog.tmp.old kodi-18.0+git20180831.0202-af7276c/debian/changelog.tmp.old --- kodi-18.0+git20180830.0202-99a8371/debian/changelog.tmp.old 2018-08-30 00:02:17.000000000 +0000 +++ kodi-18.0+git20180831.0202-af7276c/debian/changelog.tmp.old 2018-08-31 00:02:03.000000000 +0000 @@ -1,6 +1,37 @@ kodi (2:18.0+git20180719.0202-3231481-0dist) dist; urgency=high [Mário Franco] + * Updated estuary skin to show epg image on Dialog Channel Guide + + [Mario Franco] + * Added PVR.EpgEventIcon guiinfo label + + [DaveTBlake] + * Several item type related fixes. Fix "information" context menu visibility on Years node, hang after shortcut key press on some items, and avoid art lookup for wrong item type. + + [ace20022] + * [videoplayer] Reduce the number of GetSubtitle() calls a bit. + + [mglae] + * PythonInvoker: fix thread termination check + + [popcornmix] + * RBP: Use default resampling setting on Pi2 + + [popcornmix] + * RPB: Request GPU allocation are pre-pinned + + [popcornmix] + * PiSink: Treat default as HDMI + + [popcornmix] + * MMALCodec: Fail to open when width is invalid. Can happen with mpegts files + + [popcornmix] + * MMALCodec: Clear eos flag when drain is no longer true + + + [Mário Franco] * Added new api EpgEventIcon for ListItem (#14361) [Rechi] diff -Nru kodi-18.0+git20180830.0202-99a8371/VERSION kodi-18.0+git20180831.0202-af7276c/VERSION --- kodi-18.0+git20180830.0202-99a8371/VERSION 2018-08-30 00:02:17.000000000 +0000 +++ kodi-18.0+git20180831.0202-af7276c/VERSION 2018-08-31 00:02:03.000000000 +0000 @@ -1 +1 @@ -99a8371 +af7276c diff -Nru kodi-18.0+git20180830.0202-99a8371/xbmc/Application.cpp kodi-18.0+git20180831.0202-af7276c/xbmc/Application.cpp --- kodi-18.0+git20180830.0202-99a8371/xbmc/Application.cpp 2018-08-26 13:40:15.000000000 +0000 +++ kodi-18.0+git20180831.0202-af7276c/xbmc/Application.cpp 2018-08-31 00:01:49.000000000 +0000 @@ -3155,7 +3155,7 @@ { //check if we must show the simplified bd menu if (!CGUIDialogSimpleMenu::ShowPlaySelection(item)) - return false; + return true; } // this really aught to be inside !bRestart, but since PlayStack diff -Nru kodi-18.0+git20180830.0202-99a8371/xbmc/cores/DllLoader/exports/CMakeLists.txt kodi-18.0+git20180831.0202-af7276c/xbmc/cores/DllLoader/exports/CMakeLists.txt --- kodi-18.0+git20180830.0202-99a8371/xbmc/cores/DllLoader/exports/CMakeLists.txt 2018-05-01 00:00:24.000000000 +0000 +++ kodi-18.0+git20180831.0202-af7276c/xbmc/cores/DllLoader/exports/CMakeLists.txt 2018-08-31 00:01:49.000000000 +0000 @@ -16,7 +16,7 @@ add_options(C ALL_BUILDS "-fPIC") add_library(wrapper OBJECT wrapper.c) - add_custom_target(wrapper.def ALL nm ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/wrapper.dir/wrapper.c.o | grep __wrap | awk '{ printf(\"%s \", \$\$3) }' | sed \"s/___wrap_/__wrap_/g\" | sed \"s/__wrap_/-Wl,-wrap,/g\" > wrapper.def) + add_custom_target(wrapper.def ALL ${CMAKE_NM} ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/wrapper.dir/wrapper.c.o | grep __wrap | awk '{ printf(\"%s \", \$\$3) }' | sed \"s/___wrap_/__wrap_/g\" | sed \"s/__wrap_/-Wl,-wrap,/g\" > wrapper.def && test -s wrapper.def) if(CORE_SYSTEM_NAME STREQUAL android) add_custom_command(TARGET wrapper.def COMMAND echo \"-L${DEPENDS_PATH}/lib/dummy-lib${APP_NAME_LC} -l${APP_NAME_LC}\" >> wrapper.def) diff -Nru kodi-18.0+git20180830.0202-99a8371/xbmc/cores/VideoPlayer/DVDInputStreams/DVDInputStreamBluray.cpp kodi-18.0+git20180831.0202-af7276c/xbmc/cores/VideoPlayer/DVDInputStreams/DVDInputStreamBluray.cpp --- kodi-18.0+git20180830.0202-99a8371/xbmc/cores/VideoPlayer/DVDInputStreams/DVDInputStreamBluray.cpp 2018-08-26 13:40:15.000000000 +0000 +++ kodi-18.0+git20180831.0202-af7276c/xbmc/cores/VideoPlayer/DVDInputStreams/DVDInputStreamBluray.cpp 2018-08-31 00:01:49.000000000 +0000 @@ -254,7 +254,7 @@ CLog::Log(LOGDEBUG, "CDVDInputStreamBluray::Open - libbdplus detected : %d", disc_info->libbdplus_detected); CLog::Log(LOGDEBUG, "CDVDInputStreamBluray::Open - BD+ handled : %d", disc_info->bdplus_handled); #if (BLURAY_VERSION >= BLURAY_VERSION_CODE(1,0,0)) - CLog::Log(LOGDEBUG, "CDVDInputStreamBluray::Open - no menus (libmmbd) : %d", disc_info->no_menu_support); + CLog::Log(LOGDEBUG, "CDVDInputStreamBluray::Open - no menus (libmmbd, or profile 6 bdj) : %d", disc_info->no_menu_support); #endif } else @@ -325,12 +325,12 @@ return false; } - if(bd_select_playlist(m_bd, m_title->playlist) == 0 ) + if(!bd_select_playlist(m_bd, m_title->playlist)) { - CLog::Log(LOGERROR, "CDVDInputStreamBluray::Open - failed to select title %d", m_title->idx); + CLog::Log(LOGERROR, "CDVDInputStreamBluray::Open - failed to select playlist %d", m_title->idx); return false; } - m_clip = 0; + m_clip = nullptr; } // Process any events that occurred during opening @@ -343,19 +343,28 @@ // close file and reset everything void CDVDInputStreamBluray::Close() { - if(m_title) - bd_free_title_info(m_title); + FreeTitleInfo(); + if(m_bd) { bd_register_overlay_proc(m_bd, nullptr, nullptr); bd_close(m_bd); } + m_bd = nullptr; - m_title = nullptr; m_pstream.reset(); m_rootPath.clear(); } +void CDVDInputStreamBluray::FreeTitleInfo() +{ + if (m_title) + bd_free_title_info(m_title); + + m_title = nullptr; + m_clip = nullptr; +} + void CDVDInputStreamBluray::ProcessEvent() { int pid = -1; @@ -428,8 +437,7 @@ if (m_playlist <= MAX_PLAYLIST_ID) { - if(m_title) - bd_free_title_info(m_title); + FreeTitleInfo(); m_title = bd_get_playlist_info(m_bd, m_playlist, m_angle); } break; @@ -438,9 +446,7 @@ CLog::Log(LOGDEBUG, "CDVDInputStreamBluray - BD_EVENT_END_OF_TITLE %d", m_event.param); /* when a title ends, playlist WILL eventually change */ - if (m_title) - bd_free_title_info(m_title); - m_title = nullptr; + FreeTitleInfo(); break; case BD_EVENT_TITLE: @@ -452,51 +458,41 @@ CLog::Log(LOGDEBUG, "CDVDInputStreamBluray - BD_EVENT_PLAYLIST %d", m_event.param); m_playlist = m_event.param; - if(m_title) - bd_free_title_info(m_title); + FreeTitleInfo(); m_title = bd_get_playlist_info(m_bd, m_playlist, m_angle); break; case BD_EVENT_PLAYITEM: - CLog::Log(LOGDEBUG, "CDVDInputStreamBluray - BD_EVENT_PLAYITEM %d", - m_event.param); - m_clip = m_event.param; + CLog::Log(LOGDEBUG, "CDVDInputStreamBluray - BD_EVENT_PLAYITEM %d", m_event.param); + if (m_title && m_event.param < m_title->clip_count) + m_clip = &m_title->clips[m_event.param]; break; case BD_EVENT_CHAPTER: - CLog::Log(LOGDEBUG, "CDVDInputStreamBluray - BD_EVENT_CHAPTER %d", - m_event.param); + CLog::Log(LOGDEBUG, "CDVDInputStreamBluray - BD_EVENT_CHAPTER %d", m_event.param); break; /* stream selection */ case BD_EVENT_AUDIO_STREAM: pid = -1; - if (m_title && m_title->clip_count > m_clip - && m_title->clips[m_clip].audio_stream_count - > (uint8_t) (m_event.param - 1)) - pid = m_title->clips[m_clip].audio_streams[m_event.param - 1].pid; - CLog::Log(LOGDEBUG, "CDVDInputStreamBluray - BD_EVENT_AUDIO_STREAM %d %d", - m_event.param, pid); + if (m_title && m_clip && static_cast(m_clip->audio_stream_count) > (m_event.param - 1)) + pid = m_clip->audio_streams[m_event.param - 1].pid; + CLog::Log(LOGDEBUG, "CDVDInputStreamBluray - BD_EVENT_AUDIO_STREAM %d %d", m_event.param, pid); m_player->OnDiscNavResult(static_cast(&pid), BD_EVENT_AUDIO_STREAM); break; case BD_EVENT_PG_TEXTST: - CLog::Log(LOGDEBUG, "CDVDInputStreamBluray - BD_EVENT_PG_TEXTST %d", - m_event.param); + CLog::Log(LOGDEBUG, "CDVDInputStreamBluray - BD_EVENT_PG_TEXTST %d", m_event.param); pid = m_event.param; m_player->OnDiscNavResult(static_cast(&pid), BD_EVENT_PG_TEXTST); break; case BD_EVENT_PG_TEXTST_STREAM: pid = -1; - if (m_title && m_title->clip_count > m_clip - && m_title->clips[m_clip].pg_stream_count - > (uint8_t) (m_event.param - 1)) - pid = m_title->clips[m_clip].pg_streams[m_event.param - 1].pid; - CLog::Log(LOGDEBUG, - "CDVDInputStreamBluray - BD_EVENT_PG_TEXTST_STREAM %d, %d", - m_event.param, pid); + if (m_title && m_clip && static_cast(m_clip->pg_stream_count) > (m_event.param - 1)) + pid = m_clip->pg_streams[m_event.param - 1].pid; + CLog::Log(LOGDEBUG, "CDVDInputStreamBluray - BD_EVENT_PG_TEXTST_STREAM %d, %d", m_event.param, pid); m_player->OnDiscNavResult(static_cast(&pid), BD_EVENT_PG_TEXTST_STREAM); break; @@ -555,7 +551,7 @@ int CDVDInputStreamBluray::Read(uint8_t* buf, int buf_size) { int result = 0; - m_dispTimeBeforeRead = (int)(bd_tell_time(m_bd) / 90); + m_dispTimeBeforeRead = static_cast((bd_tell_time(m_bd) / 90)); if(m_navmode) { do { @@ -619,7 +615,7 @@ static uint8_t clamp(double v) { - return (v) > 255.0 ? 255 : ((v) < 0.0 ? 0 : (uint8_t)(v+0.5f)); + return (v) > 255.0 ? 255 : ((v) < 0.0 ? 0 : static_cast((v+0.5f))); } static uint32_t build_rgba(const BD_PG_PALETTE_ENTRY &e) @@ -627,10 +623,10 @@ double r = 1.164 * (e.Y - 16) + 1.596 * (e.Cr - 128); double g = 1.164 * (e.Y - 16) - 0.391 * (e.Cb - 128) - 0.813 * (e.Cr - 128); double b = 1.164 * (e.Y - 16) + 2.018 * (e.Cb - 128); - return (uint32_t)e.T << PIXEL_ASHIFT - | (uint32_t)clamp(r) << PIXEL_RSHIFT - | (uint32_t)clamp(g) << PIXEL_GSHIFT - | (uint32_t)clamp(b) << PIXEL_BSHIFT; + return static_cast(e.T) << PIXEL_ASHIFT + | static_cast(clamp(r)) << PIXEL_RSHIFT + | static_cast(clamp(g)) << PIXEL_GSHIFT + | static_cast(clamp(b)) << PIXEL_BSHIFT; } void CDVDInputStreamBluray::OverlayClose() @@ -702,7 +698,7 @@ #if(BD_OVERLAY_INTERFACE_VERSION >= 2) CDVDOverlayGroup* group = new CDVDOverlayGroup(); group->bForced = true; - group->iPTSStartTime = (double) pts; + group->iPTSStartTime = static_cast(pts); group->iPTSStopTime = 0; for(unsigned i = 0; i < 2; ++i) @@ -758,14 +754,14 @@ if (ov->palette) { overlay->palette_colors = 256; - overlay->palette = (uint32_t*)calloc(overlay->palette_colors, 4); + overlay->palette = reinterpret_cast(calloc(overlay->palette_colors, 4)); for(unsigned i = 0; i < 256; i++) overlay->palette[i] = build_rgba(ov->palette[i]); } const BD_PG_RLE_ELEM *rlep = ov->img; - uint8_t *img = (uint8_t*) malloc((size_t)ov->w * (size_t)ov->h); + uint8_t *img = reinterpret_cast(malloc(static_cast(ov->w) * static_cast(ov->h))); if (!img) return; unsigned pixels = ov->w * ov->h; @@ -824,8 +820,8 @@ overlay->palette_colors = 0; overlay->palette = nullptr; - unsigned bytes = ov->stride * ov->h * 4; - uint8_t *img = (uint8_t*) malloc(bytes); + size_t bytes = static_cast(ov->stride * ov->h * 4); + uint8_t *img = reinterpret_cast(malloc(bytes)); memcpy(img, ov->argb, bytes); overlay->data = img; @@ -848,7 +844,7 @@ int CDVDInputStreamBluray::GetTotalTime() { if(m_title) - return (int)(m_title->duration / 90); + return static_cast(m_title->duration / 90); else return 0; } @@ -872,7 +868,7 @@ int CDVDInputStreamBluray::GetChapterCount() { if(m_title) - return m_title->chapter_count; + return static_cast(m_title->chapter_count); else return 0; } @@ -880,7 +876,7 @@ int CDVDInputStreamBluray::GetChapter() { if(m_title) - return bd_get_current_chapter(m_bd) + 1; + return static_cast(bd_get_current_chapter(m_bd) + 1); else return 0; } @@ -944,7 +940,7 @@ int64_t CDVDInputStreamBluray::GetLength() { - return bd_get_title_size(m_bd); + return static_cast(bd_get_title_size(m_bd)); } static bool find_stream(int pid, BLURAY_STREAM_INFO *info, int count, std::string &language) @@ -952,7 +948,7 @@ int i=0; for(;ipid == pid) + if(info->pid == static_cast(pid)) break; } if(i==count) @@ -963,19 +959,17 @@ void CDVDInputStreamBluray::GetStreamInfo(int pid, std::string &language) { - if(!m_title || m_clip >= m_title->clip_count) + if(!m_title || !m_clip) return; - BLURAY_CLIP_INFO *clip = m_title->clips+m_clip; - - if(find_stream(pid, clip->audio_streams, clip->audio_stream_count, language)) - return; - if(find_stream(pid, clip->video_streams, clip->video_stream_count, language)) - return; - if(find_stream(pid, clip->pg_streams, clip->pg_stream_count, language)) - return; - if(find_stream(pid, clip->ig_streams, clip->ig_stream_count, language)) - return; + if (pid == HDMV_PID_VIDEO) + find_stream(pid, m_clip->video_streams, m_clip->video_stream_count, language); + else if (HDMV_PID_AUDIO_FIRST <= pid && pid <= HDMV_PID_AUDIO_LAST) + find_stream(pid, m_clip->audio_streams, m_clip->audio_stream_count, language); + else if (HDMV_PID_PG_FIRST <= pid && pid <= HDMV_PID_PG_LAST) + find_stream(pid, m_clip->pg_streams, m_clip->pg_stream_count, language); + else if (HDMV_PID_IG_FIRST <= pid && pid <= HDMV_PID_IG_LAST) + find_stream(pid, m_clip->ig_streams, m_clip->ig_stream_count, language); } CDVDInputStream::ENextStream CDVDInputStreamBluray::NextStream() @@ -1020,7 +1014,7 @@ if (m_bd == nullptr || !m_navmode) return false; - if (bd_mouse_select(m_bd, -1, (uint16_t)point.x, (uint16_t)point.y) < 0) + if (bd_mouse_select(m_bd, -1, static_cast(point.x), static_cast(point.y)) < 0) { CLog::Log(LOGDEBUG, "CDVDInputStreamBluray::MouseMove - mouse select failed"); return false; @@ -1034,7 +1028,7 @@ if (m_bd == nullptr || !m_navmode) return false; - if (bd_mouse_select(m_bd, -1, (uint16_t)point.x, (uint16_t)point.y) < 0) + if (bd_mouse_select(m_bd, -1, static_cast(point.x), static_cast(point.y)) < 0) { CLog::Log(LOGDEBUG, "CDVDInputStreamBluray::MouseClick - mouse select failed"); return false; @@ -1107,7 +1101,7 @@ CLog::Log(LOGWARNING, "CDVDInputStreamBluray::Open - Blu-ray region must be set in setting, assuming region A"); region = BLURAY_REGION_A; } - bd_set_player_setting(m_bd, BLURAY_PLAYER_SETTING_REGION_CODE, region); + bd_set_player_setting(m_bd, BLURAY_PLAYER_SETTING_REGION_CODE, static_cast(region)); bd_set_player_setting(m_bd, BLURAY_PLAYER_SETTING_PARENTAL, 99); bd_set_player_setting(m_bd, BLURAY_PLAYER_SETTING_PLAYER_PROFILE, BLURAY_PLAYER_PROFILE_5_v2_4); bd_set_player_setting(m_bd, BLURAY_PLAYER_SETTING_3D_CAP, 0xffffffff); diff -Nru kodi-18.0+git20180830.0202-99a8371/xbmc/cores/VideoPlayer/DVDInputStreams/DVDInputStreamBluray.h kodi-18.0+git20180831.0202-af7276c/xbmc/cores/VideoPlayer/DVDInputStreams/DVDInputStreamBluray.h --- kodi-18.0+git20180830.0202-99a8371/xbmc/cores/VideoPlayer/DVDInputStreams/DVDInputStreamBluray.h 2018-08-26 13:40:15.000000000 +0000 +++ kodi-18.0+git20180831.0202-af7276c/xbmc/cores/VideoPlayer/DVDInputStreams/DVDInputStreamBluray.h 2018-08-31 00:01:49.000000000 +0000 @@ -28,6 +28,14 @@ #define BD_EVENT_MENU_ERROR -2 #define BD_EVENT_ENC_ERROR -3 +#define HDMV_PID_VIDEO 0x1011 +#define HDMV_PID_AUDIO_FIRST 0x1100 +#define HDMV_PID_AUDIO_LAST 0x111f +#define HDMV_PID_PG_FIRST 0x1200 +#define HDMV_PID_PG_LAST 0x121f +#define HDMV_PID_IG_FIRST 0x1400 +#define HDMV_PID_IG_LAST 0x141f + class CDVDOverlayImage; class IVideoPlayer; @@ -125,7 +133,7 @@ BLURAY* m_bd = nullptr; BLURAY_TITLE_INFO* m_title = nullptr; uint32_t m_playlist = MAX_PLAYLIST_ID + 1; - uint32_t m_clip = MAX_CLIP_ID + 1; + BLURAY_CLIP_INFO* m_clip = nullptr; uint32_t m_angle = 0; bool m_menu = false; bool m_navmode = false; @@ -158,6 +166,7 @@ private: bool OpenStream(CFileItem &item); void SetupPlayerSettings(); + void FreeTitleInfo(); std::unique_ptr m_pstream = nullptr; std::string m_rootPath; }; diff -Nru kodi-18.0+git20180830.0202-99a8371/xbmc/filesystem/BlurayDirectory.cpp kodi-18.0+git20180831.0202-af7276c/xbmc/filesystem/BlurayDirectory.cpp --- kodi-18.0+git20180830.0202-99a8371/xbmc/filesystem/BlurayDirectory.cpp 2018-08-26 13:40:15.000000000 +0000 +++ kodi-18.0+git20180831.0202-af7276c/xbmc/filesystem/BlurayDirectory.cpp 2018-08-31 00:01:49.000000000 +0000 @@ -191,6 +191,13 @@ item->SetIconImage("DefaultVideoPlaylists.png"); items.Add(item); + const BLURAY_DISC_INFO* disc_info = bd_get_disc_info(m_bd); + if (disc_info && disc_info->no_menu_support) + { + CLog::Log(LOGDEBUG, "CBlurayDirectory::GetRoot - no menu support, skipping menu entry"); + return; + } + path.SetFileName("menu"); item.reset(new CFileItem()); item->SetPath(path.Get()); diff -Nru kodi-18.0+git20180830.0202-99a8371/xbmc/GUIInfoManager.cpp kodi-18.0+git20180831.0202-af7276c/xbmc/GUIInfoManager.cpp --- kodi-18.0+git20180830.0202-99a8371/xbmc/GUIInfoManager.cpp 2018-08-30 00:01:51.000000000 +0000 +++ kodi-18.0+git20180831.0202-af7276c/xbmc/GUIInfoManager.cpp 2018-08-31 00:01:49.000000000 +0000 @@ -6614,7 +6614,22 @@ if (info.GetData2() < 0) // info labels are stored with negative numbers { int info2 = -info.GetData2(); - if (item && item->IsFileItem() && IsListItemInfo(info2)) + CGUIListItemPtr item2; + + if (IsListItemInfo(info2)) + { + int iResolvedInfo2 = ResolveMultiInfo(info2); + if (iResolvedInfo2 != 0) + { + const GUIINFO::CGUIInfo& resolvedInfo2 = m_multiInfo[iResolvedInfo2 - MULTI_INFO_START]; + if (resolvedInfo2.GetInfoFlag() & INFOFLAG_LISTITEM_CONTAINER) + item2 = GUIINFO::GetCurrentListItem(contextWindow, resolvedInfo2.GetData1()); // data1 contains the container id + } + } + + if (item2 && item2->IsFileItem()) + compare = GetItemImage(item2.get(), contextWindow, info2); + else if (item && item->IsFileItem()) compare = GetItemImage(item, contextWindow, info2); else compare = GetImage(info2, contextWindow); @@ -6873,6 +6888,20 @@ return id; } +int CGUIInfoManager::ResolveMultiInfo(int info) const +{ + int iLastInfo = 0; + + int iResolvedInfo = info; + while (iResolvedInfo >= MULTI_INFO_START && iResolvedInfo <= MULTI_INFO_END) + { + iLastInfo = iResolvedInfo; + iResolvedInfo = m_multiInfo[iResolvedInfo - MULTI_INFO_START].m_info; + } + + return iLastInfo; +} + bool CGUIInfoManager::IsListItemInfo(int info) const { int iResolvedInfo = info; diff -Nru kodi-18.0+git20180830.0202-99a8371/xbmc/GUIInfoManager.h kodi-18.0+git20180831.0202-af7276c/xbmc/GUIInfoManager.h --- kodi-18.0+git20180830.0202-99a8371/xbmc/GUIInfoManager.h 2018-07-31 18:47:38.000000000 +0000 +++ kodi-18.0+git20180831.0202-af7276c/xbmc/GUIInfoManager.h 2018-08-31 00:01:49.000000000 +0000 @@ -187,6 +187,7 @@ int AddMultiInfo(const KODI::GUILIB::GUIINFO::CGUIInfo &info); + int ResolveMultiInfo(int info) const; bool IsListItemInfo(int info) const; void SetCurrentSongTag(const MUSIC_INFO::CMusicInfoTag &tag);