summaryrefslogtreecommitdiffstats
path: root/lib/libUPnP/patches/0010-platinum-use-PersonRole-for-directors.-Also-fixes-Fr.patch
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libUPnP/patches/0010-platinum-use-PersonRole-for-directors.-Also-fixes-Fr.patch')
-rw-r--r--lib/libUPnP/patches/0010-platinum-use-PersonRole-for-directors.-Also-fixes-Fr.patch129
1 files changed, 129 insertions, 0 deletions
diff --git a/lib/libUPnP/patches/0010-platinum-use-PersonRole-for-directors.-Also-fixes-Fr.patch b/lib/libUPnP/patches/0010-platinum-use-PersonRole-for-directors.-Also-fixes-Fr.patch
new file mode 100644
index 0000000..76da427
--- /dev/null
+++ b/lib/libUPnP/patches/0010-platinum-use-PersonRole-for-directors.-Also-fixes-Fr.patch
@@ -0,0 +1,129 @@
+From 501fb90b02537c45837526677220c67b8d8eb3f3 Mon Sep 17 00:00:00 2001
+From: Alasdair Campbell <alcoheca@gmail.com>
+Date: Sun, 7 Oct 2012 10:46:54 +0100
+Subject: [PATCH 10/24] platinum: use PersonRole for directors. Also fixes
+ ::FromDidl for authors, actors, directors -
+ previously duplicate entries were present
+
+---
+ .../Platinum/Source/Devices/MediaServer/PltDidl.h | 40 ++++++++++++----------
+ .../Source/Devices/MediaServer/PltMediaItem.cpp | 12 +++++++
+ .../Source/Devices/MediaServer/PltMediaItem.h | 2 +-
+ 3 files changed, 34 insertions(+), 20 deletions(-)
+
+diff --git a/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltDidl.h b/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltDidl.h
+index f6eaf14..c50d450 100644
+--- a/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltDidl.h
++++ b/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltDidl.h
+@@ -61,28 +61,29 @@
+ #define PLT_FILTER_MASK_ORIGINALTRACK 0x00000100
+ #define PLT_FILTER_MASK_ACTOR 0x00000200
+ #define PLT_FILTER_MASK_AUTHOR 0x00000400
+-#define PLT_FILTER_MASK_DATE 0x00000800
+-#define PLT_FILTER_MASK_PROGRAMTITLE 0x00001000
+-#define PLT_FILTER_MASK_SERIESTITLE 0x00002000
+-#define PLT_FILTER_MASK_EPISODE 0x00004000
+-#define PLT_FILTER_MASK_TITLE 0x00008000
++#define PLT_FILTER_MASK_DIRECTOR 0x00000800
++#define PLT_FILTER_MASK_DATE 0x00001000
++#define PLT_FILTER_MASK_PROGRAMTITLE 0x00002000
++#define PLT_FILTER_MASK_SERIESTITLE 0x00004000
++#define PLT_FILTER_MASK_EPISODE 0x00008000
++#define PLT_FILTER_MASK_TITLE 0x00010000
+
+-#define PLT_FILTER_MASK_RES 0x00010000
+-#define PLT_FILTER_MASK_RES_DURATION 0x00020000
+-#define PLT_FILTER_MASK_RES_SIZE 0x00040000
+-#define PLT_FILTER_MASK_RES_PROTECTION 0x00080000
+-#define PLT_FILTER_MASK_RES_RESOLUTION 0x00100000
+-#define PLT_FILTER_MASK_RES_BITRATE 0x00200000
+-#define PLT_FILTER_MASK_RES_BITSPERSAMPLE 0x00400000
+-#define PLT_FILTER_MASK_RES_NRAUDIOCHANNELS 0x00800000
+-#define PLT_FILTER_MASK_RES_SAMPLEFREQUENCY 0x01000000
++#define PLT_FILTER_MASK_RES 0x00020000
++#define PLT_FILTER_MASK_RES_DURATION 0x00040000
++#define PLT_FILTER_MASK_RES_SIZE 0x00080000
++#define PLT_FILTER_MASK_RES_PROTECTION 0x00100000
++#define PLT_FILTER_MASK_RES_RESOLUTION 0x00200000
++#define PLT_FILTER_MASK_RES_BITRATE 0x00400000
++#define PLT_FILTER_MASK_RES_BITSPERSAMPLE 0x00800000
++#define PLT_FILTER_MASK_RES_NRAUDIOCHANNELS 0x01000000
++#define PLT_FILTER_MASK_RES_SAMPLEFREQUENCY 0x02000000
+
+-#define PLT_FILTER_MASK_LONGDESCRIPTION 0x02000000
+-#define PLT_FILTER_MASK_ICON 0x04000000
++#define PLT_FILTER_MASK_LONGDESCRIPTION 0x04000000
++#define PLT_FILTER_MASK_ICON 0x08000000
+
+-#define PLT_FILTER_MASK_TOC 0x02000000
+-#define PLT_FILTER_MASK_SEARCHCLASS 0x04000000
+-#define PLT_FILTER_MASK_REFID 0x08000000
++#define PLT_FILTER_MASK_TOC 0x10000000
++#define PLT_FILTER_MASK_SEARCHCLASS 0x20000000
++#define PLT_FILTER_MASK_REFID 0x40000000
+
+ #define PLT_FILTER_FIELD_TITLE "dc:title"
+ #define PLT_FILTER_FIELD_CREATOR "dc:creator"
+@@ -90,6 +91,7 @@
+ #define PLT_FILTER_FIELD_ARTIST "upnp:artist"
+ #define PLT_FILTER_FIELD_ACTOR "upnp:actor"
+ #define PLT_FILTER_FIELD_AUTHOR "upnp:author"
++#define PLT_FILTER_FIELD_DIRECTOR "upnp:director"
+ #define PLT_FILTER_FIELD_ALBUM "upnp:album"
+ #define PLT_FILTER_FIELD_GENRE "upnp:genre"
+ #define PLT_FILTER_FIELD_ALBUMARTURI "upnp:albumArtURI"
+diff --git a/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltMediaItem.cpp b/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltMediaItem.cpp
+index 3ec7696..d46d1a5 100644
+--- a/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltMediaItem.cpp
++++ b/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltMediaItem.cpp
+@@ -253,6 +253,11 @@ PLT_MediaObject::ToDidl(NPT_UInt32 mask, NPT_String& didl)
+ m_People.authors.ToDidl(didl, "author");
+ }
+
++ // director
++ if (mask & PLT_FILTER_MASK_DIRECTOR) {
++ m_People.directors.ToDidl(didl, "director");
++ }
++
+ // album
+ if ((mask & PLT_FILTER_MASK_ALBUM) && !m_Affiliation.album.IsEmpty()) {
+ didl += "<upnp:album>";
+@@ -488,15 +493,22 @@ PLT_MediaObject::FromDidl(NPT_XmlElementNode* entry)
+ m_Title = m_Title.SubString(0, 256);
+ m_ObjectClass.type = m_ObjectClass.type.SubString(0, 256);
+
++ children.Clear();
+ PLT_XmlHelper::GetChildren(entry, children, "artist", didl_namespace_upnp);
+ m_People.artists.FromDidl(children);
+
++ children.Clear();
+ PLT_XmlHelper::GetChildren(entry, children, "author", didl_namespace_upnp);
+ m_People.authors.FromDidl(children);
+
++ children.Clear();
+ PLT_XmlHelper::GetChildren(entry, children, "actor", didl_namespace_upnp);
+ m_People.actors.FromDidl(children);
+
++ children.Clear();
++ PLT_XmlHelper::GetChildren(entry, children, "director", didl_namespace_upnp);
++ m_People.directors.FromDidl(children);
++
+ PLT_XmlHelper::GetChildText(entry, "album", m_Affiliation.album, didl_namespace_upnp, 256);
+ PLT_XmlHelper::GetChildText(entry, "programTitle", m_Recorded.program_title, didl_namespace_upnp);
+ PLT_XmlHelper::GetChildText(entry, "seriesTitle", m_Recorded.series_title, didl_namespace_upnp);
+diff --git a/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltMediaItem.h b/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltMediaItem.h
+index cc3bdf9..fe04f34 100644
+--- a/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltMediaItem.h
++++ b/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltMediaItem.h
+@@ -91,7 +91,7 @@ typedef struct {
+ PLT_PersonRoles actors;
+ PLT_PersonRoles authors;
+ NPT_String producer; //TODO: can be multiple
+- NPT_String director; //TODO: can be multiple
++ PLT_PersonRoles directors;
+ NPT_String publisher; //TODO: can be multiple
+ NPT_String contributor; // should match m_Creator (dc:creator) //TODO: can be multiple
+ } PLT_PeopleInfo;
+--
+1.7.11.msysgit.0
+