-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Improvements to dlna server #2326
Conversation
Bond-009
commented
Jan 22, 2020
- Improve response writer
- Add analyzers
- Error on warnings in release mode
- Disable doc warnings
* Improve response writer * Add analyzers * Error on warnings in release mode * Disable doc warnings
As of 82112b6 this looks to have broken the BROWSE control again (so no media is listed when browsing via DLNA)... |
I’ll take a look when I’ve got time (and maybe add some tests) |
Don't know why it's broken atm |
@PrplHaz4 Did that last commit fix it? |
@Bond-009 Two things I noticed that differ between the working responses and the non-working ones:
I will keep looking but hopefully this is enough to go on. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stuff looks okay now, pending confirmation that this doesn't break DLNA :)
@PrplHaz4 Can you give the full responses with and without the changes? |
@Bond-009 @JustAMan this is the response to the BROWSE command from VLC - it appears the windows media player client uses the SEARCH command, which IS working for listing the media items. (the DLNA test script is starting to get a little complex it seems) BEFORE (master 1ed92b0) <?xml version="1.0" encoding="utf-8" standalone="yes"?>
<Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<Body>
<BrowseResponse xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1">
<Result>
<DIDL-Lite xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/" xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/"><container restricted="1" searchable="1" childCount="129" id="2b2bca16aacc8a14d53a11bb829eafa5" parentID="e9d5075a555c1cbc394eec4cef295274"><dc:title>Live TV</dc:title><upnp:class>object.container.storageFolder</upnp:class></container><container restricted="1" searchable="1" childCount="6" id="f137a2dd21bbc1b99aa5c0f6bf02a805" parentID="e9d5075a555c1cbc394eec4cef295274"><dc:title>Movies</dc:title><upnp:class>object.container.storageFolder</upnp:class><upnp:albumArtURI dlna:profileID="JPEG_SM">http://192.168.4.14:8096/Items/f137a2dd21bbc1b99aa5c0f6bf02a805/Images/Primary/0/985d4292b159647f2eac85ee1b6b5489/jpg/480/480/0/0</upnp:albumArtURI><upnp:icon>http://192.168.4.14:8096/Items/f137a2dd21bbc1b99aa5c0f6bf02a805/Images/Primary/0/985d4292b159647f2eac85ee1b6b5489/jpg/48/48/0/0</upnp:icon><res protocolInfo="http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_LRG;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=00D00000000000000000000000000000" resolution="960x540">http://192.168.4.14:8096/Items/f137a2dd21bbc1b99aa5c0f6bf02a805/Images/Primary/0/985d4292b159647f2eac85ee1b6b5489/jpg/4096/4096/0/0</res><res protocolInfo="http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_MED;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=00D00000000000000000000000000000" resolution="960x540">http://192.168.4.14:8096/Items/f137a2dd21bbc1b99aa5c0f6bf02a805/Images/Primary/0/985d4292b159647f2eac85ee1b6b5489/jpg/1024/768/0/0</res><res protocolInfo="http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_SM;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=00D00000000000000000000000000000" resolution="640x360">http://192.168.4.14:8096/Items/f137a2dd21bbc1b99aa5c0f6bf02a805/Images/Primary/0/985d4292b159647f2eac85ee1b6b5489/jpg/640/480/0/0</res><res protocolInfo="http-get:*:image/png:DLNA.ORG_PN=PNG_LRG;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=00D00000000000000000000000000000" resolution="960x540">http://192.168.4.14:8096/Items/f137a2dd21bbc1b99aa5c0f6bf02a805/Images/Primary/0/985d4292b159647f2eac85ee1b6b5489/png/4096/4096/0/0</res><res protocolInfo="http-get:*:image/png:DLNA.ORG_PN=PNG_TN;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=00D00000000000000000000000000000" resolution="160x90">http://192.168.4.14:8096/Items/f137a2dd21bbc1b99aa5c0f6bf02a805/Images/Primary/0/985d4292b159647f2eac85ee1b6b5489/png/160/160/0/0</res><res protocolInfo="http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_TN;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=00D00000000000000000000000000000" resolution="160x90">http://192.168.4.14:8096/Items/f137a2dd21bbc1b99aa5c0f6bf02a805/Images/Primary/0/985d4292b159647f2eac85ee1b6b5489/jpg/160/160/0/0</res></container></DIDL-Lite>
</Result>
<NumberReturned>
2
</NumberReturned>
<TotalMatches>
2
</TotalMatches>
<UpdateID>
2063
</UpdateID>
</BrowseResponse>
</Body>
</Envelope> AFTER (dlnawarnings bade359) <?xml version="1.0" encoding="utf-8" standalone="yes"?>
<Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<Body>
<BrowseResponse xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1">
<Result>
<DIDL-Lite xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/" xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/">
<container restricted="1" searchable="1" childCount="129" id="2b2bca16aacc8a14d53a11bb829eafa5" parentID="e9d5075a555c1cbc394eec4cef295274">
<title>
Live TV
</title>
<class>
object.container.storageFolder
</class>
</container>
<container restricted="1" searchable="1" childCount="6" id="f137a2dd21bbc1b99aa5c0f6bf02a805" parentID="e9d5075a555c1cbc394eec4cef295274">
<title>
Movies
</title>
<class>
object.container.storageFolder
</class>
<albumArtURI dlna:profileID="JPEG_SM">
http://192.168.4.14:8096/Items/f137a2dd21bbc1b99aa5c0f6bf02a805/Images/Primary/0/985d4292b159647f2eac85ee1b6b5489/jpg/480/480/0/0
</albumArtURI>
<icon>
http://192.168.4.14:8096/Items/f137a2dd21bbc1b99aa5c0f6bf02a805/Images/Primary/0/985d4292b159647f2eac85ee1b6b5489/jpg/48/48/0/0
</icon>
<res protocolInfo="http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_LRG;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=00D00000000000000000000000000000" resolution="960x540">
http://192.168.4.14:8096/Items/f137a2dd21bbc1b99aa5c0f6bf02a805/Images/Primary/0/985d4292b159647f2eac85ee1b6b5489/jpg/4096/4096/0/0
</res>
<res protocolInfo="http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_MED;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=00D00000000000000000000000000000" resolution="960x540">
http://192.168.4.14:8096/Items/f137a2dd21bbc1b99aa5c0f6bf02a805/Images/Primary/0/985d4292b159647f2eac85ee1b6b5489/jpg/1024/768/0/0
</res>
<res protocolInfo="http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_SM;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=00D00000000000000000000000000000" resolution="640x360">
http://192.168.4.14:8096/Items/f137a2dd21bbc1b99aa5c0f6bf02a805/Images/Primary/0/985d4292b159647f2eac85ee1b6b5489/jpg/640/480/0/0
</res>
<res protocolInfo="http-get:*:image/png:DLNA.ORG_PN=PNG_LRG;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=00D00000000000000000000000000000" resolution="960x540">
http://192.168.4.14:8096/Items/f137a2dd21bbc1b99aa5c0f6bf02a805/Images/Primary/0/985d4292b159647f2eac85ee1b6b5489/png/4096/4096/0/0
</res>
<res protocolInfo="http-get:*:image/png:DLNA.ORG_PN=PNG_TN;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=00D00000000000000000000000000000" resolution="160x90">
http://192.168.4.14:8096/Items/f137a2dd21bbc1b99aa5c0f6bf02a805/Images/Primary/0/985d4292b159647f2eac85ee1b6b5489/png/160/160/0/0
</res>
<res protocolInfo="http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_TN;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=00D00000000000000000000000000000" resolution="160x90">
http://192.168.4.14:8096/Items/f137a2dd21bbc1b99aa5c0f6bf02a805/Images/Primary/0/985d4292b159647f2eac85ee1b6b5489/jpg/160/160/0/0
</res>
</container>
</DIDL-Lite>
</Result>
<NumberReturned>
2
</NumberReturned>
<TotalMatches>
2
</TotalMatches>
<UpdateID>
2063
</UpdateID>
</BrowseResponse>
</Body>
</Envelope> |
I see, I’ll fix this tonight |
@PrplHaz4 What filter are you using on wireshark to capture these, so I can stop bothering you ;) |
@Bond-009 doesn't seem to be fixed with fc578de <?xml version="1.0" encoding="utf-8" standalone="yes"?>
<Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<Body>
<BrowseResponse xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1">
<Result>
<DIDL-Lite xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/" xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/">
<container restricted="1" searchable="1" childCount="89" id="2b2bca16aacc8a14d53a11bb829eafa5" parentID="e9d5075a555c1cbc394eec4cef295274">
<title>
Live TV
</title>
<class>
object.container.storageFolder
</class>
</container>
<container restricted="1" searchable="1" childCount="6" id="f137a2dd21bbc1b99aa5c0f6bf02a805" parentID="e9d5075a555c1cbc394eec4cef295274">
<title>
Movies
</title>
<class>
object.container.storageFolder
</class>
<albumArtURI dlna:profileID="JPEG_SM">
http://192.168.4.14:8096/Items/f137a2dd21bbc1b99aa5c0f6bf02a805/Images/Primary/0/985d4292b159647f2eac85ee1b6b5489/jpg/480/480/0/0
</albumArtURI>
<icon>
http://192.168.4.14:8096/Items/f137a2dd21bbc1b99aa5c0f6bf02a805/Images/Primary/0/985d4292b159647f2eac85ee1b6b5489/jpg/48/48/0/0
</icon>
<res protocolInfo="http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_LRG;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=00D00000000000000000000000000000" resolution="960x540">
http://192.168.4.14:8096/Items/f137a2dd21bbc1b99aa5c0f6bf02a805/Images/Primary/0/985d4292b159647f2eac85ee1b6b5489/jpg/4096/4096/0/0
</res>
<res protocolInfo="http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_MED;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=00D00000000000000000000000000000" resolution="960x540">
http://192.168.4.14:8096/Items/f137a2dd21bbc1b99aa5c0f6bf02a805/Images/Primary/0/985d4292b159647f2eac85ee1b6b5489/jpg/1024/768/0/0
</res>
<res protocolInfo="http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_SM;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=00D00000000000000000000000000000" resolution="640x360">
http://192.168.4.14:8096/Items/f137a2dd21bbc1b99aa5c0f6bf02a805/Images/Primary/0/985d4292b159647f2eac85ee1b6b5489/jpg/640/480/0/0
</res>
<res protocolInfo="http-get:*:image/png:DLNA.ORG_PN=PNG_LRG;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=00D00000000000000000000000000000" resolution="960x540">
http://192.168.4.14:8096/Items/f137a2dd21bbc1b99aa5c0f6bf02a805/Images/Primary/0/985d4292b159647f2eac85ee1b6b5489/png/4096/4096/0/0
</res>
<res protocolInfo="http-get:*:image/png:DLNA.ORG_PN=PNG_TN;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=00D00000000000000000000000000000" resolution="160x90">
http://192.168.4.14:8096/Items/f137a2dd21bbc1b99aa5c0f6bf02a805/Images/Primary/0/985d4292b159647f2eac85ee1b6b5489/png/160/160/0/0
</res>
<res protocolInfo="http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_TN;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=00D00000000000000000000000000000" resolution="160x90">
http://192.168.4.14:8096/Items/f137a2dd21bbc1b99aa5c0f6bf02a805/Images/Primary/0/985d4292b159647f2eac85ee1b6b5489/jpg/160/160/0/0
</res>
</container>
</DIDL-Lite>
</Result>
<NumberReturned>
2
</NumberReturned>
<TotalMatches>
2
</TotalMatches>
<UpdateID>
2069
</UpdateID>
</BrowseResponse>
</Body>
</Envelope> |
@Bond-009 haha...you have too much faith in me... |
VLC can't seem to find my instance :/ |
It'll be a couple hours before I can test again. Maybe check your dlna settings I'm jf and make sure intervals are 60 and 120 instead of the 1800 that was default at one point. |
@Bond-009 nope, not that one 6b68521 <?xml version="1.0" encoding="utf-8" standalone="yes"?>
<Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<Body>
<Fault>
<faultcode>
500
</faultcode>
<faultstring>
WriteStartDocument cannot be called on writers created with ConformanceLevel.Fragment.
</faultstring>
<detail>
<UPnPError xmlns="urn:schemas-upnp-org:control-1-0">
<errorCode>
401
</errorCode>
<errorDescription>
Invalid Action
</errorDescription>
</UPnPError>
</detail>
</Fault>
</Body>
</Envelope> |
Section 2.5.4 http://upnp.org/specs/av/UPnP-av-ContentDirectory-v1-Service.pdf XML Section 2.4: https://www.w3.org/TR/REC-xml/#syntax |
@PrplHaz4 My bad, forgot to revert the previous (failed) fix |
@Bond-009 not working as of 6ee0485 - will be a few hrs before I can get a trace - maybe time to fix logging in the DLNA area - it looks like the control requests aren't being logged anymore either. VLC and Windows Explorer are not listing any media under jellyfin. |
@Bond-009 Here's the response with 6ee0485 - "Result" is empty <?xml version="1.0" encoding="utf-8" standalone="yes"?>
<Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<Body>
<BrowseResponse xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1">
<Result />
<NumberReturned>
2
</NumberReturned>
<TotalMatches>
2
</TotalMatches>
<UpdateID>
2050
</UpdateID>
</BrowseResponse>
</Body>
</Envelope> |
Looks like that d698706 did it! Thanks and nice work @Bond-009 Movies are working fine now, but VLC is not listing my LiveTV channels through DLNA. The individual channels are listed on my Samsung TV DLNA client and Windows Explorer. That might be another issue entirely - LMK if you think it's worth opening a new issue with new traces... |
@Bond-009 answering my own question - this PR should be merged and I will create a new issue for the LiveTV Browse in VLC over DLNA. |
Hmm, I forgot that Github creates merge commits when handling conflicts. |
As promised, here is the issue I've created for LiveTV/DLNA/VLC: jellyfin/jellyfin-plugin-dlna#8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's hoping you all tested that properly :)