mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 11:34:57 +02:00
improve dlna device status reporting
This commit is contained in:
parent
a0d82a02c8
commit
f1371b17d8
1 changed files with 28 additions and 2 deletions
|
@ -662,9 +662,35 @@ namespace Emby.Dlna.PlayTo
|
||||||
|
|
||||||
var e = track.Element(uPnpNamespaces.items) ?? track;
|
var e = track.Element(uPnpNamespaces.items) ?? track;
|
||||||
|
|
||||||
|
var elementString = (string)e;
|
||||||
|
|
||||||
|
if (!string.IsNullOrWhiteSpace(elementString))
|
||||||
|
{
|
||||||
return UpnpContainer.Create(e);
|
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()
|
private async Task<Tuple<bool, uBaseObject>> GetPositionInfo()
|
||||||
{
|
{
|
||||||
var command = AvCommands.ServiceActions.FirstOrDefault(c => c.Name == "GetPositionInfo");
|
var command = AvCommands.ServiceActions.FirstOrDefault(c => c.Name == "GetPositionInfo");
|
||||||
|
@ -720,7 +746,7 @@ namespace Emby.Dlna.PlayTo
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(trackString) || string.Equals(trackString, "NOT_IMPLEMENTED", StringComparison.OrdinalIgnoreCase))
|
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;
|
XElement uPnpResponse;
|
||||||
|
|
Loading…
Reference in a new issue