Merge pull request #2559 from whooo/295-fix
Add descriptive TV episode titles for DLNA browsing
This commit is contained in:
commit
a37b69a493
|
@ -435,6 +435,29 @@ namespace Emby.Dlna.Didl
|
|||
return number + " - " + item.Name;
|
||||
}
|
||||
}
|
||||
else if (item is Episode ep)
|
||||
{
|
||||
var parent = ep.GetParent();
|
||||
var name = parent.Name + " - ";
|
||||
|
||||
if (ep.ParentIndexNumber.HasValue)
|
||||
{
|
||||
name += "S" + ep.ParentIndexNumber.Value.ToString("00", CultureInfo.InvariantCulture);
|
||||
}
|
||||
else if (!item.IndexNumber.HasValue)
|
||||
{
|
||||
return name + " - " + item.Name;
|
||||
}
|
||||
|
||||
name += "E" + ep.IndexNumber.Value.ToString("00", CultureInfo.InvariantCulture);
|
||||
if (ep.IndexNumberEnd.HasValue)
|
||||
{
|
||||
name += "-" + ep.IndexNumberEnd.Value.ToString("00", CultureInfo.InvariantCulture);
|
||||
}
|
||||
|
||||
name += " - " + item.Name;
|
||||
return name;
|
||||
}
|
||||
|
||||
return item.Name;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user