mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-05-24 02:02:29 -04:00
added more metadata control
This commit is contained in:
parent
7c8424bf61
commit
25db52003c
@ -77,6 +77,9 @@
|
|||||||
<Compile Include="..\MediaBrowser.Model\Configuration\BaseApplicationConfiguration.cs">
|
<Compile Include="..\MediaBrowser.Model\Configuration\BaseApplicationConfiguration.cs">
|
||||||
<Link>Configuration\BaseApplicationConfiguration.cs</Link>
|
<Link>Configuration\BaseApplicationConfiguration.cs</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="..\MediaBrowser.Model\Configuration\ImageDownloadOptions.cs">
|
||||||
|
<Link>Configuration\ImageDownloadOptions.cs</Link>
|
||||||
|
</Compile>
|
||||||
<Compile Include="..\MediaBrowser.Model\Configuration\ManualLoginCategory.cs">
|
<Compile Include="..\MediaBrowser.Model\Configuration\ManualLoginCategory.cs">
|
||||||
<Link>Configuration\ManualLoginCategory.cs</Link>
|
<Link>Configuration\ManualLoginCategory.cs</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
@ -146,9 +149,6 @@
|
|||||||
<Compile Include="..\MediaBrowser.Model\Entities\IHasProviderIds.cs">
|
<Compile Include="..\MediaBrowser.Model\Entities\IHasProviderIds.cs">
|
||||||
<Link>Entities\IHasProviderIds.cs</Link>
|
<Link>Entities\IHasProviderIds.cs</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="..\MediaBrowser.Model\Entities\ImageDownloadOptions.cs">
|
|
||||||
<Link>Entities\ImageDownloadOptions.cs</Link>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="..\MediaBrowser.Model\Entities\ImageType.cs">
|
<Compile Include="..\MediaBrowser.Model\Entities\ImageType.cs">
|
||||||
<Link>Entities\ImageType.cs</Link>
|
<Link>Entities\ImageType.cs</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
@ -64,6 +64,9 @@
|
|||||||
<Compile Include="..\MediaBrowser.Model\Configuration\BaseApplicationConfiguration.cs">
|
<Compile Include="..\MediaBrowser.Model\Configuration\BaseApplicationConfiguration.cs">
|
||||||
<Link>Configuration\BaseApplicationConfiguration.cs</Link>
|
<Link>Configuration\BaseApplicationConfiguration.cs</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="..\MediaBrowser.Model\Configuration\ImageDownloadOptions.cs">
|
||||||
|
<Link>Configuration\ImageDownloadOptions.cs</Link>
|
||||||
|
</Compile>
|
||||||
<Compile Include="..\MediaBrowser.Model\Configuration\ManualLoginCategory.cs">
|
<Compile Include="..\MediaBrowser.Model\Configuration\ManualLoginCategory.cs">
|
||||||
<Link>Configuration\ManualLoginCategory.cs</Link>
|
<Link>Configuration\ManualLoginCategory.cs</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
@ -133,9 +136,6 @@
|
|||||||
<Compile Include="..\MediaBrowser.Model\Entities\IHasProviderIds.cs">
|
<Compile Include="..\MediaBrowser.Model\Entities\IHasProviderIds.cs">
|
||||||
<Link>Entities\IHasProviderIds.cs</Link>
|
<Link>Entities\IHasProviderIds.cs</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="..\MediaBrowser.Model\Entities\ImageDownloadOptions.cs">
|
|
||||||
<Link>Entities\ImageDownloadOptions.cs</Link>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="..\MediaBrowser.Model\Entities\ImageType.cs">
|
<Compile Include="..\MediaBrowser.Model\Entities\ImageType.cs">
|
||||||
<Link>Entities\ImageType.cs</Link>
|
<Link>Entities\ImageType.cs</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
namespace MediaBrowser.Model.Entities
|
namespace MediaBrowser.Model.Configuration
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class ImageDownloadOptions
|
/// Class ImageDownloadOptions
|
||||||
@ -62,4 +62,20 @@ namespace MediaBrowser.Model.Entities
|
|||||||
Banner = true;
|
Banner = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Class MetadataOptions.
|
||||||
|
/// </summary>
|
||||||
|
public class MetadataOptions
|
||||||
|
{
|
||||||
|
public int MaxBackdrops { get; set; }
|
||||||
|
|
||||||
|
public int MinBackdropWidth { get; set; }
|
||||||
|
|
||||||
|
public MetadataOptions()
|
||||||
|
{
|
||||||
|
MaxBackdrops = 3;
|
||||||
|
MinBackdropWidth = 1280;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
@ -1,5 +1,4 @@
|
|||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Weather;
|
||||||
using MediaBrowser.Model.Weather;
|
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace MediaBrowser.Model.Configuration
|
namespace MediaBrowser.Model.Configuration
|
||||||
@ -87,12 +86,6 @@ namespace MediaBrowser.Model.Configuration
|
|||||||
/// <value>The metadata country code.</value>
|
/// <value>The metadata country code.</value>
|
||||||
public string MetadataCountryCode { get; set; }
|
public string MetadataCountryCode { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the max backdrops.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The max backdrops.</value>
|
|
||||||
public int MaxBackdrops { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Options for specific art to download for movies.
|
/// Options for specific art to download for movies.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -204,18 +197,6 @@ namespace MediaBrowser.Model.Configuration
|
|||||||
/// <value>The image saving convention.</value>
|
/// <value>The image saving convention.</value>
|
||||||
public ImageSavingConvention ImageSavingConvention { get; set; }
|
public ImageSavingConvention ImageSavingConvention { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the width of the min movie backdrop.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The width of the min movie backdrop.</value>
|
|
||||||
public int MinMovieBackdropDownloadWidth { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the width of the min series backdrop.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The width of the min series backdrop.</value>
|
|
||||||
public int MinSeriesBackdropDownloadWidth { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a value indicating whether [enable people prefix sub folders].
|
/// Gets or sets a value indicating whether [enable people prefix sub folders].
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -232,6 +213,12 @@ namespace MediaBrowser.Model.Configuration
|
|||||||
public bool EnableEpisodeChapterImageExtraction { get; set; }
|
public bool EnableEpisodeChapterImageExtraction { get; set; }
|
||||||
public bool EnableOtherVideoChapterImageExtraction { get; set; }
|
public bool EnableOtherVideoChapterImageExtraction { get; set; }
|
||||||
|
|
||||||
|
public MetadataOptions MovieOptions { get; set; }
|
||||||
|
public MetadataOptions TvOptions { get; set; }
|
||||||
|
public MetadataOptions MusicOptions { get; set; }
|
||||||
|
public MetadataOptions GameOptions { get; set; }
|
||||||
|
public MetadataOptions BookOptions { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="ServerConfiguration" /> class.
|
/// Initializes a new instance of the <see cref="ServerConfiguration" /> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -272,7 +259,6 @@ namespace MediaBrowser.Model.Configuration
|
|||||||
};
|
};
|
||||||
DownloadMusicArtistImages = new ImageDownloadOptions();
|
DownloadMusicArtistImages = new ImageDownloadOptions();
|
||||||
DownloadMusicAlbumImages = new ImageDownloadOptions();
|
DownloadMusicAlbumImages = new ImageDownloadOptions();
|
||||||
MaxBackdrops = 3;
|
|
||||||
|
|
||||||
SortReplaceCharacters = new[] { ".", "+", "%" };
|
SortReplaceCharacters = new[] { ".", "+", "%" };
|
||||||
SortRemoveCharacters = new[] { ",", "&", "-", "{", "}", "'" };
|
SortRemoveCharacters = new[] { ",", "&", "-", "{", "}", "'" };
|
||||||
@ -280,8 +266,20 @@ namespace MediaBrowser.Model.Configuration
|
|||||||
|
|
||||||
SeasonZeroDisplayName = "Specials";
|
SeasonZeroDisplayName = "Specials";
|
||||||
|
|
||||||
MinMovieBackdropDownloadWidth = 1280;
|
MovieOptions = new MetadataOptions();
|
||||||
MinSeriesBackdropDownloadWidth = 1280;
|
TvOptions = new MetadataOptions();
|
||||||
|
|
||||||
|
MusicOptions = new MetadataOptions()
|
||||||
|
{
|
||||||
|
MaxBackdrops = 1
|
||||||
|
};
|
||||||
|
|
||||||
|
GameOptions = new MetadataOptions();
|
||||||
|
|
||||||
|
BookOptions = new MetadataOptions
|
||||||
|
{
|
||||||
|
MaxBackdrops = 1
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -118,7 +118,7 @@
|
|||||||
<Compile Include="Session\MessageCommand.cs" />
|
<Compile Include="Session\MessageCommand.cs" />
|
||||||
<Compile Include="Session\PlayRequest.cs" />
|
<Compile Include="Session\PlayRequest.cs" />
|
||||||
<Compile Include="Session\PlaystateCommand.cs" />
|
<Compile Include="Session\PlaystateCommand.cs" />
|
||||||
<Compile Include="Entities\ImageDownloadOptions.cs" />
|
<Compile Include="Configuration\ImageDownloadOptions.cs" />
|
||||||
<Compile Include="Logging\ILogManager.cs" />
|
<Compile Include="Logging\ILogManager.cs" />
|
||||||
<Compile Include="MediaInfo\BlurayDiscInfo.cs" />
|
<Compile Include="MediaInfo\BlurayDiscInfo.cs" />
|
||||||
<Compile Include="Entities\ChapterInfo.cs" />
|
<Compile Include="Entities\ChapterInfo.cs" />
|
||||||
|
@ -300,7 +300,7 @@ namespace MediaBrowser.Providers.Movies
|
|||||||
|
|
||||||
cancellationToken.ThrowIfCancellationRequested();
|
cancellationToken.ThrowIfCancellationRequested();
|
||||||
|
|
||||||
var backdropLimit = ConfigurationManager.Configuration.MaxBackdrops;
|
var backdropLimit = ConfigurationManager.Configuration.MovieOptions.MaxBackdrops;
|
||||||
if (ConfigurationManager.Configuration.DownloadMovieImages.Backdrops &&
|
if (ConfigurationManager.Configuration.DownloadMovieImages.Backdrops &&
|
||||||
item.BackdropImagePaths.Count < backdropLimit)
|
item.BackdropImagePaths.Count < backdropLimit)
|
||||||
{
|
{
|
||||||
|
@ -132,8 +132,8 @@ namespace MediaBrowser.Providers.Movies
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Don't refresh if we already have both poster and backdrop and we're not refreshing images
|
// Don't refresh if we already have both poster and backdrop and we're not refreshing images
|
||||||
if (item.HasImage(ImageType.Primary) &&
|
if (item.HasImage(ImageType.Primary) &&
|
||||||
item.BackdropImagePaths.Count >= ConfigurationManager.Configuration.MaxBackdrops &&
|
item.BackdropImagePaths.Count >= ConfigurationManager.Configuration.MovieOptions.MaxBackdrops &&
|
||||||
!item.LockedFields.Contains(MetadataFields.Images))
|
!item.LockedFields.Contains(MetadataFields.Images))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -211,10 +211,10 @@ namespace MediaBrowser.Providers.Movies
|
|||||||
cancellationToken.ThrowIfCancellationRequested();
|
cancellationToken.ThrowIfCancellationRequested();
|
||||||
|
|
||||||
var eligibleBackdrops = images
|
var eligibleBackdrops = images
|
||||||
.Where(i => i.Type == ImageType.Backdrop && i.Width.HasValue && i.Width.Value >= ConfigurationManager.Configuration.MinMovieBackdropDownloadWidth)
|
.Where(i => i.Type == ImageType.Backdrop && i.Width.HasValue && i.Width.Value >= ConfigurationManager.Configuration.MovieOptions.MinBackdropWidth)
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
var backdropLimit = ConfigurationManager.Configuration.MaxBackdrops;
|
var backdropLimit = ConfigurationManager.Configuration.MovieOptions.MaxBackdrops;
|
||||||
|
|
||||||
// backdrops - only download if earlier providers didn't find any (fanart)
|
// backdrops - only download if earlier providers didn't find any (fanart)
|
||||||
if (eligibleBackdrops.Count > 0 &&
|
if (eligibleBackdrops.Count > 0 &&
|
||||||
|
@ -302,7 +302,7 @@ namespace MediaBrowser.Providers.Music
|
|||||||
{
|
{
|
||||||
cancellationToken.ThrowIfCancellationRequested();
|
cancellationToken.ThrowIfCancellationRequested();
|
||||||
|
|
||||||
var backdropLimit = ConfigurationManager.Configuration.MaxBackdrops;
|
var backdropLimit = ConfigurationManager.Configuration.MusicOptions.MaxBackdrops;
|
||||||
if (ConfigurationManager.Configuration.DownloadMusicArtistImages.Backdrops &&
|
if (ConfigurationManager.Configuration.DownloadMusicArtistImages.Backdrops &&
|
||||||
item.BackdropImagePaths.Count < backdropLimit)
|
item.BackdropImagePaths.Count < backdropLimit)
|
||||||
{
|
{
|
||||||
|
@ -238,7 +238,7 @@ namespace MediaBrowser.Providers.TV
|
|||||||
{
|
{
|
||||||
cancellationToken.ThrowIfCancellationRequested();
|
cancellationToken.ThrowIfCancellationRequested();
|
||||||
|
|
||||||
var backdropLimit = ConfigurationManager.Configuration.MaxBackdrops;
|
var backdropLimit = ConfigurationManager.Configuration.TvOptions.MaxBackdrops;
|
||||||
if (ConfigurationManager.Configuration.DownloadSeriesImages.Backdrops &&
|
if (ConfigurationManager.Configuration.DownloadSeriesImages.Backdrops &&
|
||||||
item.BackdropImagePaths.Count < backdropLimit)
|
item.BackdropImagePaths.Count < backdropLimit)
|
||||||
{
|
{
|
||||||
|
@ -137,7 +137,7 @@ namespace MediaBrowser.Providers.TV
|
|||||||
|
|
||||||
protected override bool NeedsRefreshInternal(BaseItem item, BaseProviderInfo providerInfo)
|
protected override bool NeedsRefreshInternal(BaseItem item, BaseProviderInfo providerInfo)
|
||||||
{
|
{
|
||||||
if (item.HasImage(ImageType.Primary) && item.HasImage(ImageType.Banner) && item.BackdropImagePaths.Count >= ConfigurationManager.Configuration.MaxBackdrops)
|
if (item.HasImage(ImageType.Primary) && item.HasImage(ImageType.Banner) && item.BackdropImagePaths.Count >= ConfigurationManager.Configuration.TvOptions.MaxBackdrops)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -196,7 +196,7 @@ namespace MediaBrowser.Providers.TV
|
|||||||
{
|
{
|
||||||
foreach (var backdrop in images.Where(i => i.Type == ImageType.Backdrop &&
|
foreach (var backdrop in images.Where(i => i.Type == ImageType.Backdrop &&
|
||||||
(!i.Width.HasValue ||
|
(!i.Width.HasValue ||
|
||||||
i.Width.Value >= ConfigurationManager.Configuration.MinSeriesBackdropDownloadWidth)))
|
i.Width.Value >= ConfigurationManager.Configuration.TvOptions.MinBackdropWidth)))
|
||||||
{
|
{
|
||||||
var url = backdrop.Url;
|
var url = backdrop.Url;
|
||||||
|
|
||||||
|
@ -228,17 +228,12 @@ namespace MediaBrowser.Server.Implementations.Drawing
|
|||||||
// Graphics.FromImage will throw an exception if the PixelFormat is Indexed, so we need to handle that here
|
// Graphics.FromImage will throw an exception if the PixelFormat is Indexed, so we need to handle that here
|
||||||
using (var thumbnail = new Bitmap(newWidth, newHeight, PixelFormat.Format32bppPArgb))
|
using (var thumbnail = new Bitmap(newWidth, newHeight, PixelFormat.Format32bppPArgb))
|
||||||
{
|
{
|
||||||
#if __MonoCS__
|
|
||||||
// Mono throw an exeception if assign 0 to SetResolution
|
// Mono throw an exeception if assign 0 to SetResolution
|
||||||
if (originalImage.HorizontalResolution != 0 && originalImage.VerticalResolution != 0)
|
if (originalImage.HorizontalResolution >= 0 && originalImage.VerticalResolution >= 0)
|
||||||
{
|
{
|
||||||
// Preserve the original resolution
|
// Preserve the original resolution
|
||||||
thumbnail.SetResolution(originalImage.HorizontalResolution, originalImage.VerticalResolution);
|
thumbnail.SetResolution(originalImage.HorizontalResolution, originalImage.VerticalResolution);
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
// Preserve the original resolution
|
|
||||||
thumbnail.SetResolution(originalImage.HorizontalResolution, originalImage.VerticalResolution);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using (var thumbnailGraph = Graphics.FromImage(thumbnail))
|
using (var thumbnailGraph = Graphics.FromImage(thumbnail))
|
||||||
{
|
{
|
||||||
|
@ -472,7 +472,7 @@ namespace MediaBrowser.WebDashboard.Api
|
|||||||
"alphapicker.js",
|
"alphapicker.js",
|
||||||
"addpluginpage.js",
|
"addpluginpage.js",
|
||||||
"advancedconfigurationpage.js",
|
"advancedconfigurationpage.js",
|
||||||
"advancedmetadataconfigurationpage.js",
|
"metadataadvanced.js",
|
||||||
"boxsets.js",
|
"boxsets.js",
|
||||||
"appsplayback.js",
|
"appsplayback.js",
|
||||||
"appsweather.js",
|
"appsweather.js",
|
||||||
@ -510,7 +510,6 @@ namespace MediaBrowser.WebDashboard.Api
|
|||||||
"mediaplayer.js",
|
"mediaplayer.js",
|
||||||
"metadataconfigurationpage.js",
|
"metadataconfigurationpage.js",
|
||||||
"metadataimagespage.js",
|
"metadataimagespage.js",
|
||||||
"metadataimageextraction.js",
|
|
||||||
"moviegenres.js",
|
"moviegenres.js",
|
||||||
"movies.js",
|
"movies.js",
|
||||||
"moviepeople.js",
|
"moviepeople.js",
|
||||||
|
@ -154,9 +154,6 @@
|
|||||||
<Content Include="dashboard-ui\livetvtimers.html">
|
<Content Include="dashboard-ui\livetvtimers.html">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
<Content Include="dashboard-ui\metadataimageextraction.html">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</Content>
|
|
||||||
<Content Include="dashboard-ui\musicalbumartists.html">
|
<Content Include="dashboard-ui\musicalbumartists.html">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
@ -436,9 +433,6 @@
|
|||||||
<Content Include="dashboard-ui\scripts\livetvtimers.js">
|
<Content Include="dashboard-ui\scripts\livetvtimers.js">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
<Content Include="dashboard-ui\scripts\metadataimageextraction.js">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</Content>
|
|
||||||
<Content Include="dashboard-ui\scripts\musicalbumartists.js">
|
<Content Include="dashboard-ui\scripts\musicalbumartists.js">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
@ -1531,12 +1525,12 @@
|
|||||||
</Content>
|
</Content>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="dashboard-ui\advancedmetadata.html">
|
<Content Include="dashboard-ui\metadataadvanced.html">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="dashboard-ui\scripts\advancedmetadataconfigurationpage.js">
|
<Content Include="dashboard-ui\scripts\metadataadvanced.js">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user