Merge pull request #5194 from Ullmie02/nfo-watched

This commit is contained in:
Bond-009 2021-02-14 18:25:41 +01:00 committed by GitHub
commit 30372fcd68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 304 additions and 87 deletions

View File

@ -12,6 +12,7 @@ using System.Xml;
using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Configuration;
using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Entities.TV; using MediaBrowser.Controller.Entities.TV;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Providers; using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Entities; using MediaBrowser.Model.Entities;
using MediaBrowser.XbmcMetadata.Configuration; using MediaBrowser.XbmcMetadata.Configuration;
@ -24,20 +25,31 @@ namespace MediaBrowser.XbmcMetadata.Parsers
where T : BaseItem where T : BaseItem
{ {
private readonly IConfigurationManager _config; private readonly IConfigurationManager _config;
private readonly IUserManager _userManager;
private readonly IUserDataManager _userDataManager;
private Dictionary<string, string> _validProviderIds; private Dictionary<string, string> _validProviderIds;
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="BaseNfoParser{T}" /> class. /// Initializes a new instance of the <see cref="BaseNfoParser{T}" /> class.
/// </summary> /// </summary>
/// <param name="logger">The logger.</param> /// <param name="logger">Instance of the <see cref="ILogger"/> interface.</param>
/// <param name="config">the configuration manager.</param> /// <param name="config">Instance of the <see cref="IConfigurationManager"/> interface.</param>
/// <param name="providerManager">The provider manager.</param> /// <param name="providerManager">Instance of the <see cref="IProviderManager"/> interface.</param>
public BaseNfoParser(ILogger logger, IConfigurationManager config, IProviderManager providerManager) /// <param name="userManager">Instance of the <see cref="IUserManager"/> interface.</param>
/// <param name="userDataManager">Instance of the <see cref="IUserDataManager"/> interface.</param>
public BaseNfoParser(
ILogger logger,
IConfigurationManager config,
IProviderManager providerManager,
IUserManager userManager,
IUserDataManager userDataManager)
{ {
Logger = logger; Logger = logger;
_config = config; _config = config;
ProviderManager = providerManager; ProviderManager = providerManager;
_validProviderIds = new Dictionary<string, string>(); _validProviderIds = new Dictionary<string, string>();
_userManager = userManager;
_userDataManager = userDataManager;
} }
protected CultureInfo UsCulture { get; } = new CultureInfo("en-US"); protected CultureInfo UsCulture { get; } = new CultureInfo("en-US");
@ -261,6 +273,14 @@ namespace MediaBrowser.XbmcMetadata.Parsers
{ {
var item = itemResult.Item; var item = itemResult.Item;
var nfoConfiguration = _config.GetNfoConfiguration();
UserItemData? userData = null;
if (!string.IsNullOrWhiteSpace(nfoConfiguration.UserId))
{
var user = _userManager.GetUserById(Guid.Parse(nfoConfiguration.UserId));
userData = _userDataManager.GetUserData(user, item);
}
switch (reader.Name) switch (reader.Name)
{ {
// DateCreated // DateCreated
@ -355,6 +375,50 @@ namespace MediaBrowser.XbmcMetadata.Parsers
break; break;
} }
case "watched":
{
var val = reader.ReadElementContentAsBoolean();
if (userData != null)
{
userData.Played = val;
}
break;
}
case "playcount":
{
var val = reader.ReadElementContentAsString();
if (!string.IsNullOrWhiteSpace(val) && userData != null)
{
if (int.TryParse(val, NumberStyles.Integer, UsCulture, out var count))
{
userData.PlayCount = count;
}
}
break;
}
case "lastplayed":
{
var val = reader.ReadElementContentAsString();
if (!string.IsNullOrWhiteSpace(val) && userData != null)
{
if (DateTime.TryParse(val, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal, out var added))
{
userData.LastPlayedDate = added.ToUniversalTime();
}
else
{
Logger.LogWarning("Invalid lastplayed value found: {Value}", val);
}
}
break;
}
case "countrycode": case "countrycode":
{ {
var val = reader.ReadElementContentAsString(); var val = reader.ReadElementContentAsString();
@ -622,7 +686,7 @@ namespace MediaBrowser.XbmcMetadata.Parsers
case "premiered": case "premiered":
case "releasedate": case "releasedate":
{ {
var formatString = _config.GetNfoConfiguration().ReleaseDateFormat; var formatString = nfoConfiguration.ReleaseDateFormat;
var val = reader.ReadElementContentAsString(); var val = reader.ReadElementContentAsString();
@ -640,7 +704,7 @@ namespace MediaBrowser.XbmcMetadata.Parsers
case "enddate": case "enddate":
{ {
var formatString = _config.GetNfoConfiguration().ReleaseDateFormat; var formatString = nfoConfiguration.ReleaseDateFormat;
var val = reader.ReadElementContentAsString(); var val = reader.ReadElementContentAsString();

View File

@ -6,6 +6,7 @@ using System.Threading;
using System.Xml; using System.Xml;
using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Configuration;
using MediaBrowser.Controller.Entities.TV; using MediaBrowser.Controller.Entities.TV;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Providers; using MediaBrowser.Controller.Providers;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
@ -19,11 +20,18 @@ namespace MediaBrowser.XbmcMetadata.Parsers
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="EpisodeNfoParser"/> class. /// Initializes a new instance of the <see cref="EpisodeNfoParser"/> class.
/// </summary> /// </summary>
/// <param name="logger">The logger.</param> /// <param name="logger">Instance of the <see cref="ILogger{BaseNfoParser}"/> interface.</param>
/// <param name="config">the configuration manager.</param> /// <param name="config">Instance of the <see cref="IConfigurationManager"/> interface.</param>
/// <param name="providerManager">The provider manager.</param> /// <param name="providerManager">Instance of the <see cref="IProviderManager"/> interface.</param>
public EpisodeNfoParser(ILogger logger, IConfigurationManager config, IProviderManager providerManager) /// <param name="userManager">Instance of the <see cref="IUserManager"/> interface.</param>
: base(logger, config, providerManager) /// <param name="userDataManager">Instance of the <see cref="IUserDataManager"/> interface.</param>
public EpisodeNfoParser(
ILogger logger,
IConfigurationManager config,
IProviderManager providerManager,
IUserManager userManager,
IUserDataManager userDataManager)
: base(logger, config, providerManager, userManager, userDataManager)
{ {
} }

View File

@ -5,6 +5,7 @@ using System.Xml;
using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Configuration;
using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Entities.Movies; using MediaBrowser.Controller.Entities.Movies;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Providers; using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Entities; using MediaBrowser.Model.Entities;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
@ -19,11 +20,18 @@ namespace MediaBrowser.XbmcMetadata.Parsers
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="MovieNfoParser"/> class. /// Initializes a new instance of the <see cref="MovieNfoParser"/> class.
/// </summary> /// </summary>
/// <param name="logger">The logger.</param> /// <param name="logger">Instance of the <see cref="ILogger"/> interface.</param>
/// <param name="config">the configuration manager.</param> /// <param name="config">Instance of the <see cref="IConfigurationManager"/> interface.</param>
/// <param name="providerManager">The provider manager.</param> /// <param name="providerManager">Instance of the <see cref="IProviderManager"/> interface.</param>
public MovieNfoParser(ILogger logger, IConfigurationManager config, IProviderManager providerManager) /// <param name="userManager">Instance of the <see cref="IUserManager"/> interface.</param>
: base(logger, config, providerManager) /// <param name="userDataManager">Instance of the <see cref="IUserDataManager"/> interface.</param>
public MovieNfoParser(
ILogger logger,
IConfigurationManager config,
IProviderManager providerManager,
IUserManager userManager,
IUserDataManager userDataManager)
: base(logger, config, providerManager, userManager, userDataManager)
{ {
} }

View File

@ -2,6 +2,7 @@ using System.Globalization;
using System.Xml; using System.Xml;
using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Configuration;
using MediaBrowser.Controller.Entities.TV; using MediaBrowser.Controller.Entities.TV;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Providers; using MediaBrowser.Controller.Providers;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
@ -15,11 +16,18 @@ namespace MediaBrowser.XbmcMetadata.Parsers
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="SeasonNfoParser"/> class. /// Initializes a new instance of the <see cref="SeasonNfoParser"/> class.
/// </summary> /// </summary>
/// <param name="logger">The logger.</param> /// <param name="logger">Instance of the <see cref="ILogger"/> interface.</param>
/// <param name="config">the configuration manager.</param> /// <param name="config">Instance of the <see cref="IConfigurationManager"/> interface.</param>
/// <param name="providerManager">The provider manager.</param> /// <param name="providerManager">Instance of the <see cref="IProviderManager"/> interface.</param>
public SeasonNfoParser(ILogger logger, IConfigurationManager config, IProviderManager providerManager) /// <param name="userManager">Instance of the <see cref="IUserManager"/> interface.</param>
: base(logger, config, providerManager) /// <param name="userDataManager">Instance of the <see cref="IUserDataManager"/> interface.</param>
public SeasonNfoParser(
ILogger logger,
IConfigurationManager config,
IProviderManager providerManager,
IUserManager userManager,
IUserDataManager userDataManager)
: base(logger, config, providerManager, userManager, userDataManager)
{ {
} }

View File

@ -17,11 +17,18 @@ namespace MediaBrowser.XbmcMetadata.Parsers
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="SeriesNfoParser"/> class. /// Initializes a new instance of the <see cref="SeriesNfoParser"/> class.
/// </summary> /// </summary>
/// <param name="logger">The logger.</param> /// <param name="logger">Instance of the <see cref="ILogger"/> interface.</param>
/// <param name="config">the configuration manager.</param> /// <param name="config">Instance of the <see cref="IConfigurationManager"/> interface.</param>
/// <param name="providerManager">The provider manager.</param> /// <param name="providerManager">Instance of the <see cref="IProviderManager"/> interface.</param>
public SeriesNfoParser(ILogger logger, IConfigurationManager config, IProviderManager providerManager) /// <param name="userManager">Instance of the <see cref="IUserManager"/> interface.</param>
: base(logger, config, providerManager) /// <param name="userDataManager">Instance of the <see cref="IUserDataManager"/> interface.</param>
public SeriesNfoParser(
ILogger logger,
IConfigurationManager config,
IProviderManager providerManager,
IUserManager userManager,
IUserDataManager userDataManager)
: base(logger, config, providerManager, userManager, userDataManager)
{ {
} }

View File

@ -2,6 +2,7 @@ using System.IO;
using System.Threading; using System.Threading;
using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Configuration;
using MediaBrowser.Controller.Entities.Audio; using MediaBrowser.Controller.Entities.Audio;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Providers; using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.IO; using MediaBrowser.Model.IO;
using MediaBrowser.XbmcMetadata.Parsers; using MediaBrowser.XbmcMetadata.Parsers;
@ -17,30 +18,38 @@ namespace MediaBrowser.XbmcMetadata.Providers
private readonly ILogger<AlbumNfoProvider> _logger; private readonly ILogger<AlbumNfoProvider> _logger;
private readonly IConfigurationManager _config; private readonly IConfigurationManager _config;
private readonly IProviderManager _providerManager; private readonly IProviderManager _providerManager;
private readonly IUserManager _userManager;
private readonly IUserDataManager _userDataManager;
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="AlbumNfoProvider"/> class. /// Initializes a new instance of the <see cref="AlbumNfoProvider"/> class.
/// </summary> /// </summary>
/// <param name="logger">The logger.</param> /// <param name="logger">Instance of the <see cref="ILogger{AlbumNfoProvider}"/> interface.</param>
/// <param name="fileSystem">The file system.</param> /// <param name="fileSystem">Instance of the <see cref="IFileSystem"/> interface.</param>
/// <param name="config">the configuration manager.</param> /// <param name="config">Instance of the <see cref="IConfigurationManager"/> interface.</param>
/// <param name="providerManager">The provider manager.</param> /// <param name="providerManager">Instance of the <see cref="IProviderManager"/> interface.</param>
/// <param name="userManager">Instance of the <see cref="IUserManager"/> interface.</param>
/// <param name="userDataManager">Instance of the <see cref="IUserDataManager"/> interface.</param>
public AlbumNfoProvider( public AlbumNfoProvider(
ILogger<AlbumNfoProvider> logger, ILogger<AlbumNfoProvider> logger,
IFileSystem fileSystem, IFileSystem fileSystem,
IConfigurationManager config, IConfigurationManager config,
IProviderManager providerManager) IProviderManager providerManager,
IUserManager userManager,
IUserDataManager userDataManager)
: base(fileSystem) : base(fileSystem)
{ {
_logger = logger; _logger = logger;
_config = config; _config = config;
_providerManager = providerManager; _providerManager = providerManager;
_userManager = userManager;
_userDataManager = userDataManager;
} }
/// <inheritdoc /> /// <inheritdoc />
protected override void Fetch(MetadataResult<MusicAlbum> result, string path, CancellationToken cancellationToken) protected override void Fetch(MetadataResult<MusicAlbum> result, string path, CancellationToken cancellationToken)
{ {
new BaseNfoParser<MusicAlbum>(_logger, _config, _providerManager).Fetch(result, path, cancellationToken); new BaseNfoParser<MusicAlbum>(_logger, _config, _providerManager, _userManager, _userDataManager).Fetch(result, path, cancellationToken);
} }
/// <inheritdoc /> /// <inheritdoc />

View File

@ -2,6 +2,7 @@ using System.IO;
using System.Threading; using System.Threading;
using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Configuration;
using MediaBrowser.Controller.Entities.Audio; using MediaBrowser.Controller.Entities.Audio;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Providers; using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.IO; using MediaBrowser.Model.IO;
using MediaBrowser.XbmcMetadata.Parsers; using MediaBrowser.XbmcMetadata.Parsers;
@ -17,30 +18,38 @@ namespace MediaBrowser.XbmcMetadata.Providers
private readonly ILogger<ArtistNfoProvider> _logger; private readonly ILogger<ArtistNfoProvider> _logger;
private readonly IConfigurationManager _config; private readonly IConfigurationManager _config;
private readonly IProviderManager _providerManager; private readonly IProviderManager _providerManager;
private readonly IUserManager _userManager;
private readonly IUserDataManager _userDataManager;
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="ArtistNfoProvider"/> class. /// Initializes a new instance of the <see cref="ArtistNfoProvider"/> class.
/// </summary> /// </summary>
/// <param name="logger">The logger.</param> /// <param name="logger">Instance of the <see cref="ILogger{ArtistNfoProvider}"/> interface.</param>
/// <param name="fileSystem">The file system.</param> /// <param name="fileSystem">Instance of the <see cref="IFileSystem"/> interface.</param>
/// <param name="config">the configuration manager.</param> /// <param name="config">Instance of the <see cref="IConfigurationManager"/> interface.</param>
/// <param name="providerManager">The provider manager.</param> /// <param name="providerManager">Instance of the <see cref="IProviderManager"/> interface.</param>
/// <param name="userManager">Instance of the <see cref="IUserManager"/> interface.</param>
/// <param name="userDataManager">Instance of the <see cref="IUserDataManager"/> interface.</param>
public ArtistNfoProvider( public ArtistNfoProvider(
IFileSystem fileSystem, IFileSystem fileSystem,
ILogger<ArtistNfoProvider> logger, ILogger<ArtistNfoProvider> logger,
IConfigurationManager config, IConfigurationManager config,
IProviderManager providerManager) IProviderManager providerManager,
IUserManager userManager,
IUserDataManager userDataManager)
: base(fileSystem) : base(fileSystem)
{ {
_logger = logger; _logger = logger;
_config = config; _config = config;
_providerManager = providerManager; _providerManager = providerManager;
_userManager = userManager;
_userDataManager = userDataManager;
} }
/// <inheritdoc /> /// <inheritdoc />
protected override void Fetch(MetadataResult<MusicArtist> result, string path, CancellationToken cancellationToken) protected override void Fetch(MetadataResult<MusicArtist> result, string path, CancellationToken cancellationToken)
{ {
new BaseNfoParser<MusicArtist>(_logger, _config, _providerManager).Fetch(result, path, cancellationToken); new BaseNfoParser<MusicArtist>(_logger, _config, _providerManager, _userManager, _userDataManager).Fetch(result, path, cancellationToken);
} }
/// <inheritdoc /> /// <inheritdoc />

View File

@ -4,6 +4,7 @@ using System.Linq;
using System.Threading; using System.Threading;
using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Configuration;
using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Providers; using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.IO; using MediaBrowser.Model.IO;
using MediaBrowser.XbmcMetadata.Parsers; using MediaBrowser.XbmcMetadata.Parsers;
@ -18,17 +19,23 @@ namespace MediaBrowser.XbmcMetadata.Providers
private readonly ILogger<BaseVideoNfoProvider<T>> _logger; private readonly ILogger<BaseVideoNfoProvider<T>> _logger;
private readonly IConfigurationManager _config; private readonly IConfigurationManager _config;
private readonly IProviderManager _providerManager; private readonly IProviderManager _providerManager;
private readonly IUserManager _userManager;
private readonly IUserDataManager _userDataManager;
public BaseVideoNfoProvider( public BaseVideoNfoProvider(
ILogger<BaseVideoNfoProvider<T>> logger, ILogger<BaseVideoNfoProvider<T>> logger,
IFileSystem fileSystem, IFileSystem fileSystem,
IConfigurationManager config, IConfigurationManager config,
IProviderManager providerManager) IProviderManager providerManager,
IUserManager userManager,
IUserDataManager userDataManager)
: base(fileSystem) : base(fileSystem)
{ {
_logger = logger; _logger = logger;
_config = config; _config = config;
_providerManager = providerManager; _providerManager = providerManager;
_userManager = userManager;
_userDataManager = userDataManager;
} }
/// <inheritdoc /> /// <inheritdoc />
@ -38,7 +45,7 @@ namespace MediaBrowser.XbmcMetadata.Providers
{ {
Item = result.Item Item = result.Item
}; };
new MovieNfoParser(_logger, _config, _providerManager).Fetch(tmpItem, path, cancellationToken); new MovieNfoParser(_logger, _config, _providerManager, _userManager, _userDataManager).Fetch(tmpItem, path, cancellationToken);
result.Item = (T)tmpItem.Item; result.Item = (T)tmpItem.Item;
result.People = tmpItem.People; result.People = tmpItem.People;

View File

@ -2,6 +2,7 @@ using System.IO;
using System.Threading; using System.Threading;
using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Configuration;
using MediaBrowser.Controller.Entities.TV; using MediaBrowser.Controller.Entities.TV;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Providers; using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.IO; using MediaBrowser.Model.IO;
using MediaBrowser.XbmcMetadata.Parsers; using MediaBrowser.XbmcMetadata.Parsers;
@ -17,30 +18,38 @@ namespace MediaBrowser.XbmcMetadata.Providers
private readonly ILogger<EpisodeNfoProvider> _logger; private readonly ILogger<EpisodeNfoProvider> _logger;
private readonly IConfigurationManager _config; private readonly IConfigurationManager _config;
private readonly IProviderManager _providerManager; private readonly IProviderManager _providerManager;
private readonly IUserManager _userManager;
private readonly IUserDataManager _userDataManager;
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="EpisodeNfoProvider"/> class. /// Initializes a new instance of the <see cref="EpisodeNfoProvider"/> class.
/// </summary> /// </summary>
/// <param name="logger">The logger.</param> /// <param name="logger">Instance of the <see cref="ILogger{EpisodeNfoProvider}"/> interface.</param>
/// <param name="fileSystem">The file system.</param> /// <param name="fileSystem">Instance of the <see cref="IFileSystem"/> interface.</param>
/// <param name="config">the configuration manager.</param> /// <param name="config">Instance of the <see cref="IConfigurationManager"/> interface.</param>
/// <param name="providerManager">The provider manager.</param> /// <param name="providerManager">Instance of the <see cref="IProviderManager"/> interface.</param>
/// <param name="userManager">Instance of the <see cref="IUserManager"/> interface.</param>
/// <param name="userDataManager">Instance of the <see cref="IUserDataManager"/> interface.</param>
public EpisodeNfoProvider( public EpisodeNfoProvider(
ILogger<EpisodeNfoProvider> logger, ILogger<EpisodeNfoProvider> logger,
IFileSystem fileSystem, IFileSystem fileSystem,
IConfigurationManager config, IConfigurationManager config,
IProviderManager providerManager) IProviderManager providerManager,
IUserManager userManager,
IUserDataManager userDataManager)
: base(fileSystem) : base(fileSystem)
{ {
_logger = logger; _logger = logger;
_config = config; _config = config;
_providerManager = providerManager; _providerManager = providerManager;
_userManager = userManager;
_userDataManager = userDataManager;
} }
/// <inheritdoc /> /// <inheritdoc />
protected override void Fetch(MetadataResult<Episode> result, string path, CancellationToken cancellationToken) protected override void Fetch(MetadataResult<Episode> result, string path, CancellationToken cancellationToken)
{ {
new EpisodeNfoParser(_logger, _config, _providerManager).Fetch(result, path, cancellationToken); new EpisodeNfoParser(_logger, _config, _providerManager, _userManager, _userDataManager).Fetch(result, path, cancellationToken);
} }
/// <inheritdoc /> /// <inheritdoc />

View File

@ -1,5 +1,6 @@
using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Configuration;
using MediaBrowser.Controller.Entities.Movies; using MediaBrowser.Controller.Entities.Movies;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Providers; using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.IO; using MediaBrowser.Model.IO;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
@ -14,16 +15,20 @@ namespace MediaBrowser.XbmcMetadata.Providers
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="MovieNfoProvider"/> class. /// Initializes a new instance of the <see cref="MovieNfoProvider"/> class.
/// </summary> /// </summary>
/// <param name="logger">The logger.</param> /// <param name="logger">Instance of the <see cref="ILogger{MovieNfoProvider}"/> interface.</param>
/// <param name="fileSystem">The file system.</param> /// <param name="fileSystem">Instance of the <see cref="IFileSystem"/> interface.</param>
/// <param name="config">the configuration manager.</param> /// <param name="config">Instance of the <see cref="IConfigurationManager"/> interface.</param>
/// <param name="providerManager">The provider manager.</param> /// <param name="providerManager">Instance of the <see cref="IProviderManager"/> interface.</param>
/// <param name="userManager">Instance of the <see cref="IUserManager"/> interface.</param>
/// <param name="userDataManager">Instance of the <see cref="IUserDataManager"/> interface.</param>
public MovieNfoProvider( public MovieNfoProvider(
ILogger<MovieNfoProvider> logger, ILogger<MovieNfoProvider> logger,
IFileSystem fileSystem, IFileSystem fileSystem,
IConfigurationManager config, IConfigurationManager config,
IProviderManager providerManager) IProviderManager providerManager,
: base(logger, fileSystem, config, providerManager) IUserManager userManager,
IUserDataManager userDataManager)
: base(logger, fileSystem, config, providerManager, userManager, userDataManager)
{ {
} }
} }

View File

@ -1,5 +1,6 @@
using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Configuration;
using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Providers; using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.IO; using MediaBrowser.Model.IO;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
@ -14,12 +15,20 @@ namespace MediaBrowser.XbmcMetadata.Providers
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="MusicVideoNfoProvider"/> class. /// Initializes a new instance of the <see cref="MusicVideoNfoProvider"/> class.
/// </summary> /// </summary>
/// <param name="logger">The logger.</param> /// <param name="logger">Instance of the <see cref="ILogger{SeasonNfoProvider}"/> interface.</param>
/// <param name="fileSystem">The file system.</param> /// <param name="fileSystem">Instance of the <see cref="IFileSystem"/> interface.</param>
/// <param name="config">the configuration manager.</param> /// <param name="config">Instance of the <see cref="IConfigurationManager"/> interface.</param>
/// <param name="providerManager">The provider manager.</param> /// <param name="providerManager">Instance of the <see cref="IProviderManager"/> interface.</param>
public MusicVideoNfoProvider(ILogger<MusicVideoNfoProvider> logger, IFileSystem fileSystem, IConfigurationManager config, IProviderManager providerManager) /// <param name="userManager">Instance of the <see cref="IUserManager"/> interface.</param>
: base(logger, fileSystem, config, providerManager) /// <param name="userDataManager">Instance of the <see cref="IUserDataManager"/> interface.</param>
public MusicVideoNfoProvider(
ILogger<MusicVideoNfoProvider> logger,
IFileSystem fileSystem,
IConfigurationManager config,
IProviderManager providerManager,
IUserManager userManager,
IUserDataManager userDataManager)
: base(logger, fileSystem, config, providerManager, userManager, userDataManager)
{ {
} }
} }

View File

@ -2,6 +2,7 @@ using System.IO;
using System.Threading; using System.Threading;
using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Configuration;
using MediaBrowser.Controller.Entities.TV; using MediaBrowser.Controller.Entities.TV;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Providers; using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.IO; using MediaBrowser.Model.IO;
using MediaBrowser.XbmcMetadata.Parsers; using MediaBrowser.XbmcMetadata.Parsers;
@ -17,30 +18,38 @@ namespace MediaBrowser.XbmcMetadata.Providers
private readonly ILogger<SeasonNfoProvider> _logger; private readonly ILogger<SeasonNfoProvider> _logger;
private readonly IConfigurationManager _config; private readonly IConfigurationManager _config;
private readonly IProviderManager _providerManager; private readonly IProviderManager _providerManager;
private readonly IUserManager _userManager;
private readonly IUserDataManager _userDataManager;
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="SeasonNfoProvider"/> class. /// Initializes a new instance of the <see cref="SeasonNfoProvider"/> class.
/// </summary> /// </summary>
/// <param name="logger">The logger.</param> /// <param name="logger">Instance of the <see cref="ILogger{SeasonNfoProvider}"/> interface.</param>
/// <param name="fileSystem">The file system.</param> /// <param name="fileSystem">Instance of the <see cref="IFileSystem"/> interface.</param>
/// <param name="config">the configuration manager.</param> /// <param name="config">Instance of the <see cref="IConfigurationManager"/> interface.</param>
/// <param name="providerManager">The provider manager.</param> /// <param name="providerManager">Instance of the <see cref="IProviderManager"/> interface.</param>
/// <param name="userManager">Instance of the <see cref="IUserManager"/> interface.</param>
/// <param name="userDataManager">Instance of the <see cref="IUserDataManager"/> interface.</param>
public SeasonNfoProvider( public SeasonNfoProvider(
ILogger<SeasonNfoProvider> logger, ILogger<SeasonNfoProvider> logger,
IFileSystem fileSystem, IFileSystem fileSystem,
IConfigurationManager config, IConfigurationManager config,
IProviderManager providerManager) IProviderManager providerManager,
IUserManager userManager,
IUserDataManager userDataManager)
: base(fileSystem) : base(fileSystem)
{ {
_logger = logger; _logger = logger;
_config = config; _config = config;
_providerManager = providerManager; _providerManager = providerManager;
_userManager = userManager;
_userDataManager = userDataManager;
} }
/// <inheritdoc /> /// <inheritdoc />
protected override void Fetch(MetadataResult<Season> result, string path, CancellationToken cancellationToken) protected override void Fetch(MetadataResult<Season> result, string path, CancellationToken cancellationToken)
{ {
new SeasonNfoParser(_logger, _config, _providerManager).Fetch(result, path, cancellationToken); new SeasonNfoParser(_logger, _config, _providerManager, _userManager, _userDataManager).Fetch(result, path, cancellationToken);
} }
/// <inheritdoc /> /// <inheritdoc />

View File

@ -2,6 +2,7 @@ using System.IO;
using System.Threading; using System.Threading;
using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Configuration;
using MediaBrowser.Controller.Entities.TV; using MediaBrowser.Controller.Entities.TV;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Providers; using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.IO; using MediaBrowser.Model.IO;
using MediaBrowser.XbmcMetadata.Parsers; using MediaBrowser.XbmcMetadata.Parsers;
@ -17,30 +18,38 @@ namespace MediaBrowser.XbmcMetadata.Providers
private readonly ILogger<SeriesNfoProvider> _logger; private readonly ILogger<SeriesNfoProvider> _logger;
private readonly IConfigurationManager _config; private readonly IConfigurationManager _config;
private readonly IProviderManager _providerManager; private readonly IProviderManager _providerManager;
private readonly IUserManager _userManager;
private readonly IUserDataManager _userDataManager;
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="SeriesNfoProvider"/> class. /// Initializes a new instance of the <see cref="SeriesNfoProvider"/> class.
/// </summary> /// </summary>
/// <param name="logger">The logger.</param> /// <param name="logger">Instance of the <see cref="ILogger{SeriesNfoProvider}"/> interface.</param>
/// <param name="fileSystem">The file system.</param> /// <param name="fileSystem">Instance of the <see cref="IFileSystem"/> interface.</param>
/// <param name="config">the configuration manager.</param> /// <param name="config">Instance of the <see cref="IConfigurationManager"/> interface.</param>
/// <param name="providerManager">The provider manager.</param> /// <param name="providerManager">Instance of the <see cref="IProviderManager"/> interface.</param>
/// <param name="userManager">Instance of the <see cref="IUserManager"/> interface.</param>
/// <param name="userDataManager">Instance of the <see cref="IUserDataManager"/> interface.</param>
public SeriesNfoProvider( public SeriesNfoProvider(
ILogger<SeriesNfoProvider> logger, ILogger<SeriesNfoProvider> logger,
IFileSystem fileSystem, IFileSystem fileSystem,
IConfigurationManager config, IConfigurationManager config,
IProviderManager providerManager) IProviderManager providerManager,
IUserManager userManager,
IUserDataManager userDataManager)
: base(fileSystem) : base(fileSystem)
{ {
_logger = logger; _logger = logger;
_config = config; _config = config;
_providerManager = providerManager; _providerManager = providerManager;
_userManager = userManager;
_userDataManager = userDataManager;
} }
/// <inheritdoc /> /// <inheritdoc />
protected override void Fetch(MetadataResult<Series> result, string path, CancellationToken cancellationToken) protected override void Fetch(MetadataResult<Series> result, string path, CancellationToken cancellationToken)
{ {
new SeriesNfoParser(_logger, _config, _providerManager).Fetch(result, path, cancellationToken); new SeriesNfoParser(_logger, _config, _providerManager, _userManager, _userDataManager).Fetch(result, path, cancellationToken);
} }
/// <inheritdoc /> /// <inheritdoc />

View File

@ -1,5 +1,6 @@
using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Configuration;
using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Providers; using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.IO; using MediaBrowser.Model.IO;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
@ -14,12 +15,20 @@ namespace MediaBrowser.XbmcMetadata.Providers
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="VideoNfoProvider"/> class. /// Initializes a new instance of the <see cref="VideoNfoProvider"/> class.
/// </summary> /// </summary>
/// <param name="logger">The logger.</param> /// <param name="logger">Instance of the <see cref="ILogger{VideoNfoProvider}"/> interface.</param>
/// <param name="fileSystem">The file system.</param> /// <param name="fileSystem">Instance of the <see cref="IFileSystem"/> interface.</param>
/// <param name="config">the configuration manager.</param> /// <param name="config">Instance of the <see cref="IConfigurationManager"/> interface.</param>
/// <param name="providerManager">The provider manager.</param> /// <param name="providerManager">Instance of the <see cref="IProviderManager"/> interface.</param>
public VideoNfoProvider(ILogger<VideoNfoProvider> logger, IFileSystem fileSystem, IConfigurationManager config, IProviderManager providerManager) /// <param name="userManager">Instance of the <see cref="IUserManager"/> interface.</param>
: base(logger, fileSystem, config, providerManager) /// <param name="userDataManager">Instance of the <see cref="IUserDataManager"/> interface.</param>
public VideoNfoProvider(
ILogger<VideoNfoProvider> logger,
IFileSystem fileSystem,
IConfigurationManager config,
IProviderManager providerManager,
IUserManager userManager,
IUserDataManager userDataManager)
: base(logger, fileSystem, config, providerManager, userManager, userDataManager)
{ {
} }
} }

View File

@ -3,6 +3,7 @@ using System.Linq;
using System.Threading; using System.Threading;
using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Configuration;
using MediaBrowser.Controller.Entities.TV; using MediaBrowser.Controller.Entities.TV;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Providers; using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Configuration; using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.Entities; using MediaBrowser.Model.Entities;
@ -34,7 +35,10 @@ namespace Jellyfin.XbmcMetadata.Tests.Parsers
var config = new Mock<IConfigurationManager>(); var config = new Mock<IConfigurationManager>();
config.Setup(x => x.GetConfiguration(It.IsAny<string>())) config.Setup(x => x.GetConfiguration(It.IsAny<string>()))
.Returns(new XbmcMetadataOptions()); .Returns(new XbmcMetadataOptions());
_parser = new EpisodeNfoParser(new NullLogger<EpisodeNfoParser>(), config.Object, providerManager.Object); var user = new Mock<IUserManager>();
var userData = new Mock<IUserDataManager>();
_parser = new EpisodeNfoParser(new NullLogger<EpisodeNfoParser>(), config.Object, providerManager.Object, user.Object, userData.Object);
} }
[Fact] [Fact]

View File

@ -1,8 +1,10 @@
using System; using System;
using System.Linq; using System.Linq;
using System.Threading; using System.Threading;
using Jellyfin.Data.Entities;
using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Configuration;
using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Providers; using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Configuration; using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.Entities; using MediaBrowser.Model.Entities;
@ -18,9 +20,13 @@ namespace Jellyfin.XbmcMetadata.Tests.Parsers
public class MovieNfoParserTests public class MovieNfoParserTests
{ {
private readonly MovieNfoParser _parser; private readonly MovieNfoParser _parser;
private readonly IUserDataManager _userDataManager;
private readonly User _testUser;
public MovieNfoParserTests() public MovieNfoParserTests()
{ {
_testUser = new User("Test User", "Auth provider", "Reset provider");
var providerManager = new Mock<IProviderManager>(); var providerManager = new Mock<IProviderManager>();
var tmdbExternalId = new TmdbMovieExternalId(); var tmdbExternalId = new TmdbMovieExternalId();
@ -29,10 +35,24 @@ namespace Jellyfin.XbmcMetadata.Tests.Parsers
providerManager.Setup(x => x.GetExternalIdInfos(It.IsAny<IHasProviderIds>())) providerManager.Setup(x => x.GetExternalIdInfos(It.IsAny<IHasProviderIds>()))
.Returns(new[] { externalIdInfo }); .Returns(new[] { externalIdInfo });
var config = new Mock<IConfigurationManager>(); var nfoConfig = new XbmcMetadataOptions()
config.Setup(x => x.GetConfiguration(It.IsAny<string>())) {
.Returns(new XbmcMetadataOptions()); UserId = "F38E6443-090B-4F7A-BD12-9CFF5020F7BC"
_parser = new MovieNfoParser(new NullLogger<MovieNfoParser>(), config.Object, providerManager.Object); };
var configManager = new Mock<IConfigurationManager>();
configManager.Setup(x => x.GetConfiguration(It.IsAny<string>()))
.Returns(nfoConfig);
var user = new Mock<IUserManager>();
user.Setup(x => x.GetUserById(It.IsAny<Guid>()))
.Returns(_testUser);
var userData = new Mock<IUserDataManager>();
userData.Setup(x => x.GetUserData(_testUser, It.IsAny<BaseItem>()))
.Returns(new UserItemData());
_userDataManager = userData.Object;
_parser = new MovieNfoParser(new NullLogger<MovieNfoParser>(), configManager.Object, providerManager.Object, user.Object, userData.Object);
} }
[Fact] [Fact]
@ -94,6 +114,12 @@ namespace Jellyfin.XbmcMetadata.Tests.Parsers
Assert.Equal("Test Lyricist", lyricist!.Name); Assert.Equal("Test Lyricist", lyricist!.Name);
Assert.Equal(new DateTime(2019, 8, 6, 9, 1, 18), item.DateCreated); Assert.Equal(new DateTime(2019, 8, 6, 9, 1, 18), item.DateCreated);
// userData
var userData = _userDataManager.GetUserData(_testUser, item);
Assert.Equal(2, userData.PlayCount);
Assert.True(userData.Played);
Assert.Equal(new DateTime(2021, 02, 11, 07, 47, 23), userData.LastPlayedDate);
} }
[Fact] [Fact]

View File

@ -5,6 +5,7 @@ using System.Linq;
using System.Threading; using System.Threading;
using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Configuration;
using MediaBrowser.Controller.Entities.Audio; using MediaBrowser.Controller.Entities.Audio;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Providers; using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Configuration; using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.Entities; using MediaBrowser.Model.Entities;
@ -35,7 +36,10 @@ namespace Jellyfin.XbmcMetadata.Tests.Parsers
var config = new Mock<IConfigurationManager>(); var config = new Mock<IConfigurationManager>();
config.Setup(x => x.GetConfiguration(It.IsAny<string>())) config.Setup(x => x.GetConfiguration(It.IsAny<string>()))
.Returns(new XbmcMetadataOptions()); .Returns(new XbmcMetadataOptions());
_parser = new BaseNfoParser<MusicAlbum>(new NullLogger<BaseNfoParser<MusicAlbum>>(), config.Object, providerManager.Object); var user = new Mock<IUserManager>();
var userData = new Mock<IUserDataManager>();
_parser = new BaseNfoParser<MusicAlbum>(new NullLogger<BaseNfoParser<MusicAlbum>>(), config.Object, providerManager.Object, user.Object, userData.Object);
} }
[Fact] [Fact]

View File

@ -3,6 +3,7 @@ using System.Linq;
using System.Threading; using System.Threading;
using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Configuration;
using MediaBrowser.Controller.Entities.Audio; using MediaBrowser.Controller.Entities.Audio;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Providers; using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Configuration; using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.Entities; using MediaBrowser.Model.Entities;
@ -32,7 +33,10 @@ namespace Jellyfin.XbmcMetadata.Tests.Parsers
var config = new Mock<IConfigurationManager>(); var config = new Mock<IConfigurationManager>();
config.Setup(x => x.GetConfiguration(It.IsAny<string>())) config.Setup(x => x.GetConfiguration(It.IsAny<string>()))
.Returns(new XbmcMetadataOptions()); .Returns(new XbmcMetadataOptions());
_parser = new BaseNfoParser<MusicArtist>(new NullLogger<BaseNfoParser<MusicArtist>>(), config.Object, providerManager.Object); var user = new Mock<IUserManager>();
var userData = new Mock<IUserDataManager>();
_parser = new BaseNfoParser<MusicArtist>(new NullLogger<BaseNfoParser<MusicArtist>>(), config.Object, providerManager.Object, user.Object, userData.Object);
} }
[Fact] [Fact]

View File

@ -5,6 +5,7 @@ using System.Linq;
using System.Threading; using System.Threading;
using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Configuration;
using MediaBrowser.Controller.Entities.TV; using MediaBrowser.Controller.Entities.TV;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Providers; using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Configuration; using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.Entities; using MediaBrowser.Model.Entities;
@ -28,7 +29,10 @@ namespace Jellyfin.XbmcMetadata.Tests.Parsers
var config = new Mock<IConfigurationManager>(); var config = new Mock<IConfigurationManager>();
config.Setup(x => x.GetConfiguration(It.IsAny<string>())) config.Setup(x => x.GetConfiguration(It.IsAny<string>()))
.Returns(new XbmcMetadataOptions()); .Returns(new XbmcMetadataOptions());
_parser = new SeasonNfoParser(new NullLogger<SeasonNfoParser>(), config.Object, providerManager.Object); var user = new Mock<IUserManager>();
var userData = new Mock<IUserDataManager>();
_parser = new SeasonNfoParser(new NullLogger<SeasonNfoParser>(), config.Object, providerManager.Object, user.Object, userData.Object);
} }
[Fact] [Fact]

View File

@ -3,6 +3,7 @@ using System.Linq;
using System.Threading; using System.Threading;
using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Configuration;
using MediaBrowser.Controller.Entities.TV; using MediaBrowser.Controller.Entities.TV;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Providers; using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Configuration; using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.Entities; using MediaBrowser.Model.Entities;
@ -26,7 +27,10 @@ namespace Jellyfin.XbmcMetadata.Tests.Parsers
var config = new Mock<IConfigurationManager>(); var config = new Mock<IConfigurationManager>();
config.Setup(x => x.GetConfiguration(It.IsAny<string>())) config.Setup(x => x.GetConfiguration(It.IsAny<string>()))
.Returns(new XbmcMetadataOptions()); .Returns(new XbmcMetadataOptions());
_parser = new SeriesNfoParser(new NullLogger<SeriesNfoParser>(), config.Object, providerManager.Object); var user = new Mock<IUserManager>();
var userData = new Mock<IUserDataManager>();
_parser = new SeriesNfoParser(new NullLogger<SeriesNfoParser>(), config.Object, providerManager.Object, user.Object, userData.Object);
} }
[Fact] [Fact]

View File

@ -30,6 +30,9 @@
<plot>Fueled by his restored faith in humanity and inspired by Superman&apos;s selfless act, Bruce Wayne enlists the help of his newfound ally, Diana Prince, to face an even greater enemy. Together, Batman and Wonder Woman work quickly to find and recruit a team of meta-humans to stand against this newly awakened threat. But despite the formation of this unprecedented league of heroes-Batman, Wonder Woman, Aquaman, Cyborg and The Flash-it may already be too late to save the planet from an assault of catastrophic proportions.</plot> <plot>Fueled by his restored faith in humanity and inspired by Superman&apos;s selfless act, Bruce Wayne enlists the help of his newfound ally, Diana Prince, to face an even greater enemy. Together, Batman and Wonder Woman work quickly to find and recruit a team of meta-humans to stand against this newly awakened threat. But despite the formation of this unprecedented league of heroes-Batman, Wonder Woman, Aquaman, Cyborg and The Flash-it may already be too late to save the planet from an assault of catastrophic proportions.</plot>
<tagline>Justice for all.</tagline> <tagline>Justice for all.</tagline>
<runtime>120</runtime> <runtime>120</runtime>
<playcount>2</playcount>
<watched>true</watched>
<lastplayed>2021-02-11 07:47:23</lastplayed>
<tmdbId>141052</tmdbId> <tmdbId>141052</tmdbId>
<thumb aspect="set.poster" preview="https://assets.fanart.tv/preview/movies/468551/movieposter/justice-league-collection-5c24ea65591d3.jpg">https://assets.fanart.tv/fanart/movies/468551/movieposter/justice-league-collection-5c24ea65591d3.jpg</thumb> <thumb aspect="set.poster" preview="https://assets.fanart.tv/preview/movies/468551/movieposter/justice-league-collection-5c24ea65591d3.jpg">https://assets.fanart.tv/fanart/movies/468551/movieposter/justice-league-collection-5c24ea65591d3.jpg</thumb>
<thumb aspect="set.poster" preview="https://assets.fanart.tv/preview/movies/468551/movieposter/justice-league-collection-5c24ea65591d3.jpg">https://assets.fanart.tv/fanart/movies/468551/movieposter/justice-league-collection-5c24ea65591d3.jpg</thumb> <thumb aspect="set.poster" preview="https://assets.fanart.tv/preview/movies/468551/movieposter/justice-league-collection-5c24ea65591d3.jpg">https://assets.fanart.tv/fanart/movies/468551/movieposter/justice-league-collection-5c24ea65591d3.jpg</thumb>
@ -82,8 +85,6 @@
<thumb preview="https://assets.fanart.tv/preview/movies/141052/moviebackground/justice-league-5a119394ea362.jpg">https://assets.fanart.tv/fanart/movies/141052/moviebackground/justice-league-5a119394ea362.jpg</thumb> <thumb preview="https://assets.fanart.tv/preview/movies/141052/moviebackground/justice-league-5a119394ea362.jpg">https://assets.fanart.tv/fanart/movies/141052/moviebackground/justice-league-5a119394ea362.jpg</thumb>
</fanart> </fanart>
<mpaa>Australia:M</mpaa> <mpaa>Australia:M</mpaa>
<playcount>0</playcount>
<lastplayed></lastplayed>
<id>tt0974015</id> <id>tt0974015</id>
<uniqueid type="imdb" default="true">tt0974015</uniqueid> <uniqueid type="imdb" default="true">tt0974015</uniqueid>
<genre>Action</genre> <genre>Action</genre>