diff options
author | Alasdair Campbell <alcoheca@gmail.com> | 2012-10-07 10:46:54 +0100 |
---|---|---|
committer | Alasdair Campbell <alcoheca@gmail.com> | 2012-10-11 02:26:29 +0100 |
commit | cd59b5e0061d60048a3e0bc7cf4c867049fb0520 (patch) | |
tree | 0931bfe145c172cebff013fcffcc883eda459828 /lib | |
parent | be986fac92d84ee4ae904a9f5d4564f4493b1c64 (diff) |
Platinum: use PersonRole for directors. Also fixes ::FromDidl for authors,
actors, directors - previously duplicate entries were present
Diffstat (limited to 'lib')
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 f6eaf1486f..c50d450913 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 214f13d00d..64437d21fd 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>"; @@ -489,15 +494,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, "actors", 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 8261244b81..84704b150a 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; |