diff options
Diffstat (limited to 'lib/libUPnP/patches/0011-platinum-support-video-ratings.patch')
-rw-r--r-- | lib/libUPnP/patches/0011-platinum-support-video-ratings.patch | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/lib/libUPnP/patches/0011-platinum-support-video-ratings.patch b/lib/libUPnP/patches/0011-platinum-support-video-ratings.patch new file mode 100644 index 0000000..c97d649 --- /dev/null +++ b/lib/libUPnP/patches/0011-platinum-support-video-ratings.patch @@ -0,0 +1,66 @@ +From a650caab79695b0caaef7b860ae59086a335bb30 Mon Sep 17 00:00:00 2001 +From: Alasdair Campbell <alcoheca@gmail.com> +Date: Sat, 6 Oct 2012 23:35:52 +0100 +Subject: [PATCH 11/24] platinum: support video ratings + +--- + lib/libUPnP/Platinum/Source/Devices/MediaServer/PltDidl.h | 8 +++++--- + lib/libUPnP/Platinum/Source/Devices/MediaServer/PltMediaItem.cpp | 8 ++++++++ + 2 files changed, 13 insertions(+), 3 deletions(-) + +diff --git a/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltDidl.h b/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltDidl.h +index c50d450..8d9704f 100644 +--- a/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltDidl.h ++++ b/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltDidl.h +@@ -80,10 +80,11 @@ + + #define PLT_FILTER_MASK_LONGDESCRIPTION 0x04000000 + #define PLT_FILTER_MASK_ICON 0x08000000 ++#define PLT_FILTER_MASK_RATING 0x10000000 + +-#define PLT_FILTER_MASK_TOC 0x10000000 +-#define PLT_FILTER_MASK_SEARCHCLASS 0x20000000 +-#define PLT_FILTER_MASK_REFID 0x40000000 ++#define PLT_FILTER_MASK_TOC 0x20000000 ++#define PLT_FILTER_MASK_SEARCHCLASS 0x40000000 ++#define PLT_FILTER_MASK_REFID 0x80000000 + + #define PLT_FILTER_FIELD_TITLE "dc:title" + #define PLT_FILTER_FIELD_CREATOR "dc:creator" +@@ -99,6 +100,7 @@ + #define PLT_FILTER_FIELD_DESCRIPTION "dc:description" + #define PLT_FILTER_FIELD_LONGDESCRIPTION "upnp:longDescription" + #define PLT_FILTER_FIELD_ICON "upnp:icon" ++#define PLT_FILTER_FIELD_RATING "upnp:rating" + #define PLT_FILTER_FIELD_ORIGINALTRACK "upnp:originalTrackNumber" + #define PLT_FILTER_FIELD_PROGRAMTITLE "upnp:programTitle" + #define PLT_FILTER_FIELD_SERIESTITLE "upnp:seriesTitle" +diff --git a/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltMediaItem.cpp b/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltMediaItem.cpp +index d46d1a5..3416112 100644 +--- a/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltMediaItem.cpp ++++ b/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltMediaItem.cpp +@@ -317,6 +317,13 @@ PLT_MediaObject::ToDidl(NPT_UInt32 mask, NPT_String& didl) + didl += "</upnp:icon>"; + } + ++ // rating ++ if ((mask & PLT_FILTER_MASK_RATING) && !m_Description.rating.IsEmpty()) { ++ didl += "<upnp:rating>"; ++ PLT_Didl::AppendXmlEscape(didl, m_Description.rating); ++ didl += "</upnp:rating>"; ++ } ++ + // original track number + if ((mask & PLT_FILTER_MASK_ORIGINALTRACK) && m_MiscInfo.original_track_number > 0) { + didl += "<upnp:originalTrackNumber>"; +@@ -528,6 +535,7 @@ PLT_MediaObject::FromDidl(NPT_XmlElementNode* entry) + PLT_XmlHelper::GetChildText(entry, "description", m_Description.description, didl_namespace_dc); + PLT_XmlHelper::GetChildText(entry, "longDescription", m_Description.long_description, didl_namespace_upnp); + PLT_XmlHelper::GetChildText(entry, "icon", m_Description.icon_uri, didl_namespace_upnp); ++ PLT_XmlHelper::GetChildText(entry, "rating", m_Description.rating, didl_namespace_upnp); + PLT_XmlHelper::GetChildText(entry, "toc", m_MiscInfo.toc, didl_namespace_upnp); + + // album arts +-- +1.7.11.msysgit.0 + |