update music user data key

This commit is contained in:
Luke Pulverenti
2016-03-13 21:34:24 -04:00
parent 749037eb4a
commit d683f30619
17 changed files with 91 additions and 45 deletions

View File

@@ -180,7 +180,7 @@ namespace MediaBrowser.XbmcMetadata.Parsers
}
catch (XmlException)
{
}
}
}
@@ -661,7 +661,7 @@ namespace MediaBrowser.XbmcMetadata.Parsers
if (!string.IsNullOrWhiteSpace(val))
{
val = val.Replace("plugin://plugin.video.youtube/?action=play_video&videoid=", "http://www.youtube.com/watch?v=", StringComparison.OrdinalIgnoreCase);
hasTrailer.AddTrailerUrl(val, false);
}
}
@@ -860,6 +860,7 @@ namespace MediaBrowser.XbmcMetadata.Parsers
break;
case "collectionnumber":
case "tmdbcolid":
var tmdbCollection = reader.ReadElementContentAsString();
if (!string.IsNullOrWhiteSpace(tmdbCollection))
{

View File

@@ -11,7 +11,8 @@ namespace MediaBrowser.XbmcMetadata.Parsers
{
class MovieNfoParser : BaseNfoParser<Video>
{
public MovieNfoParser(ILogger logger, IConfigurationManager config) : base(logger, config)
public MovieNfoParser(ILogger logger, IConfigurationManager config)
: base(logger, config)
{
}
@@ -44,12 +45,18 @@ namespace MediaBrowser.XbmcMetadata.Parsers
case "set":
{
var val = reader.ReadElementContentAsString();
var movie = item as Movie;
var tmdbcolid = reader.GetAttribute("tmdbcolid");
if (!string.IsNullOrWhiteSpace(tmdbcolid) && movie != null)
{
movie.SetProviderId(MetadataProviders.TmdbCollection, tmdbcolid);
}
var val = reader.ReadElementContentAsString();
if (!string.IsNullOrWhiteSpace(val) && movie != null)
{
movie.TmdbCollectionName = val;
movie.CollectionName = val;
}
break;

View File

@@ -101,9 +101,9 @@ namespace MediaBrowser.XbmcMetadata.Savers
if (movie != null)
{
if (!string.IsNullOrEmpty(movie.TmdbCollectionName))
if (!string.IsNullOrEmpty(movie.CollectionName))
{
writer.WriteElementString("set", movie.TmdbCollectionName);
writer.WriteElementString("set", movie.CollectionName);
}
}
}