removed dead db fields
This commit is contained in:
parent
6e222eaaf4
commit
35fc099114
|
@ -211,11 +211,6 @@ namespace MediaBrowser.Api
|
|||
|
||||
UpdateItem(request, item);
|
||||
|
||||
if (isLockedChanged && item.IsLocked)
|
||||
{
|
||||
item.IsUnidentified = false;
|
||||
}
|
||||
|
||||
await item.UpdateToRepository(ItemUpdateType.MetadataEdit, CancellationToken.None).ConfigureAwait(false);
|
||||
|
||||
if (request.People != null)
|
||||
|
@ -321,13 +316,8 @@ namespace MediaBrowser.Api
|
|||
|
||||
SetProductionLocations(item, request);
|
||||
|
||||
var hasLang = item as IHasPreferredMetadataLanguage;
|
||||
|
||||
if (hasLang != null)
|
||||
{
|
||||
hasLang.PreferredMetadataCountryCode = request.PreferredMetadataCountryCode;
|
||||
hasLang.PreferredMetadataLanguage = request.PreferredMetadataLanguage;
|
||||
}
|
||||
item.PreferredMetadataCountryCode = request.PreferredMetadataCountryCode;
|
||||
item.PreferredMetadataLanguage = request.PreferredMetadataLanguage;
|
||||
|
||||
var hasDisplayOrder = item as IHasDisplayOrder;
|
||||
if (hasDisplayOrder != null)
|
||||
|
|
|
@ -43,7 +43,6 @@ namespace MediaBrowser.Api.Reports
|
|||
MusicArtist,
|
||||
AudioAlbum,
|
||||
Locked,
|
||||
Unidentified,
|
||||
ImagePrimary,
|
||||
ImageBackdrop,
|
||||
ImageLogo,
|
||||
|
|
|
@ -17,7 +17,6 @@ namespace MediaBrowser.Api.Reports
|
|||
TrailersImage,
|
||||
SpecialsImage,
|
||||
LockDataImage,
|
||||
UnidentifiedImage,
|
||||
TagsPrimaryImage,
|
||||
TagsBackdropImage,
|
||||
TagsLogoImage,
|
||||
|
|
|
@ -105,7 +105,6 @@ namespace MediaBrowser.Api.Reports
|
|||
{
|
||||
HeaderMetadata.Status,
|
||||
HeaderMetadata.Locked,
|
||||
HeaderMetadata.Unidentified,
|
||||
HeaderMetadata.ImagePrimary,
|
||||
HeaderMetadata.ImageBackdrop,
|
||||
HeaderMetadata.ImageLogo,
|
||||
|
@ -122,7 +121,6 @@ namespace MediaBrowser.Api.Reports
|
|||
{
|
||||
HeaderMetadata.Status,
|
||||
HeaderMetadata.Locked,
|
||||
HeaderMetadata.Unidentified,
|
||||
HeaderMetadata.ImagePrimary,
|
||||
HeaderMetadata.ImageBackdrop,
|
||||
HeaderMetadata.ImageLogo,
|
||||
|
@ -143,7 +141,6 @@ namespace MediaBrowser.Api.Reports
|
|||
{
|
||||
HeaderMetadata.Status,
|
||||
HeaderMetadata.Locked,
|
||||
HeaderMetadata.Unidentified,
|
||||
HeaderMetadata.ImagePrimary,
|
||||
HeaderMetadata.ImageBackdrop,
|
||||
HeaderMetadata.ImageLogo,
|
||||
|
@ -161,7 +158,6 @@ namespace MediaBrowser.Api.Reports
|
|||
{
|
||||
HeaderMetadata.Status,
|
||||
HeaderMetadata.Locked,
|
||||
HeaderMetadata.Unidentified,
|
||||
HeaderMetadata.ImagePrimary,
|
||||
HeaderMetadata.ImageBackdrop,
|
||||
HeaderMetadata.ImageLogo,
|
||||
|
@ -177,7 +173,6 @@ namespace MediaBrowser.Api.Reports
|
|||
{
|
||||
HeaderMetadata.Status,
|
||||
HeaderMetadata.Locked,
|
||||
HeaderMetadata.Unidentified,
|
||||
HeaderMetadata.ImagePrimary,
|
||||
HeaderMetadata.ImageBackdrop,
|
||||
HeaderMetadata.ImageLogo,
|
||||
|
@ -198,7 +193,6 @@ namespace MediaBrowser.Api.Reports
|
|||
{
|
||||
HeaderMetadata.Status,
|
||||
HeaderMetadata.Locked,
|
||||
HeaderMetadata.Unidentified,
|
||||
HeaderMetadata.ImagePrimary,
|
||||
HeaderMetadata.ImageBackdrop,
|
||||
HeaderMetadata.ImageLogo,
|
||||
|
@ -223,7 +217,6 @@ namespace MediaBrowser.Api.Reports
|
|||
{
|
||||
HeaderMetadata.Status,
|
||||
HeaderMetadata.Locked,
|
||||
HeaderMetadata.Unidentified,
|
||||
HeaderMetadata.ImagePrimary,
|
||||
HeaderMetadata.ImageBackdrop,
|
||||
HeaderMetadata.ImageLogo,
|
||||
|
@ -241,7 +234,6 @@ namespace MediaBrowser.Api.Reports
|
|||
{
|
||||
HeaderMetadata.Status,
|
||||
HeaderMetadata.Locked,
|
||||
HeaderMetadata.Unidentified,
|
||||
HeaderMetadata.ImagePrimary,
|
||||
HeaderMetadata.ImageBackdrop,
|
||||
HeaderMetadata.ImageLogo,
|
||||
|
@ -260,7 +252,6 @@ namespace MediaBrowser.Api.Reports
|
|||
{
|
||||
HeaderMetadata.Status,
|
||||
HeaderMetadata.Locked,
|
||||
HeaderMetadata.Unidentified,
|
||||
HeaderMetadata.ImagePrimary,
|
||||
HeaderMetadata.ImageBackdrop,
|
||||
HeaderMetadata.ImageLogo,
|
||||
|
@ -284,7 +275,6 @@ namespace MediaBrowser.Api.Reports
|
|||
{
|
||||
HeaderMetadata.Status,
|
||||
HeaderMetadata.Locked,
|
||||
HeaderMetadata.Unidentified,
|
||||
HeaderMetadata.ImagePrimary,
|
||||
HeaderMetadata.ImageBackdrop,
|
||||
HeaderMetadata.ImageLogo,
|
||||
|
@ -315,11 +305,9 @@ namespace MediaBrowser.Api.Reports
|
|||
{
|
||||
HeaderMetadata.Status,
|
||||
HeaderMetadata.Locked,
|
||||
HeaderMetadata.Unidentified,
|
||||
HeaderMetadata.ImagePrimary,
|
||||
HeaderMetadata.ImageBackdrop,
|
||||
HeaderMetadata.ImageLogo,
|
||||
HeaderMetadata.Unidentified,
|
||||
HeaderMetadata.ImagePrimary,
|
||||
HeaderMetadata.ImageBackdrop,
|
||||
HeaderMetadata.ImageLogo,
|
||||
|
@ -376,12 +364,6 @@ namespace MediaBrowser.Api.Reports
|
|||
option.Header.CanGroup = false;
|
||||
option.Header.DisplayType = ReportDisplayType.Export;
|
||||
break;
|
||||
case HeaderMetadata.Unidentified:
|
||||
option.Column = (i, r) => this.GetBoolString(r.IsUnidentified);
|
||||
option.Header.ItemViewType = ItemViewType.UnidentifiedImage;
|
||||
option.Header.CanGroup = false;
|
||||
option.Header.DisplayType = ReportDisplayType.Export;
|
||||
break;
|
||||
case HeaderMetadata.ImagePrimary:
|
||||
option.Column = (i, r) => this.GetBoolString(r.HasImageTagsPrimary);
|
||||
option.Header.ItemViewType = ItemViewType.TagsPrimaryImage;
|
||||
|
@ -633,7 +615,6 @@ namespace MediaBrowser.Api.Reports
|
|||
{
|
||||
Id = item.Id.ToString("N"),
|
||||
HasLockData = item.IsLocked,
|
||||
IsUnidentified = item.IsUnidentified,
|
||||
HasLocalTrailer = hasTrailers != null ? hasTrailers.GetTrailerIds().Count() > 0 : false,
|
||||
HasImageTagsPrimary = (item.ImageInfos != null && item.ImageInfos.Count(n => n.Type == ImageType.Primary) > 0),
|
||||
HasImageTagsBackdrop = (item.ImageInfos != null && item.ImageInfos.Count(n => n.Type == ImageType.Backdrop) > 0),
|
||||
|
|
|
@ -56,10 +56,6 @@ namespace MediaBrowser.Api.Reports
|
|||
/// <value> true if this object has specials, false if not. </value>
|
||||
public bool HasSpecials { get; set; }
|
||||
|
||||
/// <summary> Gets or sets a value indicating whether this object is unidentified. </summary>
|
||||
/// <value> true if this object is unidentified, false if not. </value>
|
||||
public bool IsUnidentified { get; set; }
|
||||
|
||||
/// <summary> Gets or sets the columns. </summary>
|
||||
/// <value> The columns. </value>
|
||||
public List<ReportItem> Columns { get; set; }
|
||||
|
|
|
@ -226,7 +226,6 @@ namespace MediaBrowser.Api.Reports
|
|||
NameStartsWithOrGreater = request.NameStartsWithOrGreater,
|
||||
HasImdbId = request.HasImdbId,
|
||||
IsYearMismatched = request.IsYearMismatched,
|
||||
IsUnidentified = request.IsUnidentified,
|
||||
IsPlaceHolder = request.IsPlaceHolder,
|
||||
IsLocked = request.IsLocked,
|
||||
IsInBoxSet = request.IsInBoxSet,
|
||||
|
|
|
@ -299,9 +299,6 @@ namespace MediaBrowser.Api.UserLibrary
|
|||
[ApiMember(Name = "IsLocked", Description = "Optional filter by items that are locked.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
|
||||
public bool? IsLocked { get; set; }
|
||||
|
||||
[ApiMember(Name = "IsUnidentified", Description = "Optional filter by items that are unidentified by internet metadata providers.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
|
||||
public bool? IsUnidentified { get; set; }
|
||||
|
||||
[ApiMember(Name = "IsPlaceHolder", Description = "Optional filter by items that are placeholders", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
|
||||
public bool? IsPlaceHolder { get; set; }
|
||||
|
||||
|
|
|
@ -192,7 +192,6 @@ namespace MediaBrowser.Api.UserLibrary
|
|||
NameStartsWithOrGreater = request.NameStartsWithOrGreater,
|
||||
HasImdbId = request.HasImdbId,
|
||||
IsYearMismatched = request.IsYearMismatched,
|
||||
IsUnidentified = request.IsUnidentified,
|
||||
IsPlaceHolder = request.IsPlaceHolder,
|
||||
IsLocked = request.IsLocked,
|
||||
IsInBoxSet = request.IsInBoxSet,
|
||||
|
|
|
@ -10,8 +10,6 @@ namespace MediaBrowser.Controller.Channels
|
|||
{
|
||||
public class Channel : Folder
|
||||
{
|
||||
public string OriginalChannelName { get; set; }
|
||||
|
||||
public override bool IsVisible(User user)
|
||||
{
|
||||
if (user.Policy.BlockedChannels != null)
|
||||
|
|
|
@ -55,6 +55,9 @@ namespace MediaBrowser.Controller.Entities
|
|||
public static string ThemeSongFilename = "theme";
|
||||
public static string ThemeVideosFolderName = "backdrops";
|
||||
|
||||
public string PreferredMetadataCountryCode { get; set; }
|
||||
public string PreferredMetadataLanguage { get; set; }
|
||||
|
||||
public List<ItemImageInfo> ImageInfos { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
@ -333,8 +336,6 @@ namespace MediaBrowser.Controller.Entities
|
|||
|
||||
[IgnoreDataMember]
|
||||
public bool IsLocked { get; set; }
|
||||
|
||||
public bool IsUnidentified { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the locked fields.
|
||||
|
@ -973,18 +974,11 @@ namespace MediaBrowser.Controller.Entities
|
|||
/// <returns>System.String.</returns>
|
||||
public string GetPreferredMetadataLanguage()
|
||||
{
|
||||
string lang = null;
|
||||
|
||||
var hasLang = this as IHasPreferredMetadataLanguage;
|
||||
|
||||
if (hasLang != null)
|
||||
{
|
||||
lang = hasLang.PreferredMetadataLanguage;
|
||||
}
|
||||
string lang = PreferredMetadataLanguage;
|
||||
|
||||
if (string.IsNullOrWhiteSpace(lang))
|
||||
{
|
||||
lang = Parents.OfType<IHasPreferredMetadataLanguage>()
|
||||
lang = Parents
|
||||
.Select(i => i.PreferredMetadataLanguage)
|
||||
.FirstOrDefault(i => !string.IsNullOrWhiteSpace(i));
|
||||
}
|
||||
|
@ -1010,18 +1004,11 @@ namespace MediaBrowser.Controller.Entities
|
|||
/// <returns>System.String.</returns>
|
||||
public string GetPreferredMetadataCountryCode()
|
||||
{
|
||||
string lang = null;
|
||||
|
||||
var hasLang = this as IHasPreferredMetadataLanguage;
|
||||
|
||||
if (hasLang != null)
|
||||
{
|
||||
lang = hasLang.PreferredMetadataCountryCode;
|
||||
}
|
||||
string lang = PreferredMetadataCountryCode;
|
||||
|
||||
if (string.IsNullOrWhiteSpace(lang))
|
||||
{
|
||||
lang = Parents.OfType<IHasPreferredMetadataLanguage>()
|
||||
lang = Parents
|
||||
.Select(i => i.PreferredMetadataCountryCode)
|
||||
.FirstOrDefault(i => !string.IsNullOrWhiteSpace(i));
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ using MediaBrowser.Model.Users;
|
|||
|
||||
namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
public class Book : BaseItem, IHasTags, IHasPreferredMetadataLanguage, IHasLookupInfo<BookInfo>, IHasSeries
|
||||
public class Book : BaseItem, IHasTags, IHasLookupInfo<BookInfo>, IHasSeries
|
||||
{
|
||||
public override string MediaType
|
||||
{
|
||||
|
@ -25,14 +25,6 @@ namespace MediaBrowser.Controller.Entities
|
|||
|
||||
public string SeriesName { get; set; }
|
||||
|
||||
public string PreferredMetadataLanguage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the preferred metadata country code.
|
||||
/// </summary>
|
||||
/// <value>The preferred metadata country code.</value>
|
||||
public string PreferredMetadataCountryCode { get; set; }
|
||||
|
||||
public Book()
|
||||
{
|
||||
Tags = new List<string>();
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace MediaBrowser.Controller.Entities
|
|||
/// <summary>
|
||||
/// Class Folder
|
||||
/// </summary>
|
||||
public class Folder : BaseItem, IHasThemeMedia, IHasTags, IHasPreferredMetadataLanguage
|
||||
public class Folder : BaseItem, IHasThemeMedia, IHasTags
|
||||
{
|
||||
public static IUserManager UserManager { get; set; }
|
||||
public static IUserViewManager UserViewManager { get; set; }
|
||||
|
@ -28,14 +28,6 @@ namespace MediaBrowser.Controller.Entities
|
|||
public List<Guid> ThemeVideoIds { get; set; }
|
||||
public List<string> Tags { get; set; }
|
||||
|
||||
public string PreferredMetadataLanguage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the preferred metadata country code.
|
||||
/// </summary>
|
||||
/// <value>The preferred metadata country code.</value>
|
||||
public string PreferredMetadataCountryCode { get; set; }
|
||||
|
||||
public Folder()
|
||||
{
|
||||
LinkedChildren = new List<LinkedChild>();
|
||||
|
|
|
@ -8,19 +8,11 @@ using System.Linq;
|
|||
|
||||
namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
public class Game : BaseItem, IHasTrailers, IHasThemeMedia, IHasTags, IHasScreenshots, ISupportsPlaceHolders, IHasPreferredMetadataLanguage, IHasLookupInfo<GameInfo>
|
||||
public class Game : BaseItem, IHasTrailers, IHasThemeMedia, IHasTags, IHasScreenshots, ISupportsPlaceHolders, IHasLookupInfo<GameInfo>
|
||||
{
|
||||
public List<Guid> ThemeSongIds { get; set; }
|
||||
public List<Guid> ThemeVideoIds { get; set; }
|
||||
|
||||
public string PreferredMetadataLanguage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the preferred metadata country code.
|
||||
/// </summary>
|
||||
/// <value>The preferred metadata country code.</value>
|
||||
public string PreferredMetadataCountryCode { get; set; }
|
||||
|
||||
public Game()
|
||||
{
|
||||
MultiPartGameFiles = new List<string>();
|
||||
|
|
|
@ -44,12 +44,6 @@ namespace MediaBrowser.Controller.Entities
|
|||
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
|
||||
bool BeforeMetadataRefresh();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this instance is unidentified.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance is unidentified; otherwise, <c>false</c>.</value>
|
||||
bool IsUnidentified { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Afters the metadata refresh.
|
||||
/// </summary>
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
|
||||
namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface IHasPreferredMetadataLanguage
|
||||
/// </summary>
|
||||
public interface IHasPreferredMetadataLanguage
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the preferred metadata language.
|
||||
/// </summary>
|
||||
/// <value>The preferred metadata language.</value>
|
||||
string PreferredMetadataLanguage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the preferred metadata country code.
|
||||
/// </summary>
|
||||
/// <value>The preferred metadata country code.</value>
|
||||
string PreferredMetadataCountryCode { get; set; }
|
||||
}
|
||||
}
|
|
@ -52,7 +52,6 @@ namespace MediaBrowser.Controller.Entities
|
|||
public bool? IsHD { get; set; }
|
||||
public bool? IsInBoxSet { get; set; }
|
||||
public bool? IsLocked { get; set; }
|
||||
public bool? IsUnidentified { get; set; }
|
||||
public bool? IsPlaceHolder { get; set; }
|
||||
public bool? IsYearMismatched { get; set; }
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ namespace MediaBrowser.Controller.Entities.TV
|
|||
public List<Guid> SpecialFeatureIds { get; set; }
|
||||
|
||||
public string OriginalTitle { get; set; }
|
||||
public int SeasonCount { get; set; }
|
||||
|
||||
public int? AnimeSeriesIndex { get; set; }
|
||||
|
||||
|
|
|
@ -1036,11 +1036,6 @@ namespace MediaBrowser.Controller.Entities
|
|||
return false;
|
||||
}
|
||||
|
||||
if (request.IsUnidentified.HasValue)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(request.Person))
|
||||
{
|
||||
return false;
|
||||
|
@ -1429,15 +1424,6 @@ namespace MediaBrowser.Controller.Entities
|
|||
}
|
||||
}
|
||||
|
||||
if (query.IsUnidentified.HasValue)
|
||||
{
|
||||
var val = query.IsUnidentified.Value;
|
||||
if (item.IsUnidentified != val)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (query.HasImdbId.HasValue)
|
||||
{
|
||||
var filterValue = query.HasImdbId.Value;
|
||||
|
|
|
@ -23,7 +23,6 @@ namespace MediaBrowser.Controller.Entities
|
|||
ISupportsPlaceHolders,
|
||||
IHasMediaSources,
|
||||
IHasShortOverview,
|
||||
IHasPreferredMetadataLanguage,
|
||||
IThemeMedia,
|
||||
IArchivable
|
||||
{
|
||||
|
@ -48,13 +47,6 @@ namespace MediaBrowser.Controller.Entities
|
|||
public string ShortOverview { get; set; }
|
||||
public ExtraType? ExtraType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the preferred metadata country code.
|
||||
/// </summary>
|
||||
/// <value>The preferred metadata country code.</value>
|
||||
public string PreferredMetadataCountryCode { get; set; }
|
||||
public string PreferredMetadataLanguage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the timestamp.
|
||||
/// </summary>
|
||||
|
|
|
@ -144,7 +144,6 @@
|
|||
<Compile Include="Entities\IHasMediaSources.cs" />
|
||||
<Compile Include="Entities\IHasMetascore.cs" />
|
||||
<Compile Include="Entities\IHasOriginalTitle.cs" />
|
||||
<Compile Include="Entities\IHasPreferredMetadataLanguage.cs" />
|
||||
<Compile Include="Entities\IHasProductionLocations.cs" />
|
||||
<Compile Include="Entities\IHasProgramAttributes.cs" />
|
||||
<Compile Include="Entities\IHasScreenshots.cs" />
|
||||
|
|
|
@ -304,11 +304,7 @@ namespace MediaBrowser.Controller.Providers
|
|||
{
|
||||
var val = reader.ReadElementContentAsString();
|
||||
|
||||
var hasLanguage = item as IHasPreferredMetadataLanguage;
|
||||
if (hasLanguage != null)
|
||||
{
|
||||
hasLanguage.PreferredMetadataLanguage = val;
|
||||
}
|
||||
item.PreferredMetadataLanguage = val;
|
||||
|
||||
break;
|
||||
}
|
||||
|
@ -317,11 +313,7 @@ namespace MediaBrowser.Controller.Providers
|
|||
{
|
||||
var val = reader.ReadElementContentAsString();
|
||||
|
||||
var hasLanguage = item as IHasPreferredMetadataLanguage;
|
||||
if (hasLanguage != null)
|
||||
{
|
||||
hasLanguage.PreferredMetadataCountryCode = val;
|
||||
}
|
||||
item.PreferredMetadataCountryCode = val;
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -426,17 +426,13 @@ namespace MediaBrowser.LocalMetadata.Savers
|
|||
}
|
||||
}
|
||||
|
||||
var hasLanguage = item as IHasPreferredMetadataLanguage;
|
||||
if (hasLanguage != null)
|
||||
if (!string.IsNullOrEmpty(item.PreferredMetadataLanguage))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(hasLanguage.PreferredMetadataLanguage))
|
||||
{
|
||||
builder.Append("<Language>" + SecurityElement.Escape(hasLanguage.PreferredMetadataLanguage) + "</Language>");
|
||||
}
|
||||
if (!string.IsNullOrEmpty(hasLanguage.PreferredMetadataCountryCode))
|
||||
{
|
||||
builder.Append("<CountryCode>" + SecurityElement.Escape(hasLanguage.PreferredMetadataCountryCode) + "</CountryCode>");
|
||||
}
|
||||
builder.Append("<Language>" + SecurityElement.Escape(item.PreferredMetadataLanguage) + "</Language>");
|
||||
}
|
||||
if (!string.IsNullOrEmpty(item.PreferredMetadataCountryCode))
|
||||
{
|
||||
builder.Append("<CountryCode>" + SecurityElement.Escape(item.PreferredMetadataCountryCode) + "</CountryCode>");
|
||||
}
|
||||
|
||||
// Use original runtime here, actual file runtime later in MediaInfo
|
||||
|
|
|
@ -275,12 +275,6 @@ namespace MediaBrowser.Model.Dto
|
|||
/// <value>The production year.</value>
|
||||
public int? ProductionYear { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the season count.
|
||||
/// </summary>
|
||||
/// <value>The season count.</value>
|
||||
public int? SeasonCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the players supported by a game.
|
||||
/// </summary>
|
||||
|
|
|
@ -483,13 +483,7 @@ namespace MediaBrowser.Providers.Manager
|
|||
}
|
||||
}
|
||||
|
||||
var isUnidentified = failedProviderCount > 0 && successfulProviderCount == 0;
|
||||
|
||||
if (item.IsUnidentified != isUnidentified)
|
||||
{
|
||||
item.IsUnidentified = isUnidentified;
|
||||
refreshResult.UpdateType = refreshResult.UpdateType | ItemUpdateType.MetadataImport;
|
||||
}
|
||||
//var isUnidentified = failedProviderCount > 0 && successfulProviderCount == 0;
|
||||
|
||||
foreach (var provider in customProviders.Where(i => !(i is IPreRefreshProvider)))
|
||||
{
|
||||
|
|
|
@ -227,14 +227,8 @@ namespace MediaBrowser.Providers.Manager
|
|||
target.DateCreated = source.DateCreated;
|
||||
}
|
||||
|
||||
var sourceHasLanguageSettings = source as IHasPreferredMetadataLanguage;
|
||||
var targetHasLanguageSettings = target as IHasPreferredMetadataLanguage;
|
||||
|
||||
if (sourceHasLanguageSettings != null && targetHasLanguageSettings != null)
|
||||
{
|
||||
targetHasLanguageSettings.PreferredMetadataCountryCode = sourceHasLanguageSettings.PreferredMetadataCountryCode;
|
||||
targetHasLanguageSettings.PreferredMetadataLanguage = sourceHasLanguageSettings.PreferredMetadataLanguage;
|
||||
}
|
||||
target.PreferredMetadataCountryCode = source.PreferredMetadataCountryCode;
|
||||
target.PreferredMetadataLanguage = source.PreferredMetadataLanguage;
|
||||
|
||||
var sourceHasDisplayOrder = source as IHasDisplayOrder;
|
||||
var targetHasDisplayOrder = target as IHasDisplayOrder;
|
||||
|
|
|
@ -62,11 +62,6 @@ namespace MediaBrowser.Providers.TV
|
|||
var sourceItem = source.Item;
|
||||
var targetItem = target.Item;
|
||||
|
||||
if (replaceData || targetItem.SeasonCount == 0)
|
||||
{
|
||||
targetItem.SeasonCount = sourceItem.SeasonCount;
|
||||
}
|
||||
|
||||
if (replaceData || string.IsNullOrEmpty(targetItem.AirTime))
|
||||
{
|
||||
targetItem.AirTime = sourceItem.AirTime;
|
||||
|
|
|
@ -68,12 +68,6 @@ namespace MediaBrowser.Providers.TV
|
|||
var physicalEpisodes = episodes.Where(i => i.LocationType != LocationType.Virtual)
|
||||
.ToList();
|
||||
|
||||
series.SeasonCount = episodes
|
||||
.Select(i => i.ParentIndexNumber ?? 0)
|
||||
.Where(i => i != 0)
|
||||
.Distinct()
|
||||
.Count();
|
||||
|
||||
series.SpecialFeatureIds = physicalEpisodes
|
||||
.Where(i => i.ParentIndexNumber.HasValue && i.ParentIndexNumber.Value == 0)
|
||||
.Select(i => i.Id)
|
||||
|
|
|
@ -303,7 +303,7 @@ namespace MediaBrowser.Server.Implementations.Channels
|
|||
|
||||
try
|
||||
{
|
||||
var files = _fileSystem.GetFiles(parentPath);
|
||||
var files = _fileSystem.GetFiles(parentPath);
|
||||
|
||||
if (string.Equals(item.MediaType, MediaType.Video, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
|
@ -396,7 +396,7 @@ namespace MediaBrowser.Server.Implementations.Channels
|
|||
{
|
||||
_logger.Debug("Creating directory {0}", path);
|
||||
|
||||
_fileSystem.CreateDirectory(path);
|
||||
_fileSystem.CreateDirectory(path);
|
||||
fileInfo = new DirectoryInfo(path);
|
||||
|
||||
if (!fileInfo.Exists)
|
||||
|
@ -417,16 +417,22 @@ namespace MediaBrowser.Server.Implementations.Channels
|
|||
Id = id,
|
||||
DateCreated = _fileSystem.GetCreationTimeUtc(fileInfo),
|
||||
DateModified = _fileSystem.GetLastWriteTimeUtc(fileInfo),
|
||||
Path = path
|
||||
Path = path,
|
||||
ChannelId = channelInfo.Name.GetMD5().ToString("N")
|
||||
};
|
||||
|
||||
isNew = true;
|
||||
}
|
||||
|
||||
var channelId = channelInfo.Name.GetMD5().ToString("N");
|
||||
if (!string.Equals(item.ChannelId, channelId, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
isNew = true;
|
||||
}
|
||||
|
||||
item.OfficialRating = GetOfficialRating(channelInfo.ParentalRating);
|
||||
item.Overview = channelInfo.Description;
|
||||
item.HomePageUrl = channelInfo.HomePageUrl;
|
||||
item.OriginalChannelName = channelInfo.Name;
|
||||
|
||||
if (string.IsNullOrEmpty(item.Name))
|
||||
{
|
||||
|
@ -1067,7 +1073,7 @@ namespace MediaBrowser.Server.Implementations.Channels
|
|||
{
|
||||
try
|
||||
{
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(path));
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(path));
|
||||
|
||||
_jsonSerializer.SerializeToFile(result, path);
|
||||
}
|
||||
|
@ -1296,7 +1302,7 @@ namespace MediaBrowser.Server.Implementations.Channels
|
|||
|
||||
internal IChannel GetChannelProvider(Channel channel)
|
||||
{
|
||||
return GetAllChannels().First(i => string.Equals(i.Name, channel.OriginalChannelName, StringComparison.OrdinalIgnoreCase));
|
||||
return GetAllChannels().First(i => string.Equals(i.Name.GetMD5().ToString("N"), channel.ChannelId, StringComparison.OrdinalIgnoreCase) || string.Equals(i.Name, channel.Name, StringComparison.OrdinalIgnoreCase));
|
||||
}
|
||||
|
||||
private IEnumerable<BaseItem> ApplyFilters(IEnumerable<BaseItem> items, IEnumerable<ItemFilter> filters, User user)
|
||||
|
@ -1447,7 +1453,7 @@ namespace MediaBrowser.Server.Implementations.Channels
|
|||
options.RequestHeaders[header.Key] = header.Value;
|
||||
}
|
||||
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(destination));
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(destination));
|
||||
|
||||
// Determine output extension
|
||||
var response = await _httpClient.GetTempFileResponse(options).ConfigureAwait(false);
|
||||
|
@ -1485,7 +1491,7 @@ namespace MediaBrowser.Server.Implementations.Channels
|
|||
throw new ApplicationException("Unexpected response type encountered: " + response.ContentType);
|
||||
}
|
||||
|
||||
_fileSystem.CopyFile(response.TempFilePath, destination, true);
|
||||
_fileSystem.CopyFile(response.TempFilePath, destination, true);
|
||||
|
||||
try
|
||||
{
|
||||
|
|
|
@ -1042,13 +1042,8 @@ namespace MediaBrowser.Server.Implementations.Dto
|
|||
dto.MediaType = item.MediaType;
|
||||
dto.LocationType = item.LocationType;
|
||||
|
||||
var hasLang = item as IHasPreferredMetadataLanguage;
|
||||
|
||||
if (hasLang != null)
|
||||
{
|
||||
dto.PreferredMetadataCountryCode = hasLang.PreferredMetadataCountryCode;
|
||||
dto.PreferredMetadataLanguage = hasLang.PreferredMetadataLanguage;
|
||||
}
|
||||
dto.PreferredMetadataCountryCode = item.PreferredMetadataCountryCode;
|
||||
dto.PreferredMetadataLanguage = item.PreferredMetadataLanguage;
|
||||
|
||||
var hasCriticRating = item as IHasCriticRating;
|
||||
if (hasCriticRating != null)
|
||||
|
@ -1427,8 +1422,6 @@ namespace MediaBrowser.Server.Implementations.Dto
|
|||
dto.AirTime = series.AirTime;
|
||||
dto.SeriesStatus = series.Status;
|
||||
|
||||
dto.SeasonCount = series.SeasonCount;
|
||||
|
||||
if (fields.Contains(ItemFields.Settings))
|
||||
{
|
||||
dto.DisplaySpecialsWithSeasons = series.DisplaySpecialsWithSeasons;
|
||||
|
|
|
@ -72,7 +72,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|||
private IDbCommand _deletePeopleCommand;
|
||||
private IDbCommand _savePersonCommand;
|
||||
|
||||
private const int LatestSchemaVersion = 10;
|
||||
private const int LatestSchemaVersion = 11;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SqliteItemRepository"/> class.
|
||||
|
@ -184,6 +184,9 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|||
|
||||
_connection.AddColumn(_logger, "TypedBaseItems", "EpisodeTitle", "Text");
|
||||
_connection.AddColumn(_logger, "TypedBaseItems", "IsRepeat", "BIT");
|
||||
|
||||
_connection.AddColumn(_logger, "TypedBaseItems", "PreferredMetadataLanguage", "Text");
|
||||
_connection.AddColumn(_logger, "TypedBaseItems", "PreferredMetadataCountryCode", "Text");
|
||||
|
||||
PrepareStatements();
|
||||
|
||||
|
@ -216,7 +219,9 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|||
"CommunityRating",
|
||||
"CustomRating",
|
||||
"IndexNumber",
|
||||
"IsLocked"
|
||||
"IsLocked",
|
||||
"PreferredMetadataLanguage",
|
||||
"PreferredMetadataCountryCode"
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
|
@ -267,7 +272,9 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|||
"DateModified",
|
||||
"ForcedSortName",
|
||||
"IsOffline",
|
||||
"LocationType"
|
||||
"LocationType",
|
||||
"PreferredMetadataLanguage",
|
||||
"PreferredMetadataCountryCode"
|
||||
};
|
||||
_saveItemCommand = _connection.CreateCommand();
|
||||
_saveItemCommand.CommandText = "replace into TypedBaseItems (" + string.Join(",", saveColumns.ToArray()) + ") values (";
|
||||
|
@ -451,6 +458,9 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|||
_saveItemCommand.GetParameter(index++).Value = item.IsOffline;
|
||||
_saveItemCommand.GetParameter(index++).Value = item.LocationType.ToString();
|
||||
|
||||
_saveItemCommand.GetParameter(index++).Value = item.PreferredMetadataLanguage;
|
||||
_saveItemCommand.GetParameter(index++).Value = item.PreferredMetadataCountryCode;
|
||||
|
||||
_saveItemCommand.Transaction = transaction;
|
||||
|
||||
_saveItemCommand.ExecuteNonQuery();
|
||||
|
@ -647,6 +657,16 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|||
item.IsLocked = reader.GetBoolean(18);
|
||||
}
|
||||
|
||||
if (!reader.IsDBNull(19))
|
||||
{
|
||||
item.PreferredMetadataLanguage = reader.GetString(19);
|
||||
}
|
||||
|
||||
if (!reader.IsDBNull(20))
|
||||
{
|
||||
item.PreferredMetadataCountryCode = reader.GetString(20);
|
||||
}
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
|
|
|
@ -394,11 +394,7 @@ namespace MediaBrowser.XbmcMetadata.Parsers
|
|||
{
|
||||
var val = reader.ReadElementContentAsString();
|
||||
|
||||
var hasLanguage = item as IHasPreferredMetadataLanguage;
|
||||
if (hasLanguage != null)
|
||||
{
|
||||
hasLanguage.PreferredMetadataLanguage = val;
|
||||
}
|
||||
item.PreferredMetadataLanguage = val;
|
||||
|
||||
break;
|
||||
}
|
||||
|
@ -407,11 +403,7 @@ namespace MediaBrowser.XbmcMetadata.Parsers
|
|||
{
|
||||
var val = reader.ReadElementContentAsString();
|
||||
|
||||
var hasLanguage = item as IHasPreferredMetadataLanguage;
|
||||
if (hasLanguage != null)
|
||||
{
|
||||
hasLanguage.PreferredMetadataCountryCode = val;
|
||||
}
|
||||
item.PreferredMetadataCountryCode = val;
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -599,17 +599,13 @@ namespace MediaBrowser.XbmcMetadata.Savers
|
|||
writer.WriteElementString("tvcomid", tvcom);
|
||||
}
|
||||
|
||||
var hasLanguage = item as IHasPreferredMetadataLanguage;
|
||||
if (hasLanguage != null)
|
||||
if (!string.IsNullOrEmpty(item.PreferredMetadataLanguage))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(hasLanguage.PreferredMetadataLanguage))
|
||||
{
|
||||
writer.WriteElementString("language", hasLanguage.PreferredMetadataLanguage);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(hasLanguage.PreferredMetadataCountryCode))
|
||||
{
|
||||
writer.WriteElementString("countrycode", hasLanguage.PreferredMetadataCountryCode);
|
||||
}
|
||||
writer.WriteElementString("language", item.PreferredMetadataLanguage);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(item.PreferredMetadataCountryCode))
|
||||
{
|
||||
writer.WriteElementString("countrycode", item.PreferredMetadataCountryCode);
|
||||
}
|
||||
|
||||
if (item.PremiereDate.HasValue && !(item is Episode))
|
||||
|
|
Loading…
Reference in New Issue
Block a user