update playlist creation

This commit is contained in:
Luke Pulverenti 2017-01-13 22:48:42 -05:00
parent 7a77aa42c5
commit 82c65f3788
2 changed files with 5 additions and 4 deletions

View File

@ -100,7 +100,7 @@ namespace Emby.Server.Implementations.Playlists
if (string.IsNullOrWhiteSpace(options.MediaType))
{
throw new ArgumentException("A playlist media type is required.");
options.MediaType = "Audio";
}
var user = _userManager.GetUserById(options.UserId);

View File

@ -964,13 +964,14 @@ namespace MediaBrowser.XbmcMetadata.Parsers
}
default:
var providerId = reader.Name;
if (_validProviderIds.ContainsKey(providerId))
string readerName = reader.Name;
string providerIdValue;
if (_validProviderIds.TryGetValue(readerName, out providerIdValue))
{
var id = reader.ReadElementContentAsString();
if (!string.IsNullOrWhiteSpace(id))
{
item.SetProviderId(_validProviderIds[providerId], id);
item.SetProviderId(providerIdValue, id);
}
}
else