Merge pull request #4314 from MartijnKaijser/beta1
[vuplus_xbmc] / lib / libUPnP / patches / 0013-upnp-fixes-support-for-filtering-by-the-extended-pro.patch
1 From 3f9fff2f4372991836c1691d8c5fb2a91424c2aa Mon Sep 17 00:00:00 2001
2 From: Alasdair Campbell <alcoheca@gmail.com>
3 Date: Thu, 25 Oct 2012 11:59:46 +0100
4 Subject: [PATCH 13/21] upnp: fixes support for filtering by the extended
5  properties we need
6
7 ---
8  lib/libUPnP/Platinum/Source/Devices/MediaServer/PltDidl.cpp         | 6 ++++++
9  lib/libUPnP/Platinum/Source/Devices/MediaServer/PltMediaItem.cpp    | 1 +
10  .../Platinum/Source/Devices/MediaServer/PltSyncMediaBrowser.h       | 2 +-
11  3 files changed, 8 insertions(+), 1 deletion(-)
12
13 diff --git a/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltDidl.cpp b/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltDidl.cpp
14 index 2c20b25..6ad2ec4 100644
15 --- a/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltDidl.cpp
16 +++ b/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltDidl.cpp
17 @@ -92,6 +92,8 @@ PLT_Didl::ConvertFilterToMask(const NPT_String& filter)
18              mask |= PLT_FILTER_MASK_ARTIST;
19          } else if (NPT_String::CompareN(s+i, PLT_FILTER_FIELD_ACTOR, len, true) == 0) {
20              mask |= PLT_FILTER_MASK_ACTOR;
21 +        } else if (NPT_String::CompareN(s+i, PLT_FILTER_FIELD_DIRECTOR, len, true) == 0) {
22 +            mask |= PLT_FILTER_MASK_DIRECTOR;
23          } else if (NPT_String::CompareN(s+i, PLT_FILTER_FIELD_AUTHOR, len, true) == 0) {
24              mask |= PLT_FILTER_MASK_AUTHOR;       
25          } else if (NPT_String::CompareN(s+i, PLT_FILTER_FIELD_DATE, len, true) == 0) {
26 @@ -105,6 +107,8 @@ PLT_Didl::ConvertFilterToMask(const NPT_String& filter)
27              mask |= PLT_FILTER_MASK_ALBUMARTURI;
28          } else if (NPT_String::CompareN(s+i, PLT_FILTER_FIELD_DESCRIPTION, len, true) == 0) {
29              mask |= PLT_FILTER_MASK_DESCRIPTION;
30 +        } else if (NPT_String::CompareN(s+i, PLT_FILTER_FIELD_LONGDESCRIPTION, len, true) == 0) {
31 +            mask |= PLT_FILTER_MASK_LONGDESCRIPTION;
32          } else if (NPT_String::CompareN(s+i, PLT_FILTER_FIELD_ORIGINALTRACK, len, true) == 0) {
33              mask |= PLT_FILTER_MASK_ORIGINALTRACK;
34          } else if (NPT_String::CompareN(s+i, PLT_FILTER_FIELD_SEARCHABLE, len, true) == 0) {
35 @@ -123,6 +127,8 @@ PLT_Didl::ConvertFilterToMask(const NPT_String& filter)
36              mask |= PLT_FILTER_MASK_SERIESTITLE;
37          } else if (NPT_String::CompareN(s+i, PLT_FILTER_FIELD_EPISODE, len, true) == 0) {
38              mask |= PLT_FILTER_MASK_EPISODE;
39 +        } else if (NPT_String::CompareN(s+i, PLT_FILTER_FIELD_RATING, len, true) == 0) {
40 +            mask |= PLT_FILTER_MASK_RATING;
41          } else if (NPT_String::CompareN(s+i, PLT_FILTER_FIELD_RES, len, true) == 0) {
42              mask |= PLT_FILTER_MASK_RES;
43          } else if (NPT_String::CompareN(s+i, PLT_FILTER_FIELD_RES_DURATION, len, true) == 0 ||
44 diff --git a/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltMediaItem.cpp b/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltMediaItem.cpp
45 index 0a55eef..01cf13f 100644
46 --- a/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltMediaItem.cpp
47 +++ b/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltMediaItem.cpp
48 @@ -171,6 +171,7 @@ PLT_MediaObject::Reset()
49      m_People.actors.Clear();
50      m_People.artists.Clear();    
51      m_People.authors.Clear();
52 +    m_People.directors.Clear();
53  
54      m_Affiliation.album     = "";
55      m_Affiliation.genres.Clear();
56 diff --git a/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltSyncMediaBrowser.h b/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltSyncMediaBrowser.h
57 index e628af9..5722b82 100644
58 --- a/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltSyncMediaBrowser.h
59 +++ b/lib/libUPnP/Platinum/Source/Devices/MediaServer/PltSyncMediaBrowser.h
60 @@ -118,7 +118,7 @@ protected:
61                            NPT_Int32                index, 
62                            NPT_Int32                count,
63                            bool                     browse_metadata = false,
64 -                          const char*              filter = "dc:date,upnp:genre,res,res@duration,res@size,upnp:albumArtURI,upnp:album,upnp:artist,upnp:author,searchable,childCount", // explicitely specify res otherwise WMP won't return a URL!
65 +                          const char*              filter = "dc:date,dc:description,upnp:longDescription,upnp:genre,res,res@duration,res@size,upnp:albumArtURI,upnp:rating,upnp:episodeNumber,upnp:programTitle,upnp:seriesTitle,upnp:album,upnp:artist,upnp:author,upnp:director,searchable,childCount", // explicitely specify res otherwise WMP won't return a URL!
66                            const char*              sort = "");
67  private:
68      NPT_Result Find(const char* ip, PLT_DeviceDataReference& device);
69 -- 
70 1.7.11.msysgit.0
71