Fixes to make dms work with Samsung TVs and UPnP Monkey on Android #85
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I wanted to make dms work on my Samsung TV, and while debugging against a very hackish Python script I wrote ages ago and which worked found some bugs related to other players as well 🙂 This PR is an attempt to fix them. Changes are:
Some XML parsers are picky about the order of elements, even in situations where a container only contains each tag exactly once. (I guess that allows an optimization in auto-generated parsers..) Since right now you use a
map[string]string
for this, which is naturally unordered, I had to refactor some code to use[][2]string
instead. The order I did use is the one in which the fields are introduced by the specification.dc:title
tag firstThe specification requires that
item
/container
DIDL-Lite tags have this tag as their first child. This is required for my Samsung TV.childCount
for containersAgain, my Samsung TV tries to be overly clever. Since dms reports 0 children, it doesn't bother to actually ever
Browse
the directory. (I am pretty certain that this is wrong and that 0 has some magic meaning, but couldn't find it - anyway, it doesn't harm to report the correct value here.)Let me know if there's anything you'd like to see changed.
By the way, thanks for writing and maintaining this application! It is really useful for setting up ad-hoc dlna servers 😄