aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/libUPnP/Platinum/Source/Devices/MediaServer/PltDidl.cpp2
-rw-r--r--lib/libUPnP/Platinum/Source/Devices/MediaServer/PltDidl.h2
-rw-r--r--lib/libUPnP/Platinum/Source/Devices/MediaServer/PltMediaItem.cpp10
-rw-r--r--lib/libUPnP/Platinum/Source/Devices/MediaServer/PltMediaItem.h1
-rw-r--r--lib/libUPnP/Platinum/Source/Devices/MediaServer/PltSyncMediaBrowser.h2
5 files changed, 16 insertions, 1 deletions
diff --git a/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltDidl.cpp b/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltDidl.cpp
index 2bb6a04139..7b853c8c9a 100644
--- a/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltDidl.cpp
+++ b/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltDidl.cpp
@@ -170,6 +170,8 @@ PLT_Didl::ConvertFilterToMask(const NPT_String& filter)
mask |= PLT_FILTER_MASK_XBMC_VOTES;
} else if (NPT_String::CompareN(s+i, PLT_FILTER_FIELD_XBMC_ARTWORK, len, true) == 0) {
mask |= PLT_FILTER_MASK_XBMC_ARTWORK;
+ } else if (NPT_String::CompareN(s+i, PLT_FILTER_FIELD_XBMC_UNIQUE_IDENTIFIER, len, true) == 0) {
+ mask |= PLT_FILTER_MASK_XBMC_UNIQUE_IDENTIFIER;
}
if (next_comma < 0) {
diff --git a/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltDidl.h b/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltDidl.h
index 9e87599955..fe1de45cde 100644
--- a/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltDidl.h
+++ b/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltDidl.h
@@ -99,6 +99,7 @@
#define PLT_FILTER_MASK_XBMC_RATING NPT_UINT64_C(0x0000200000000000)
#define PLT_FILTER_MASK_XBMC_VOTES NPT_UINT64_C(0x0000400000000000)
#define PLT_FILTER_MASK_XBMC_ARTWORK NPT_UINT64_C(0x0000800000000000)
+#define PLT_FILTER_MASK_XBMC_UNIQUE_IDENTIFIER NPT_UINT64_C(0x0001000000000000)
#define PLT_FILTER_FIELD_TITLE "dc:title"
#define PLT_FILTER_FIELD_CREATOR "dc:creator"
@@ -148,6 +149,7 @@
#define PLT_FILTER_FIELD_XBMC_RATING "xbmc:rating"
#define PLT_FILTER_FIELD_XBMC_VOTES "xbmc:votes"
#define PLT_FILTER_FIELD_XBMC_ARTWORK "xbmc:artwork"
+#define PLT_FILTER_FIELD_XBMC_UNIQUE_IDENTIFIER "xbmc:uniqueidentifier"
extern const char* didl_header;
extern const char* didl_footer;
diff --git a/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltMediaItem.cpp b/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltMediaItem.cpp
index 5c2ec8494a..4db2d45ebd 100644
--- a/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltMediaItem.cpp
+++ b/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltMediaItem.cpp
@@ -260,6 +260,7 @@ PLT_MediaObject::Reset()
m_XbmcInfo.rating = 0.0f;
m_XbmcInfo.votes = "";
m_XbmcInfo.artwork.Clear();
+ m_XbmcInfo.unique_identifier = "";
m_Didl = "";
@@ -559,6 +560,13 @@ PLT_MediaObject::ToDidl(NPT_UInt64 mask, NPT_String& didl)
m_XbmcInfo.artwork.ToDidl(didl, "artwork");
}
+ // xbmc unique identifier
+ if (mask & PLT_FILTER_MASK_XBMC_UNIQUE_IDENTIFIER && !m_XbmcInfo.unique_identifier.IsEmpty()) {
+ didl += "<xbmc:uniqueidentifier>";
+ PLT_Didl::AppendXmlEscape(didl, m_XbmcInfo.unique_identifier);
+ didl += "</xbmc:uniqueidentifier>";
+ }
+
// class is required
didl += "<upnp:class";
if (!m_ObjectClass.friendly_name.IsEmpty()) {
@@ -781,6 +789,8 @@ PLT_MediaObject::FromDidl(NPT_XmlElementNode* entry)
PLT_XmlHelper::GetChildren(entry, children, "artwork", didl_namespace_xbmc);
m_XbmcInfo.artwork.FromDidl(children);
+ PLT_XmlHelper::GetChildText(entry, "uniqueidentifier", m_XbmcInfo.unique_identifier, didl_namespace_xbmc, 256);
+
// re serialize the entry didl as a we might need to pass it to a renderer
// we may have modified the tree to "fix" issues, so as not to break a renderer
// (don't write xml prefix as this didl could be part of a larger document)
diff --git a/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltMediaItem.h b/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltMediaItem.h
index 56291a7062..deb4961436 100644
--- a/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltMediaItem.h
+++ b/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltMediaItem.h
@@ -169,6 +169,7 @@ typedef struct {
NPT_Float rating;
NPT_String votes;
PLT_Artworks artwork;
+ NPT_String unique_identifier;
} PLT_XbmcInfo;
/*----------------------------------------------------------------------
diff --git a/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltSyncMediaBrowser.h b/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltSyncMediaBrowser.h
index 21f1d28b68..8fb23dd16e 100644
--- a/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltSyncMediaBrowser.h
+++ b/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltSyncMediaBrowser.h
@@ -70,7 +70,7 @@ typedef struct PLT_CapabilitiesData {
typedef NPT_Reference<PLT_CapabilitiesData> PLT_CapabilitiesDataReference;
// explicitely specify res otherwise WMP won't return a URL!
-#define PLT_DEFAULT_FILTER "dc:date,dc:description,upnp:longDescription,upnp:genre,res,res@duration,res@size,upnp:albumArtURI,upnp:rating,upnp:lastPlaybackPosition,upnp:lastPlaybackTime,upnp:playbackCount,upnp:originalTrackNumber,upnp:episodeNumber,upnp:programTitle,upnp:seriesTitle,upnp:album,upnp:artist,upnp:author,upnp:director,dc:publisher,searchable,childCount,dc:title,dc:creator,upnp:actor,res@resolution,upnp:episodeCount,upnp:episodeSeason,xbmc:dateadded,xbmc:rating,xbmc:votes,xbmc:artwork"
+#define PLT_DEFAULT_FILTER "dc:date,dc:description,upnp:longDescription,upnp:genre,res,res@duration,res@size,upnp:albumArtURI,upnp:rating,upnp:lastPlaybackPosition,upnp:lastPlaybackTime,upnp:playbackCount,upnp:originalTrackNumber,upnp:episodeNumber,upnp:programTitle,upnp:seriesTitle,upnp:album,upnp:artist,upnp:author,upnp:director,dc:publisher,searchable,childCount,dc:title,dc:creator,upnp:actor,res@resolution,upnp:episodeCount,upnp:episodeSeason,xbmc:dateadded,xbmc:rating,xbmc:votes,xbmc:artwork,xbmc:uniqueidentifier"
/*----------------------------------------------------------------------
| PLT_MediaContainerListener