mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-15 18:08:53 -07:00
Merge pull request #5025 from BaronGreenback/DlnaFix
This commit is contained in:
commit
b9691e8712
@ -96,6 +96,7 @@ namespace Emby.Dlna.Didl
|
||||
|
||||
using (StringWriter builder = new StringWriterWithEncoding(Encoding.UTF8))
|
||||
{
|
||||
// If this using are changed to single lines, then write.Flush needs to be appended before the return.
|
||||
using (var writer = XmlWriter.Create(builder, settings))
|
||||
{
|
||||
// writer.WriteStartDocument();
|
||||
|
@ -896,16 +896,16 @@ namespace Emby.Dlna.PlayTo
|
||||
|
||||
var parts = url.Split('/');
|
||||
|
||||
for (var i = 0; i < parts.Length; i++)
|
||||
for (var i = 0; i < parts.Length - 1; i++)
|
||||
{
|
||||
var part = parts[i];
|
||||
|
||||
if (string.Equals(part, "audio", StringComparison.OrdinalIgnoreCase) ||
|
||||
string.Equals(part, "videos", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
if (parts.Length > i + 1)
|
||||
if (Guid.TryParse(parts[i + 1], out var result))
|
||||
{
|
||||
return Guid.Parse(parts[i + 1]);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user