|
|
@ -132,23 +132,19 @@ namespace Emby.Dlna.PlayTo
|
|
|
|
|
|
|
|
|
|
|
|
private static string GetUuid(string usn)
|
|
|
|
private static string GetUuid(string usn)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var found = false;
|
|
|
|
const string uuidStr ="uuid:";
|
|
|
|
var index = usn.IndexOf("uuid:", StringComparison.OrdinalIgnoreCase);
|
|
|
|
const string uuidColonStr = "::";
|
|
|
|
if (index != -1)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
usn = usn.Substring(index + 5);
|
|
|
|
|
|
|
|
found = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
index = usn.IndexOf("::", StringComparison.OrdinalIgnoreCase);
|
|
|
|
var index = usn.IndexOf(uuidStr, StringComparison.OrdinalIgnoreCase);
|
|
|
|
if (index != -1)
|
|
|
|
if (index != -1)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
usn = usn.Substring(0, index + 2);
|
|
|
|
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);
|
|
|
|
return usn.GetMD5().ToString("N", CultureInfo.InvariantCulture);
|
|
|
|