diff options
author | scott967 <scott967@users.noreply.github.com> | 2024-01-28 17:45:01 -1000 |
---|---|---|
committer | CrystalP <crystalp@kodi.tv> | 2024-02-11 13:20:49 -0500 |
commit | fc32508f76961c0ffe3c91fca5cf50e2e3882b6e (patch) | |
tree | b06a4d6d8e9a5c5278e7087d36599ef31f900b58 | |
parent | 6d5b46ba127eacd706610a91a32167abfbf8ac8e (diff) |
GUIInfo new VideoPlayer.VideoVersionName infolabel
Returns the Video Version Name for use in skins
clarify doxygen
-rw-r--r-- | xbmc/GUIInfoManager.cpp | 8 | ||||
-rw-r--r-- | xbmc/guilib/guiinfo/GUIInfoLabels.h | 1 | ||||
-rw-r--r-- | xbmc/guilib/guiinfo/VideoGUIInfo.cpp | 7 |
3 files changed, 13 insertions, 3 deletions
diff --git a/xbmc/GUIInfoManager.cpp b/xbmc/GUIInfoManager.cpp index cc47a0ffa3..d79795fbb2 100644 --- a/xbmc/GUIInfoManager.cpp +++ b/xbmc/GUIInfoManager.cpp @@ -3925,6 +3925,13 @@ const infomap musicplayer[] = {{ "title", MUSICPLAYER_TITLE }, /// @skinning_v20 **[New Infolabel]** \link VideoPlayer_HdrType `VideoPlayer.HdrType`\endlink /// <p> /// } +/// \table_row3{ <b>`VideoPlayer.VideoVersionName`</b>, +/// \anchor VideoPlayer_VideoVersionName +/// _string_, +/// @return String containing the version name of the currently playing video (movie) - empty if not a movie or movie version name not set +/// <p><hr> +/// @skinning_v21 **[New Infolabel]** \link VideoPlayer_VideoVersionName `VideoPlayer.VideoVersionName`\endlink +/// } /// \table_end /// /// ----------------------------------------------------------------------------- @@ -4001,6 +4008,7 @@ const infomap videoplayer[] = {{ "title", VIDEOPLAYER_TITLE }, { "audiostreamcount", VIDEOPLAYER_AUDIOSTREAMCOUNT }, { "hdrtype", VIDEOPLAYER_HDR_TYPE }, { "art", VIDEOPLAYER_ART}, + { "videoversionname", VIDEOPLAYER_VIDEOVERSION_NAME} }; // clang-format on diff --git a/xbmc/guilib/guiinfo/GUIInfoLabels.h b/xbmc/guilib/guiinfo/GUIInfoLabels.h index 7437bab269..487823fee4 100644 --- a/xbmc/guilib/guiinfo/GUIInfoLabels.h +++ b/xbmc/guilib/guiinfo/GUIInfoLabels.h @@ -277,6 +277,7 @@ #define VIDEOPLAYER_CAST_AND_ROLE 293 #define VIDEOPLAYER_UNIQUEID 294 #define VIDEOPLAYER_AUDIOSTREAMCOUNT 295 +#define VIDEOPLAYER_VIDEOVERSION_NAME 296 // Videoplayer infobools #define VIDEOPLAYER_HASSUBTITLES 300 diff --git a/xbmc/guilib/guiinfo/VideoGUIInfo.cpp b/xbmc/guilib/guiinfo/VideoGUIInfo.cpp index 2697539521..6906eb8819 100644 --- a/xbmc/guilib/guiinfo/VideoGUIInfo.cpp +++ b/xbmc/guilib/guiinfo/VideoGUIInfo.cpp @@ -319,6 +319,10 @@ bool CVideoGUIInfo::GetLabel(std::string& value, const CFileItem *item, int cont case LISTITEM_TAGLINE: value = tag->m_strTagLine; return true; + case VIDEOPLAYER_VIDEOVERSION_NAME: + case LISTITEM_VIDEOVERSION_NAME: + value = tag->GetAssetInfo().GetTitle(); + return true; case VIDEOPLAYER_LASTPLAYED: case LISTITEM_LASTPLAYED: { @@ -521,9 +525,6 @@ bool CVideoGUIInfo::GetLabel(std::string& value, const CFileItem *item, int cont case LISTITEM_VIDEO_HDR_TYPE: value = tag->m_streamDetails.GetVideoHdrType(); return true; - case LISTITEM_VIDEOVERSION_NAME: - value = tag->GetAssetInfo().GetTitle(); - return true; case LISTITEM_LABEL: { //! @todo get rid of "videos with versions as folder" hack! |