diff options
| author | Luke <luke.pulverenti@gmail.com> | 2017-09-27 10:52:52 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-09-27 10:52:52 -0400 |
| commit | 80822d98e4ad3df7cb2e54385c76989ea5945ab3 (patch) | |
| tree | fed2f9b37905faa779e2e47594d8e86f4e05565b /Emby.Dlna | |
| parent | eda7e5fd9891c1b836894b98b77b7a008788c670 (diff) | |
| parent | 140201d9353dd9ef0e5a99cb2f674ff0e4887240 (diff) | |
Merge pull request #2919 from MediaBrowser/dev
Dev
Diffstat (limited to 'Emby.Dlna')
| -rw-r--r-- | Emby.Dlna/PlayTo/Device.cs | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/Emby.Dlna/PlayTo/Device.cs b/Emby.Dlna/PlayTo/Device.cs index b6b1c0c034..165f123f17 100644 --- a/Emby.Dlna/PlayTo/Device.cs +++ b/Emby.Dlna/PlayTo/Device.cs @@ -662,7 +662,33 @@ namespace Emby.Dlna.PlayTo var e = track.Element(uPnpNamespaces.items) ?? track; - return UpnpContainer.Create(e); + var elementString = (string)e; + + if (!string.IsNullOrWhiteSpace(elementString)) + { + return UpnpContainer.Create(e); + } + + track = result.Document.Descendants("CurrentURI").FirstOrDefault(); + + if (track == null) + { + return null; + } + + e = track.Element(uPnpNamespaces.items) ?? track; + + elementString = (string)e; + + if (!string.IsNullOrWhiteSpace(elementString)) + { + return new uBaseObject + { + Url = elementString + }; + } + + return null; } private async Task<Tuple<bool, uBaseObject>> GetPositionInfo() @@ -720,7 +746,7 @@ namespace Emby.Dlna.PlayTo if (string.IsNullOrWhiteSpace(trackString) || string.Equals(trackString, "NOT_IMPLEMENTED", StringComparison.OrdinalIgnoreCase)) { - return new Tuple<bool, uBaseObject>(false, null); + return new Tuple<bool, uBaseObject>(true, null); } XElement uPnpResponse; |
