using MediaBrowser.Common.Extensions;
using MediaBrowser.Common.IO;
using MediaBrowser.Common.Logging;
using MediaBrowser.Common.Win32;
using MediaBrowser.Model.Entities;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.Serialization;
using System.Threading;
using System.Threading.Tasks;
namespace MediaBrowser.Controller.Entities.Movies
{
///
/// Class Movie
///
public class Movie : Video
{
///
/// Should be overridden to return the proper folder where metadata lives
///
/// The meta location.
[IgnoreDataMember]
public override string MetaLocation
{
get
{
return VideoType == VideoType.VideoFile || VideoType == VideoType.Iso ? System.IO.Path.GetDirectoryName(Path) : Path;
}
}
///
/// Override to use tmdb or imdb id so it will stick if the item moves physical locations
///
/// The user data id.
[IgnoreDataMember]
public override Guid UserDataId
{
get
{
if (_userDataId == Guid.Empty)
{
var baseId = this.GetProviderId(MetadataProviders.Tmdb) ?? this.GetProviderId(MetadataProviders.Imdb);
_userDataId = baseId != null ? baseId.GetMD5() : Id;
}
return _userDataId;
}
}
///
/// The _special features
///
private List