|
|
|
@ -130,25 +130,21 @@ namespace Emby.Dlna.PlayTo
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private string GetUuid(string usn)
|
|
|
|
|
private static string GetUuid(string usn)
|
|
|
|
|
{
|
|
|
|
|
var found = false;
|
|
|
|
|
var index = usn.IndexOf("uuid:", StringComparison.OrdinalIgnoreCase);
|
|
|
|
|
if (index != -1)
|
|
|
|
|
{
|
|
|
|
|
usn = usn.Substring(index);
|
|
|
|
|
found = true;
|
|
|
|
|
}
|
|
|
|
|
const string UuidStr = "uuid:";
|
|
|
|
|
const string UuidColonStr = "::";
|
|
|
|
|
|
|
|
|
|
index = usn.IndexOf("::", StringComparison.OrdinalIgnoreCase);
|
|
|
|
|
var index = usn.IndexOf(UuidStr, StringComparison.OrdinalIgnoreCase);
|
|
|
|
|
if (index != -1)
|
|
|
|
|
{
|
|
|
|
|
usn = usn.Substring(0, index);
|
|
|
|
|
return usn.Substring(index + UuidStr.Length);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (found)
|
|
|
|
|
index = usn.IndexOf(UuidColonStr, StringComparison.OrdinalIgnoreCase);
|
|
|
|
|
if (index != -1)
|
|
|
|
|
{
|
|
|
|
|
return usn;
|
|
|
|
|
usn = usn.Substring(0, index + UuidColonStr.Length);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return usn.GetMD5().ToString("N", CultureInfo.InvariantCulture);
|
|
|
|
|