Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upnp: several additions and improvements #4764

Merged
merged 12 commits into from
Jun 2, 2014

Conversation

Montellese
Copy link
Member

These are most of the additions to UPnP and the Platinum SDK from my media import work.

  • proper support for dc:publisher in Platinum SDK. This is filled with the studio for video items and can later be used to e.g. fill in the label that produced a music album.
  • support for upnp:episodeCount and upnp:episodeSeason from ContentDirectory:4 specification in Platinum
  • support for xbmc namespace and the properties dateadded, rating, votes and artwork to get additional details to the client
  • implementation of the Search() method from ContentDirectory:1 specification in Platinum. This allows to e.g. search for all items of a specific type
  • implementation of the GetSearchCapabilities() method from ContentDirectory:1 specification in Platinum. This allows to get a list of supported search fields/properties. Right now we only support "upnp:class" i.e. searching by the type of media item
  • implementation of the GetSortCapabilities() method from ContentDirectory:1 specification in Platinum. This allows to get a list of properties by which a list of items can be sorted. Furthermore I've implemented sorting for upnp:episodeCount, upnp:episodeSeason, xbmc:rating, xbmc:dateadded and xbmc:votes

@MartijnKaijser MartijnKaijser added this to the Pending for inclusion milestone May 21, 2014
const NPT_String* url = nodes[i]->GetText();
const NPT_String* type = nodes[i]->GetAttribute("type");
if (type) artwork.type = type->SubString(0, 1024);
if (url) artwork.url = url->SubString(0, 1024);

This comment was marked as spam.

This comment was marked as spam.

@elupus
Copy link
Contributor

elupus commented May 21, 2014

Looks alright at a glance. some things aught to go upstream though. also rather sad that it's not possible to extend attributes without hacking so deep in platinum.

@Montellese
Copy link
Member Author

@elupus: Thanks for taking a look. Yeah I really don't like it that we have to hack into so multiple Platinum source files just to get some additional properties supported. Furthermore there are quite a few properties there (like dc:publisher) which are either not properly implemented (like no support for multiple entries of the same type) or not implemented at all (i.e. no DIDL serialization/deserialization).

I'll try to submit some of the patches (dc:publisher, SearchSync, GetSearchCapabilities and GetSortCapabilities) upstream.

@Montellese
Copy link
Member Author

jenkins build this please

@Montellese
Copy link
Member Author

@elupus: I've looked at the code and these limits on strings are everywhere. I've skimmed the UPnP specification and couldn't find anything about string length limitations. I'd prefer to keep the added code in line with the existing code though as it is more likely that it will be accepted upstream that way.

@elupus
Copy link
Contributor

elupus commented May 29, 2014

A limit of 1024 for url can easily be exeeded by nested urls (rars in zips and so on). Please just assign them instead. The limit only make sense if it was stored in a fixed size array. Even if the code does like this already, we should not add to the practice.

@Montellese
Copy link
Member Author

@elupus: Good point. I'll remove the limits.

@Montellese
Copy link
Member Author

@elupus: Removed the string size limitations from the newly introduced code.

jenkins build this please

@MartijnKaijser
Copy link
Member

jenkins build this please (he's stubborn again on building. perhaps because starting it just after a force push)

@elupus
Copy link
Contributor

elupus commented Jun 1, 2014

I'm alright with this. But do try to get it upstream + ask how they want us to handle extensions

Montellese added a commit that referenced this pull request Jun 2, 2014
upnp: several additions and improvements
@Montellese Montellese merged commit b5e06ca into xbmc:master Jun 2, 2014
@Montellese Montellese deleted the upnp_improvements branch June 2, 2014 16:34
@MartijnKaijser MartijnKaijser added this to the Helix 14.0-alpha1 milestone Jun 7, 2014
@MartijnKaijser MartijnKaijser removed this from the Pending for inclusion milestone Jun 7, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature non-breaking change which adds functionality Type: Improvement non-breaking change which improves existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants