mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-25 06:58:40 +02:00
update environment detection
This commit is contained in:
parent
b220e221fa
commit
f53472584e
|
@ -22,30 +22,19 @@ namespace Emby.Common.Implementations.EnvironmentInfo
|
||||||
return CustomOperatingSystem.Value;
|
return CustomOperatingSystem.Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if NET46
|
|
||||||
switch (Environment.OSVersion.Platform)
|
|
||||||
{
|
|
||||||
case PlatformID.MacOSX:
|
|
||||||
return MediaBrowser.Model.System.OperatingSystem.OSX;
|
|
||||||
case PlatformID.Win32NT:
|
|
||||||
return MediaBrowser.Model.System.OperatingSystem.Windows;
|
|
||||||
case PlatformID.Unix:
|
|
||||||
return MediaBrowser.Model.System.OperatingSystem.Linux;
|
|
||||||
}
|
|
||||||
#elif NETSTANDARD1_6
|
|
||||||
if (System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
|
if (System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
|
||||||
{
|
{
|
||||||
return OperatingSystem.OSX;
|
return MediaBrowser.Model.System.OperatingSystem.OSX;
|
||||||
}
|
}
|
||||||
if (System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
if (System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||||
{
|
{
|
||||||
return OperatingSystem.Windows;
|
return MediaBrowser.Model.System.OperatingSystem.Windows;
|
||||||
}
|
}
|
||||||
if (System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
|
if (System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
|
||||||
{
|
{
|
||||||
return OperatingSystem.Linux;
|
return MediaBrowser.Model.System.OperatingSystem.Linux;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
return MediaBrowser.Model.System.OperatingSystem.Windows;
|
return MediaBrowser.Model.System.OperatingSystem.Windows;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -54,12 +43,7 @@ namespace Emby.Common.Implementations.EnvironmentInfo
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
#if NET46
|
|
||||||
return Environment.OSVersion.Platform.ToString();
|
|
||||||
#elif NETSTANDARD1_6
|
|
||||||
return System.Runtime.InteropServices.RuntimeInformation.OSDescription;
|
return System.Runtime.InteropServices.RuntimeInformation.OSDescription;
|
||||||
#endif
|
|
||||||
return "Operating System";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,12 +51,7 @@ namespace Emby.Common.Implementations.EnvironmentInfo
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
#if NET46
|
|
||||||
return Environment.OSVersion.Version.ToString() + " " + Environment.OSVersion.ServicePack.ToString();
|
|
||||||
#elif NETSTANDARD1_6
|
|
||||||
return System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription;
|
return System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription;
|
||||||
#endif
|
|
||||||
return "1.0";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,10 +71,8 @@ namespace Emby.Common.Implementations.EnvironmentInfo
|
||||||
{
|
{
|
||||||
return CustomArchitecture.Value;
|
return CustomArchitecture.Value;
|
||||||
}
|
}
|
||||||
#if NET46
|
|
||||||
return Environment.Is64BitOperatingSystem ? MediaBrowser.Model.System.Architecture.X64 : MediaBrowser.Model.System.Architecture.X86;
|
switch (System.Runtime.InteropServices.RuntimeInformation.OSArchitecture)
|
||||||
#elif NETSTANDARD1_6
|
|
||||||
switch(System.Runtime.InteropServices.RuntimeInformation.OSArchitecture)
|
|
||||||
{
|
{
|
||||||
case System.Runtime.InteropServices.Architecture.Arm:
|
case System.Runtime.InteropServices.Architecture.Arm:
|
||||||
return MediaBrowser.Model.System.Architecture.Arm;
|
return MediaBrowser.Model.System.Architecture.Arm;
|
||||||
|
@ -106,7 +83,6 @@ namespace Emby.Common.Implementations.EnvironmentInfo
|
||||||
case System.Runtime.InteropServices.Architecture.X86:
|
case System.Runtime.InteropServices.Architecture.X86:
|
||||||
return MediaBrowser.Model.System.Architecture.X86;
|
return MediaBrowser.Model.System.Architecture.X86;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
return MediaBrowser.Model.System.Architecture.X64;
|
return MediaBrowser.Model.System.Architecture.X64;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
"System.Xml.ReaderWriter": "4.0.0"
|
"System.Xml.ReaderWriter": "4.0.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"System.Runtime.InteropServices.RuntimeInformation": "4.3.0",
|
||||||
"SimpleInjector": "3.2.4",
|
"SimpleInjector": "3.2.4",
|
||||||
"ServiceStack.Text": "4.5.4",
|
"ServiceStack.Text": "4.5.4",
|
||||||
"NLog": "4.4.0-betaV15",
|
"NLog": "4.4.0-betaV15",
|
||||||
|
|
|
@ -275,17 +275,7 @@ namespace Emby.Server.Implementations.Channels
|
||||||
|
|
||||||
public async Task<IEnumerable<MediaSourceInfo>> GetStaticMediaSources(BaseItem item, CancellationToken cancellationToken)
|
public async Task<IEnumerable<MediaSourceInfo>> GetStaticMediaSources(BaseItem item, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
IEnumerable<ChannelMediaInfo> results = new List<ChannelMediaInfo>();
|
IEnumerable<ChannelMediaInfo> results = GetSavedMediaSources(item);
|
||||||
var video = item as Video;
|
|
||||||
if (video != null)
|
|
||||||
{
|
|
||||||
results = video.ChannelMediaSources;
|
|
||||||
}
|
|
||||||
var audio = item as Audio;
|
|
||||||
if (audio != null)
|
|
||||||
{
|
|
||||||
results = audio.ChannelMediaSources ?? GetSavedMediaSources(audio);
|
|
||||||
}
|
|
||||||
|
|
||||||
return SortMediaInfoResults(results)
|
return SortMediaInfoResults(results)
|
||||||
.Select(i => GetMediaSource(item, i))
|
.Select(i => GetMediaSource(item, i))
|
||||||
|
@ -1378,7 +1368,6 @@ namespace Emby.Server.Implementations.Channels
|
||||||
if (channelVideoItem != null)
|
if (channelVideoItem != null)
|
||||||
{
|
{
|
||||||
channelVideoItem.ExtraType = info.ExtraType;
|
channelVideoItem.ExtraType = info.ExtraType;
|
||||||
channelVideoItem.ChannelMediaSources = info.MediaSources;
|
|
||||||
|
|
||||||
var mediaSource = info.MediaSources.FirstOrDefault();
|
var mediaSource = info.MediaSources.FirstOrDefault();
|
||||||
item.Path = mediaSource == null ? null : mediaSource.Path;
|
item.Path = mediaSource == null ? null : mediaSource.Path;
|
||||||
|
|
|
@ -240,7 +240,6 @@ namespace Emby.Server.Implementations.Data
|
||||||
AddColumn(db, "TypedBaseItems", "SourceType", "Text", existingColumnNames);
|
AddColumn(db, "TypedBaseItems", "SourceType", "Text", existingColumnNames);
|
||||||
AddColumn(db, "TypedBaseItems", "TrailerTypes", "Text", existingColumnNames);
|
AddColumn(db, "TypedBaseItems", "TrailerTypes", "Text", existingColumnNames);
|
||||||
AddColumn(db, "TypedBaseItems", "CriticRating", "Float", existingColumnNames);
|
AddColumn(db, "TypedBaseItems", "CriticRating", "Float", existingColumnNames);
|
||||||
AddColumn(db, "TypedBaseItems", "CriticRatingSummary", "Text", existingColumnNames);
|
|
||||||
AddColumn(db, "TypedBaseItems", "InheritedTags", "Text", existingColumnNames);
|
AddColumn(db, "TypedBaseItems", "InheritedTags", "Text", existingColumnNames);
|
||||||
AddColumn(db, "TypedBaseItems", "CleanName", "Text", existingColumnNames);
|
AddColumn(db, "TypedBaseItems", "CleanName", "Text", existingColumnNames);
|
||||||
AddColumn(db, "TypedBaseItems", "PresentationUniqueKey", "Text", existingColumnNames);
|
AddColumn(db, "TypedBaseItems", "PresentationUniqueKey", "Text", existingColumnNames);
|
||||||
|
@ -454,7 +453,6 @@ namespace Emby.Server.Implementations.Data
|
||||||
"DateLastMediaAdded",
|
"DateLastMediaAdded",
|
||||||
"Album",
|
"Album",
|
||||||
"CriticRating",
|
"CriticRating",
|
||||||
"CriticRatingSummary",
|
|
||||||
"IsVirtualItem",
|
"IsVirtualItem",
|
||||||
"SeriesName",
|
"SeriesName",
|
||||||
"SeasonName",
|
"SeasonName",
|
||||||
|
@ -579,7 +577,6 @@ namespace Emby.Server.Implementations.Data
|
||||||
"SourceType",
|
"SourceType",
|
||||||
"TrailerTypes",
|
"TrailerTypes",
|
||||||
"CriticRating",
|
"CriticRating",
|
||||||
"CriticRatingSummary",
|
|
||||||
"InheritedTags",
|
"InheritedTags",
|
||||||
"CleanName",
|
"CleanName",
|
||||||
"PresentationUniqueKey",
|
"PresentationUniqueKey",
|
||||||
|
@ -942,7 +939,6 @@ namespace Emby.Server.Implementations.Data
|
||||||
}
|
}
|
||||||
|
|
||||||
saveItemStatement.TryBind("@CriticRating", item.CriticRating);
|
saveItemStatement.TryBind("@CriticRating", item.CriticRating);
|
||||||
saveItemStatement.TryBind("@CriticRatingSummary", item.CriticRatingSummary);
|
|
||||||
|
|
||||||
var inheritedTags = item.InheritedTags;
|
var inheritedTags = item.InheritedTags;
|
||||||
if (inheritedTags.Count > 0)
|
if (inheritedTags.Count > 0)
|
||||||
|
@ -1803,15 +1799,6 @@ namespace Emby.Server.Implementations.Data
|
||||||
}
|
}
|
||||||
index++;
|
index++;
|
||||||
|
|
||||||
if (query.HasField(ItemFields.CriticRatingSummary))
|
|
||||||
{
|
|
||||||
if (!reader.IsDBNull(index))
|
|
||||||
{
|
|
||||||
item.CriticRatingSummary = reader.GetString(index);
|
|
||||||
}
|
|
||||||
index++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!reader.IsDBNull(index))
|
if (!reader.IsDBNull(index))
|
||||||
{
|
{
|
||||||
item.IsVirtualItem = reader.GetBoolean(index);
|
item.IsVirtualItem = reader.GetBoolean(index);
|
||||||
|
|
|
@ -967,11 +967,6 @@ namespace Emby.Server.Implementations.Dto
|
||||||
|
|
||||||
dto.CriticRating = item.CriticRating;
|
dto.CriticRating = item.CriticRating;
|
||||||
|
|
||||||
if (fields.Contains(ItemFields.CriticRatingSummary))
|
|
||||||
{
|
|
||||||
dto.CriticRatingSummary = item.CriticRatingSummary;
|
|
||||||
}
|
|
||||||
|
|
||||||
var hasTrailers = item as IHasTrailers;
|
var hasTrailers = item as IHasTrailers;
|
||||||
if (hasTrailers != null)
|
if (hasTrailers != null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2251,11 +2251,6 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
||||||
writer.WriteElementString("criticrating", item.CriticRating.Value.ToString(CultureInfo.InvariantCulture));
|
writer.WriteElementString("criticrating", item.CriticRating.Value.ToString(CultureInfo.InvariantCulture));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(item.CriticRatingSummary))
|
|
||||||
{
|
|
||||||
writer.WriteElementString("criticratingsummary", item.CriticRatingSummary);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(item.Tagline))
|
if (!string.IsNullOrWhiteSpace(item.Tagline))
|
||||||
{
|
{
|
||||||
writer.WriteElementString("tagline", item.Tagline);
|
writer.WriteElementString("tagline", item.Tagline);
|
||||||
|
|
|
@ -98,7 +98,7 @@ namespace MediaBrowser.Api
|
||||||
[ApiMember(Name = "SortBy", Description = "Optional. Specify one or more sort orders, comma delimeted. Options: Album, AlbumArtist, Artist, Budget, CommunityRating, CriticRating, DateCreated, DatePlayed, PlayCount, PremiereDate, ProductionYear, SortName, Random, Revenue, Runtime", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
|
[ApiMember(Name = "SortBy", Description = "Optional. Specify one or more sort orders, comma delimeted. Options: Album, AlbumArtist, Artist, Budget, CommunityRating, CriticRating, DateCreated, DatePlayed, PlayCount, PremiereDate, ProductionYear, SortName, Random, Revenue, Runtime", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
|
||||||
public string SortBy { get; set; }
|
public string SortBy { get; set; }
|
||||||
|
|
||||||
[ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, CriticRatingSummary, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
|
[ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
|
||||||
public string Fields { get; set; }
|
public string Fields { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -145,7 +145,7 @@ namespace MediaBrowser.Api
|
||||||
[ApiMember(Name = "Filters", Description = "Optional. Specify additional filters to apply. This allows multiple, comma delimeted. Options: IsFolder, IsNotFolder, IsUnplayed, IsPlayed, IsFavorite, IsResumable, Likes, Dislikes", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
|
[ApiMember(Name = "Filters", Description = "Optional. Specify additional filters to apply. This allows multiple, comma delimeted. Options: IsFolder, IsNotFolder, IsUnplayed, IsPlayed, IsFavorite, IsResumable, Likes, Dislikes", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
|
||||||
public string Filters { get; set; }
|
public string Filters { get; set; }
|
||||||
|
|
||||||
[ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, CriticRatingSummary, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
|
[ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
|
||||||
public string Fields { get; set; }
|
public string Fields { get; set; }
|
||||||
|
|
||||||
[ApiMember(Name = "ChannelIds", Description = "Optional. Specify one or more channel id's, comma delimeted.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
|
[ApiMember(Name = "ChannelIds", Description = "Optional. Specify one or more channel id's, comma delimeted.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
|
||||||
|
|
|
@ -240,7 +240,6 @@ namespace MediaBrowser.Api
|
||||||
item.OriginalTitle = string.IsNullOrWhiteSpace(request.OriginalTitle) ? null : request.OriginalTitle;
|
item.OriginalTitle = string.IsNullOrWhiteSpace(request.OriginalTitle) ? null : request.OriginalTitle;
|
||||||
|
|
||||||
item.CriticRating = request.CriticRating;
|
item.CriticRating = request.CriticRating;
|
||||||
item.CriticRatingSummary = request.CriticRatingSummary;
|
|
||||||
|
|
||||||
item.DisplayMediaType = request.DisplayMediaType;
|
item.DisplayMediaType = request.DisplayMediaType;
|
||||||
item.CommunityRating = request.CommunityRating;
|
item.CommunityRating = request.CommunityRating;
|
||||||
|
|
|
@ -98,7 +98,7 @@ namespace MediaBrowser.Api.LiveTv
|
||||||
/// Fields to return within the items, in addition to basic information
|
/// Fields to return within the items, in addition to basic information
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The fields.</value>
|
/// <value>The fields.</value>
|
||||||
[ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, CriticRatingSummary, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
|
[ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
|
||||||
public string Fields { get; set; }
|
public string Fields { get; set; }
|
||||||
|
|
||||||
[ApiMember(Name = "AddCurrentProgram", Description = "Optional. Adds current program info to each channel", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
|
[ApiMember(Name = "AddCurrentProgram", Description = "Optional. Adds current program info to each channel", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
|
||||||
|
@ -189,7 +189,7 @@ namespace MediaBrowser.Api.LiveTv
|
||||||
/// Fields to return within the items, in addition to basic information
|
/// Fields to return within the items, in addition to basic information
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The fields.</value>
|
/// <value>The fields.</value>
|
||||||
[ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, CriticRatingSummary, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
|
[ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
|
||||||
public string Fields { get; set; }
|
public string Fields { get; set; }
|
||||||
|
|
||||||
public bool EnableTotalRecordCount { get; set; }
|
public bool EnableTotalRecordCount { get; set; }
|
||||||
|
@ -251,7 +251,7 @@ namespace MediaBrowser.Api.LiveTv
|
||||||
/// Fields to return within the items, in addition to basic information
|
/// Fields to return within the items, in addition to basic information
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The fields.</value>
|
/// <value>The fields.</value>
|
||||||
[ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, CriticRatingSummary, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
|
[ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
|
||||||
public string Fields { get; set; }
|
public string Fields { get; set; }
|
||||||
|
|
||||||
public bool EnableTotalRecordCount { get; set; }
|
public bool EnableTotalRecordCount { get; set; }
|
||||||
|
@ -399,7 +399,7 @@ namespace MediaBrowser.Api.LiveTv
|
||||||
/// Fields to return within the items, in addition to basic information
|
/// Fields to return within the items, in addition to basic information
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The fields.</value>
|
/// <value>The fields.</value>
|
||||||
[ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, CriticRatingSummary, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
|
[ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
|
||||||
public string Fields { get; set; }
|
public string Fields { get; set; }
|
||||||
|
|
||||||
public GetPrograms()
|
public GetPrograms()
|
||||||
|
@ -459,7 +459,7 @@ namespace MediaBrowser.Api.LiveTv
|
||||||
/// Fields to return within the items, in addition to basic information
|
/// Fields to return within the items, in addition to basic information
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The fields.</value>
|
/// <value>The fields.</value>
|
||||||
[ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, CriticRatingSummary, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
|
[ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
|
||||||
public string Fields { get; set; }
|
public string Fields { get; set; }
|
||||||
|
|
||||||
[ApiMember(Name = "EnableUserData", Description = "Optional, include user data", IsRequired = false, DataType = "boolean", ParameterType = "query", Verb = "GET")]
|
[ApiMember(Name = "EnableUserData", Description = "Optional, include user data", IsRequired = false, DataType = "boolean", ParameterType = "query", Verb = "GET")]
|
||||||
|
|
|
@ -102,7 +102,7 @@ namespace MediaBrowser.Api
|
||||||
/// Fields to return within the items, in addition to basic information
|
/// Fields to return within the items, in addition to basic information
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The fields.</value>
|
/// <value>The fields.</value>
|
||||||
[ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, CriticRatingSummary, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
|
[ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
|
||||||
public string Fields { get; set; }
|
public string Fields { get; set; }
|
||||||
|
|
||||||
[ApiMember(Name = "EnableImages", Description = "Optional, include image information in output", IsRequired = false, DataType = "boolean", ParameterType = "query", Verb = "GET")]
|
[ApiMember(Name = "EnableImages", Description = "Optional, include image information in output", IsRequired = false, DataType = "boolean", ParameterType = "query", Verb = "GET")]
|
||||||
|
|
|
@ -61,7 +61,7 @@ namespace MediaBrowser.Api
|
||||||
/// Fields to return within the items, in addition to basic information
|
/// Fields to return within the items, in addition to basic information
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The fields.</value>
|
/// <value>The fields.</value>
|
||||||
[ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, CriticRatingSummary, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
|
[ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
|
||||||
public string Fields { get; set; }
|
public string Fields { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ namespace MediaBrowser.Api
|
||||||
/// Fields to return within the items, in addition to basic information
|
/// Fields to return within the items, in addition to basic information
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The fields.</value>
|
/// <value>The fields.</value>
|
||||||
[ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, CriticRatingSummary, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
|
[ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
|
||||||
public string Fields { get; set; }
|
public string Fields { get; set; }
|
||||||
|
|
||||||
[ApiMember(Name = "SeriesId", Description = "Optional. Filter by series id", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
|
[ApiMember(Name = "SeriesId", Description = "Optional. Filter by series id", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
|
||||||
|
@ -108,7 +108,7 @@ namespace MediaBrowser.Api
|
||||||
/// Fields to return within the items, in addition to basic information
|
/// Fields to return within the items, in addition to basic information
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The fields.</value>
|
/// <value>The fields.</value>
|
||||||
[ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, CriticRatingSummary, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
|
[ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
|
||||||
public string Fields { get; set; }
|
public string Fields { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -150,7 +150,7 @@ namespace MediaBrowser.Api
|
||||||
/// Fields to return within the items, in addition to basic information
|
/// Fields to return within the items, in addition to basic information
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The fields.</value>
|
/// <value>The fields.</value>
|
||||||
[ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, CriticRatingSummary, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
|
[ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
|
||||||
public string Fields { get; set; }
|
public string Fields { get; set; }
|
||||||
|
|
||||||
[ApiMember(Name = "Id", Description = "The series id", IsRequired = true, DataType = "string", ParameterType = "query", Verb = "GET")]
|
[ApiMember(Name = "Id", Description = "The series id", IsRequired = true, DataType = "string", ParameterType = "query", Verb = "GET")]
|
||||||
|
@ -215,7 +215,7 @@ namespace MediaBrowser.Api
|
||||||
/// Fields to return within the items, in addition to basic information
|
/// Fields to return within the items, in addition to basic information
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The fields.</value>
|
/// <value>The fields.</value>
|
||||||
[ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, CriticRatingSummary, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
|
[ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
|
||||||
public string Fields { get; set; }
|
public string Fields { get; set; }
|
||||||
|
|
||||||
[ApiMember(Name = "Id", Description = "The series id", IsRequired = true, DataType = "string", ParameterType = "query", Verb = "GET")]
|
[ApiMember(Name = "Id", Description = "The series id", IsRequired = true, DataType = "string", ParameterType = "query", Verb = "GET")]
|
||||||
|
|
|
@ -146,7 +146,7 @@ namespace MediaBrowser.Api.UserLibrary
|
||||||
/// Fields to return within the items, in addition to basic information
|
/// Fields to return within the items, in addition to basic information
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The fields.</value>
|
/// <value>The fields.</value>
|
||||||
[ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, CriticRatingSummary, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
|
[ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
|
||||||
public string Fields { get; set; }
|
public string Fields { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -225,7 +225,7 @@ namespace MediaBrowser.Api.UserLibrary
|
||||||
[ApiMember(Name = "ParentId", Description = "Specify this to localize the search to a specific item or folder. Omit to use the root", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
|
[ApiMember(Name = "ParentId", Description = "Specify this to localize the search to a specific item or folder. Omit to use the root", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
|
||||||
public string ParentId { get; set; }
|
public string ParentId { get; set; }
|
||||||
|
|
||||||
[ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, CriticRatingSummary, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
|
[ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
|
||||||
public string Fields { get; set; }
|
public string Fields { get; set; }
|
||||||
|
|
||||||
[ApiMember(Name = "IncludeItemTypes", Description = "Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimeted.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
|
[ApiMember(Name = "IncludeItemTypes", Description = "Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimeted.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
|
||||||
|
|
|
@ -9,7 +9,6 @@ using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using MediaBrowser.Common.Extensions;
|
using MediaBrowser.Common.Extensions;
|
||||||
using MediaBrowser.Controller.Channels;
|
|
||||||
using MediaBrowser.Model.Serialization;
|
using MediaBrowser.Model.Serialization;
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Entities.Audio
|
namespace MediaBrowser.Controller.Entities.Audio
|
||||||
|
@ -24,8 +23,6 @@ namespace MediaBrowser.Controller.Entities.Audio
|
||||||
IHasLookupInfo<SongInfo>,
|
IHasLookupInfo<SongInfo>,
|
||||||
IHasMediaSources
|
IHasMediaSources
|
||||||
{
|
{
|
||||||
public List<ChannelMediaInfo> ChannelMediaSources { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the artist.
|
/// Gets or sets the artist.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -834,13 +834,6 @@ namespace MediaBrowser.Controller.Entities
|
||||||
[IgnoreDataMember]
|
[IgnoreDataMember]
|
||||||
public float? CriticRating { get; set; }
|
public float? CriticRating { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the critic rating summary.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The critic rating summary.</value>
|
|
||||||
[IgnoreDataMember]
|
|
||||||
public string CriticRatingSummary { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the official rating description.
|
/// Gets or sets the official rating description.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -2298,11 +2291,6 @@ namespace MediaBrowser.Controller.Entities
|
||||||
ownedItem.CustomRating = item.CustomRating;
|
ownedItem.CustomRating = item.CustomRating;
|
||||||
newOptions.ForceSave = true;
|
newOptions.ForceSave = true;
|
||||||
}
|
}
|
||||||
if (!string.Equals(item.CriticRatingSummary, ownedItem.CriticRatingSummary, StringComparison.Ordinal))
|
|
||||||
{
|
|
||||||
ownedItem.CriticRatingSummary = item.CriticRatingSummary;
|
|
||||||
newOptions.ForceSave = true;
|
|
||||||
}
|
|
||||||
if (!string.Equals(item.OfficialRatingDescription, ownedItem.OfficialRatingDescription, StringComparison.Ordinal))
|
if (!string.Equals(item.OfficialRatingDescription, ownedItem.OfficialRatingDescription, StringComparison.Ordinal))
|
||||||
{
|
{
|
||||||
ownedItem.OfficialRatingDescription = item.OfficialRatingDescription;
|
ownedItem.OfficialRatingDescription = item.OfficialRatingDescription;
|
||||||
|
|
|
@ -187,7 +187,6 @@ namespace MediaBrowser.Controller.Entities
|
||||||
case ItemFields.OriginalTitle:
|
case ItemFields.OriginalTitle:
|
||||||
case ItemFields.Tags:
|
case ItemFields.Tags:
|
||||||
case ItemFields.DateLastMediaAdded:
|
case ItemFields.DateLastMediaAdded:
|
||||||
case ItemFields.CriticRatingSummary:
|
|
||||||
return fields.Count == 0 || fields.Contains(name);
|
return fields.Count == 0 || fields.Contains(name);
|
||||||
default:
|
default:
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -33,7 +33,6 @@ namespace MediaBrowser.Controller.Entities
|
||||||
public List<string> AdditionalParts { get; set; }
|
public List<string> AdditionalParts { get; set; }
|
||||||
public List<string> LocalAlternateVersions { get; set; }
|
public List<string> LocalAlternateVersions { get; set; }
|
||||||
public List<LinkedChild> LinkedAlternateVersions { get; set; }
|
public List<LinkedChild> LinkedAlternateVersions { get; set; }
|
||||||
public List<ChannelMediaInfo> ChannelMediaSources { get; set; }
|
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[IgnoreDataMember]
|
||||||
public override bool SupportsPlayedStatus
|
public override bool SupportsPlayedStatus
|
||||||
|
@ -158,7 +157,6 @@ namespace MediaBrowser.Controller.Entities
|
||||||
PlayableStreamFileNames = new List<string>();
|
PlayableStreamFileNames = new List<string>();
|
||||||
AdditionalParts = new List<string>();
|
AdditionalParts = new List<string>();
|
||||||
LocalAlternateVersions = new List<string>();
|
LocalAlternateVersions = new List<string>();
|
||||||
Tags = new List<string>();
|
|
||||||
SubtitleFiles = new List<string>();
|
SubtitleFiles = new List<string>();
|
||||||
LinkedAlternateVersions = new List<LinkedChild>();
|
LinkedAlternateVersions = new List<LinkedChild>();
|
||||||
}
|
}
|
||||||
|
|
|
@ -246,18 +246,6 @@ namespace MediaBrowser.LocalMetadata.Parsers
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case "CriticRatingSummary":
|
|
||||||
{
|
|
||||||
var val = reader.ReadElementContentAsString();
|
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(val))
|
|
||||||
{
|
|
||||||
item.CriticRatingSummary = val;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case "Language":
|
case "Language":
|
||||||
{
|
{
|
||||||
var val = reader.ReadElementContentAsString();
|
var val = reader.ReadElementContentAsString();
|
||||||
|
|
|
@ -46,7 +46,6 @@ namespace MediaBrowser.LocalMetadata.Savers
|
||||||
"Countries",
|
"Countries",
|
||||||
"CustomRating",
|
"CustomRating",
|
||||||
"CriticRating",
|
"CriticRating",
|
||||||
"CriticRatingSummary",
|
|
||||||
"DeathDate",
|
"DeathDate",
|
||||||
"DisplayOrder",
|
"DisplayOrder",
|
||||||
"EndDate",
|
"EndDate",
|
||||||
|
@ -333,11 +332,6 @@ namespace MediaBrowser.LocalMetadata.Savers
|
||||||
writer.WriteElementString("CriticRating", item.CriticRating.Value.ToString(UsCulture));
|
writer.WriteElementString("CriticRating", item.CriticRating.Value.ToString(UsCulture));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(item.CriticRatingSummary))
|
|
||||||
{
|
|
||||||
writer.WriteElementString("CriticRatingSummary", item.CriticRatingSummary);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(item.Overview))
|
if (!string.IsNullOrEmpty(item.Overview))
|
||||||
{
|
{
|
||||||
writer.WriteElementString("Overview", item.Overview);
|
writer.WriteElementString("Overview", item.Overview);
|
||||||
|
|
|
@ -165,12 +165,6 @@ namespace MediaBrowser.Model.Dto
|
||||||
|
|
||||||
public string[] ProductionLocations { get; set; }
|
public string[] ProductionLocations { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the critic rating summary.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The critic rating summary.</value>
|
|
||||||
public string CriticRatingSummary { get; set; }
|
|
||||||
|
|
||||||
public List<string> MultiPartGameFiles { get; set; }
|
public List<string> MultiPartGameFiles { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -42,11 +42,6 @@
|
||||||
|
|
||||||
ChildCount,
|
ChildCount,
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The critic rating summary
|
|
||||||
/// </summary>
|
|
||||||
CriticRatingSummary,
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The cumulative run time ticks
|
/// The cumulative run time ticks
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -6,8 +6,6 @@ using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using MediaBrowser.Common.IO;
|
|
||||||
using MediaBrowser.Controller.IO;
|
|
||||||
using MediaBrowser.Model.IO;
|
using MediaBrowser.Model.IO;
|
||||||
|
|
||||||
namespace MediaBrowser.Providers.ImagesByName
|
namespace MediaBrowser.Providers.ImagesByName
|
||||||
|
@ -21,18 +19,13 @@ namespace MediaBrowser.Providers.ImagesByName
|
||||||
/// <param name="file">The file.</param>
|
/// <param name="file">The file.</param>
|
||||||
/// <param name="httpClient">The HTTP client.</param>
|
/// <param name="httpClient">The HTTP client.</param>
|
||||||
/// <param name="fileSystem">The file system.</param>
|
/// <param name="fileSystem">The file system.</param>
|
||||||
/// <param name="semaphore">The semaphore.</param>
|
|
||||||
/// <param name="cancellationToken">The cancellation token.</param>
|
/// <param name="cancellationToken">The cancellation token.</param>
|
||||||
/// <returns>Task.</returns>
|
/// <returns>Task.</returns>
|
||||||
public static async Task EnsureList(string url, string file, IHttpClient httpClient, IFileSystem fileSystem, SemaphoreSlim semaphore, CancellationToken cancellationToken)
|
public static async Task<string> EnsureList(string url, string file, IHttpClient httpClient, IFileSystem fileSystem, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
var fileInfo = fileSystem.GetFileInfo(file);
|
var fileInfo = fileSystem.GetFileInfo(file);
|
||||||
|
|
||||||
if (!fileInfo.Exists || (DateTime.UtcNow - fileSystem.GetLastWriteTimeUtc(fileInfo)).TotalDays > 1)
|
if (!fileInfo.Exists || (DateTime.UtcNow - fileSystem.GetLastWriteTimeUtc(fileInfo)).TotalDays > 1)
|
||||||
{
|
|
||||||
await semaphore.WaitAsync(cancellationToken).ConfigureAwait(false);
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
var temp = await httpClient.GetTempFile(new HttpRequestOptions
|
var temp = await httpClient.GetTempFile(new HttpRequestOptions
|
||||||
{
|
{
|
||||||
|
@ -44,13 +37,19 @@ namespace MediaBrowser.Providers.ImagesByName
|
||||||
|
|
||||||
fileSystem.CreateDirectory(Path.GetDirectoryName(file));
|
fileSystem.CreateDirectory(Path.GetDirectoryName(file));
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
fileSystem.CopyFile(temp, file, true);
|
fileSystem.CopyFile(temp, file, true);
|
||||||
}
|
}
|
||||||
finally
|
catch
|
||||||
{
|
{
|
||||||
semaphore.Release();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return temp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return file;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string FindMatch(IHasImages item, IEnumerable<string> images)
|
public static string FindMatch(IHasImages item, IEnumerable<string> images)
|
||||||
|
|
|
@ -265,11 +265,6 @@ namespace MediaBrowser.Providers.Manager
|
||||||
{
|
{
|
||||||
target.CriticRating = source.CriticRating;
|
target.CriticRating = source.CriticRating;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (replaceData || string.IsNullOrEmpty(target.CriticRatingSummary))
|
|
||||||
{
|
|
||||||
target.CriticRatingSummary = source.CriticRatingSummary;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void MergeTrailers(BaseItem source, BaseItem target, List<MetadataFields> lockedFields, bool replaceData)
|
private static void MergeTrailers(BaseItem source, BaseItem target, List<MetadataFields> lockedFields, bool replaceData)
|
||||||
|
|
|
@ -4,15 +4,12 @@ using MediaBrowser.Controller.Entities;
|
||||||
using MediaBrowser.Controller.Providers;
|
using MediaBrowser.Controller.Providers;
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Model.Providers;
|
using MediaBrowser.Model.Providers;
|
||||||
using MediaBrowser.Providers.Genres;
|
|
||||||
using MediaBrowser.Providers.ImagesByName;
|
using MediaBrowser.Providers.ImagesByName;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using MediaBrowser.Common.IO;
|
|
||||||
using MediaBrowser.Controller.IO;
|
|
||||||
using MediaBrowser.Model.IO;
|
using MediaBrowser.Model.IO;
|
||||||
|
|
||||||
namespace MediaBrowser.Providers.Studios
|
namespace MediaBrowser.Providers.Studios
|
||||||
|
@ -23,8 +20,6 @@ namespace MediaBrowser.Providers.Studios
|
||||||
private readonly IHttpClient _httpClient;
|
private readonly IHttpClient _httpClient;
|
||||||
private readonly IFileSystem _fileSystem;
|
private readonly IFileSystem _fileSystem;
|
||||||
|
|
||||||
private readonly SemaphoreSlim _listResourcePool = new SemaphoreSlim(1, 1);
|
|
||||||
|
|
||||||
public StudiosImageProvider(IServerConfigurationManager config, IHttpClient httpClient, IFileSystem fileSystem)
|
public StudiosImageProvider(IServerConfigurationManager config, IHttpClient httpClient, IFileSystem fileSystem)
|
||||||
{
|
{
|
||||||
_config = config;
|
_config = config;
|
||||||
|
@ -69,7 +64,7 @@ namespace MediaBrowser.Providers.Studios
|
||||||
{
|
{
|
||||||
var posterPath = Path.Combine(_config.ApplicationPaths.CachePath, "imagesbyname", "remotestudioposters.txt");
|
var posterPath = Path.Combine(_config.ApplicationPaths.CachePath, "imagesbyname", "remotestudioposters.txt");
|
||||||
|
|
||||||
await EnsurePosterList(posterPath, cancellationToken).ConfigureAwait(false);
|
posterPath = await EnsurePosterList(posterPath, cancellationToken).ConfigureAwait(false);
|
||||||
|
|
||||||
list.Add(GetImage(item, posterPath, ImageType.Primary, "folder"));
|
list.Add(GetImage(item, posterPath, ImageType.Primary, "folder"));
|
||||||
}
|
}
|
||||||
|
@ -80,7 +75,7 @@ namespace MediaBrowser.Providers.Studios
|
||||||
{
|
{
|
||||||
var thumbsPath = Path.Combine(_config.ApplicationPaths.CachePath, "imagesbyname", "remotestudiothumbs.txt");
|
var thumbsPath = Path.Combine(_config.ApplicationPaths.CachePath, "imagesbyname", "remotestudiothumbs.txt");
|
||||||
|
|
||||||
await EnsureThumbsList(thumbsPath, cancellationToken).ConfigureAwait(false);
|
thumbsPath = await EnsureThumbsList(thumbsPath, cancellationToken).ConfigureAwait(false);
|
||||||
|
|
||||||
list.Add(GetImage(item, thumbsPath, ImageType.Thumb, "thumb"));
|
list.Add(GetImage(item, thumbsPath, ImageType.Thumb, "thumb"));
|
||||||
}
|
}
|
||||||
|
@ -114,18 +109,18 @@ namespace MediaBrowser.Providers.Studios
|
||||||
return string.Format("https://raw.github.com/MediaBrowser/MediaBrowser.Resources/master/images/imagesbyname/studios/{0}/{1}.jpg", image, filename);
|
return string.Format("https://raw.github.com/MediaBrowser/MediaBrowser.Resources/master/images/imagesbyname/studios/{0}/{1}.jpg", image, filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Task EnsureThumbsList(string file, CancellationToken cancellationToken)
|
private Task<string> EnsureThumbsList(string file, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
const string url = "https://raw.github.com/MediaBrowser/MediaBrowser.Resources/master/images/imagesbyname/studiothumbs.txt";
|
const string url = "https://raw.github.com/MediaBrowser/MediaBrowser.Resources/master/images/imagesbyname/studiothumbs.txt";
|
||||||
|
|
||||||
return ImageUtils.EnsureList(url, file, _httpClient, _fileSystem, _listResourcePool, cancellationToken);
|
return ImageUtils.EnsureList(url, file, _httpClient, _fileSystem, cancellationToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Task EnsurePosterList(string file, CancellationToken cancellationToken)
|
private Task<string> EnsurePosterList(string file, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
const string url = "https://raw.github.com/MediaBrowser/MediaBrowser.Resources/master/images/imagesbyname/studioposters.txt";
|
const string url = "https://raw.github.com/MediaBrowser/MediaBrowser.Resources/master/images/imagesbyname/studioposters.txt";
|
||||||
|
|
||||||
return ImageUtils.EnsureList(url, file, _httpClient, _fileSystem, _listResourcePool, cancellationToken);
|
return ImageUtils.EnsureList(url, file, _httpClient, _fileSystem, cancellationToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int Order
|
public int Order
|
||||||
|
|
|
@ -108,6 +108,10 @@
|
||||||
<Reference Include="System.Configuration" />
|
<Reference Include="System.Configuration" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
<Reference Include="System.IO.Compression" />
|
<Reference Include="System.IO.Compression" />
|
||||||
|
<Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
<Reference Include="System.Runtime.Serialization" />
|
<Reference Include="System.Runtime.Serialization" />
|
||||||
<Reference Include="System.ServiceModel" />
|
<Reference Include="System.ServiceModel" />
|
||||||
<Reference Include="System.Transactions" />
|
<Reference Include="System.Transactions" />
|
||||||
|
|
|
@ -7,4 +7,5 @@
|
||||||
<package id="SimpleInjector" version="3.3.2" targetFramework="net46" />
|
<package id="SimpleInjector" version="3.3.2" targetFramework="net46" />
|
||||||
<package id="SQLitePCLRaw.core" version="1.1.2" targetFramework="net46" />
|
<package id="SQLitePCLRaw.core" version="1.1.2" targetFramework="net46" />
|
||||||
<package id="SQLitePCLRaw.provider.sqlite3.net45" version="1.1.2" targetFramework="net46" />
|
<package id="SQLitePCLRaw.provider.sqlite3.net45" version="1.1.2" targetFramework="net46" />
|
||||||
|
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net46" />
|
||||||
</packages>
|
</packages>
|
|
@ -114,6 +114,10 @@
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
<Reference Include="System.IO.Compression" />
|
<Reference Include="System.IO.Compression" />
|
||||||
<Reference Include="System.Management" />
|
<Reference Include="System.Management" />
|
||||||
|
<Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
<Reference Include="System.Runtime.Serialization" />
|
<Reference Include="System.Runtime.Serialization" />
|
||||||
<Reference Include="System.ServiceModel" />
|
<Reference Include="System.ServiceModel" />
|
||||||
<Reference Include="System.ServiceProcess" />
|
<Reference Include="System.ServiceProcess" />
|
||||||
|
|
|
@ -145,16 +145,6 @@ namespace MediaBrowser.ServerApplication.Native
|
||||||
{
|
{
|
||||||
AppContainer app = new AppContainer(PI_app.appContainerName, PI_app.displayName, PI_app.workingDirectory, PI_app.appContainerSid);
|
AppContainer app = new AppContainer(PI_app.appContainerName, PI_app.displayName, PI_app.workingDirectory, PI_app.appContainerSid);
|
||||||
|
|
||||||
var app_capabilities = LoopUtil.getCapabilites(PI_app.capabilities);
|
|
||||||
if (app_capabilities.Count > 0)
|
|
||||||
{
|
|
||||||
//var sid = new SecurityIdentifier(app_capabilities[0], 0);
|
|
||||||
|
|
||||||
IntPtr arrayValue = IntPtr.Zero;
|
|
||||||
//var b = LoopUtil.ConvertStringSidToSid(app_capabilities[0].Sid, out arrayValue);
|
|
||||||
//string mysid;
|
|
||||||
//var b = LoopUtil.ConvertSidToStringSid(app_capabilities[0].Sid, out mysid);
|
|
||||||
}
|
|
||||||
app.LoopUtil = CheckLoopback(PI_app.appContainerSid);
|
app.LoopUtil = CheckLoopback(PI_app.appContainerSid);
|
||||||
Apps.Add(app);
|
Apps.Add(app);
|
||||||
}
|
}
|
||||||
|
@ -209,42 +199,6 @@ namespace MediaBrowser.ServerApplication.Native
|
||||||
util.SaveLoopbackState();
|
util.SaveLoopbackState();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static List<SID_AND_ATTRIBUTES> getCapabilites(INET_FIREWALL_AC_CAPABILITIES cap)
|
|
||||||
{
|
|
||||||
List<SID_AND_ATTRIBUTES> mycap = new List<SID_AND_ATTRIBUTES>();
|
|
||||||
|
|
||||||
IntPtr arrayValue = cap.capabilities;
|
|
||||||
|
|
||||||
var structSize = Marshal.SizeOf(typeof(SID_AND_ATTRIBUTES));
|
|
||||||
for (var i = 0; i < cap.count; i++)
|
|
||||||
{
|
|
||||||
var cur = (SID_AND_ATTRIBUTES)Marshal.PtrToStructure(arrayValue, typeof(SID_AND_ATTRIBUTES));
|
|
||||||
mycap.Add(cur);
|
|
||||||
arrayValue = new IntPtr((long)(arrayValue) + (long)(structSize));
|
|
||||||
}
|
|
||||||
|
|
||||||
return mycap;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private static List<SID_AND_ATTRIBUTES> getContainerSID(INET_FIREWALL_AC_CAPABILITIES cap)
|
|
||||||
{
|
|
||||||
List<SID_AND_ATTRIBUTES> mycap = new List<SID_AND_ATTRIBUTES>();
|
|
||||||
|
|
||||||
IntPtr arrayValue = cap.capabilities;
|
|
||||||
|
|
||||||
var structSize = Marshal.SizeOf(typeof(SID_AND_ATTRIBUTES));
|
|
||||||
for (var i = 0; i < cap.count; i++)
|
|
||||||
{
|
|
||||||
var cur = (SID_AND_ATTRIBUTES)Marshal.PtrToStructure(arrayValue, typeof(SID_AND_ATTRIBUTES));
|
|
||||||
mycap.Add(cur);
|
|
||||||
arrayValue = new IntPtr((long)(arrayValue) + (long)(structSize));
|
|
||||||
}
|
|
||||||
|
|
||||||
return mycap;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private static List<SID_AND_ATTRIBUTES> PI_NetworkIsolationGetAppContainerConfig()
|
private static List<SID_AND_ATTRIBUTES> PI_NetworkIsolationGetAppContainerConfig()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -7,4 +7,5 @@
|
||||||
<package id="SimpleInjector" version="3.3.2" targetFramework="net462" />
|
<package id="SimpleInjector" version="3.3.2" targetFramework="net462" />
|
||||||
<package id="SQLitePCLRaw.core" version="1.1.2" targetFramework="net462" />
|
<package id="SQLitePCLRaw.core" version="1.1.2" targetFramework="net462" />
|
||||||
<package id="SQLitePCLRaw.provider.sqlite3.net45" version="1.1.2" targetFramework="net462" />
|
<package id="SQLitePCLRaw.provider.sqlite3.net45" version="1.1.2" targetFramework="net462" />
|
||||||
|
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net462" />
|
||||||
</packages>
|
</packages>
|
|
@ -358,18 +358,6 @@ namespace MediaBrowser.XbmcMetadata.Parsers
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case "criticratingsummary":
|
|
||||||
{
|
|
||||||
var val = reader.ReadElementContentAsString();
|
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(val))
|
|
||||||
{
|
|
||||||
item.CriticRatingSummary = val;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case "language":
|
case "language":
|
||||||
{
|
{
|
||||||
var val = reader.ReadElementContentAsString();
|
var val = reader.ReadElementContentAsString();
|
||||||
|
|
|
@ -56,7 +56,6 @@ namespace MediaBrowser.XbmcMetadata.Savers
|
||||||
"tag",
|
"tag",
|
||||||
"runtime",
|
"runtime",
|
||||||
"actor",
|
"actor",
|
||||||
"criticratingsummary",
|
|
||||||
"criticrating",
|
"criticrating",
|
||||||
"fileinfo",
|
"fileinfo",
|
||||||
"director",
|
"director",
|
||||||
|
@ -662,11 +661,6 @@ namespace MediaBrowser.XbmcMetadata.Savers
|
||||||
writer.WriteElementString("criticrating", item.CriticRating.Value.ToString(UsCulture));
|
writer.WriteElementString("criticrating", item.CriticRating.Value.ToString(UsCulture));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(item.CriticRatingSummary))
|
|
||||||
{
|
|
||||||
writer.WriteElementString("criticratingsummary", item.CriticRatingSummary);
|
|
||||||
}
|
|
||||||
|
|
||||||
var hasDisplayOrder = item as IHasDisplayOrder;
|
var hasDisplayOrder = item as IHasDisplayOrder;
|
||||||
|
|
||||||
if (hasDisplayOrder != null)
|
if (hasDisplayOrder != null)
|
||||||
|
|
Loading…
Reference in a new issue