update dlna server friendly name

This commit is contained in:
Luke Pulverenti 2016-03-29 21:33:18 -04:00
parent eeef543989
commit 62cb2195ea
2 changed files with 6 additions and 2 deletions

View File

@ -15,10 +15,9 @@ namespace MediaBrowser.Dlna.Profiles
XDlnaDoc = "DMS-1.50"; XDlnaDoc = "DMS-1.50";
FriendlyName = "Emby";
Manufacturer = "Emby"; Manufacturer = "Emby";
ModelDescription = "Emby"; ModelDescription = "Emby";
ModelName = "Emby"; ModelName = "Emby Server";
ModelNumber = "Emby"; ModelNumber = "Emby";
ModelUrl = "http://emby.media/"; ModelUrl = "http://emby.media/";
ManufacturerUrl = "http://emby.media/"; ManufacturerUrl = "http://emby.media/";

View File

@ -138,6 +138,11 @@ namespace MediaBrowser.Dlna.Server
private string GetFriendlyName() private string GetFriendlyName()
{ {
if (string.IsNullOrWhiteSpace(_profile.FriendlyName))
{
return _serverName;
}
var characters = _serverName.Where(c => (char.IsLetterOrDigit(c) || c == '-')).ToArray(); var characters = _serverName.Where(c => (char.IsLetterOrDigit(c) || c == '-')).ToArray();
var serverName = new string(characters); var serverName = new string(characters);