mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-05 21:37:10 -04:00
fixed failing scan
This commit is contained in:
parent
67fde8c16d
commit
53776b332c
@ -36,10 +36,6 @@ namespace MediaBrowser.Controller.Entities.Audio
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The unknown album
|
|
||||||
/// </summary>
|
|
||||||
private static readonly MusicAlbum UnknownAlbum = new MusicAlbum { Name = "<Unknown>" };
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Override this to return the folder that should be used to construct a container
|
/// Override this to return the folder that should be used to construct a container
|
||||||
/// for this item in an index. GroupInIndex should be true as well.
|
/// for this item in an index. GroupInIndex should be true as well.
|
||||||
@ -50,7 +46,7 @@ namespace MediaBrowser.Controller.Entities.Audio
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return Parent is MusicAlbum ? Parent : Album != null ? new MusicAlbum { Name = Album, PrimaryImagePath = PrimaryImagePath } : UnknownAlbum;
|
return Parents.OfType<MusicAlbum>().FirstOrDefault() ?? new MusicAlbum { Name = "<Unknown>" };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
/// Gets or sets the primary image path.
|
/// Gets or sets the primary image path.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The primary image path.</value>
|
/// <value>The primary image path.</value>
|
||||||
string PrimaryImagePath { get; set; }
|
string PrimaryImagePath { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the preferred metadata language.
|
/// Gets the preferred metadata language.
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
using MediaBrowser.Controller.Entities;
|
using MediaBrowser.Controller.Entities;
|
||||||
using MediaBrowser.Controller.Providers;
|
using MediaBrowser.Controller.Providers;
|
||||||
using MediaBrowser.Model.Entities;
|
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
@ -258,7 +258,7 @@ namespace MediaBrowser.Providers.Manager
|
|||||||
|
|
||||||
if (localItem.HasMetadata)
|
if (localItem.HasMetadata)
|
||||||
{
|
{
|
||||||
MergeData(localItem.Item, temp, new List<MetadataFields>(), false, true);
|
MergeData(localItem.Item, temp, new List<MetadataFields>(), !options.ReplaceAllMetadata, true);
|
||||||
refreshResult.UpdateType = refreshResult.UpdateType | ItemUpdateType.MetadataImport;
|
refreshResult.UpdateType = refreshResult.UpdateType | ItemUpdateType.MetadataImport;
|
||||||
|
|
||||||
// Only one local provider allowed per item
|
// Only one local provider allowed per item
|
||||||
@ -287,7 +287,10 @@ namespace MediaBrowser.Providers.Manager
|
|||||||
await ExecuteRemoteProviders(item, temp, providers.OfType<IRemoteMetadataProvider<TItemType>>(), refreshResult, cancellationToken).ConfigureAwait(false);
|
await ExecuteRemoteProviders(item, temp, providers.OfType<IRemoteMetadataProvider<TItemType>>(), refreshResult, cancellationToken).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (refreshResult.UpdateType > ItemUpdateType.Unspecified)
|
||||||
|
{
|
||||||
MergeData(temp, item, item.LockedFields, true, true);
|
MergeData(temp, item, item.LockedFields, true, true);
|
||||||
|
}
|
||||||
|
|
||||||
return refreshResult;
|
return refreshResult;
|
||||||
}
|
}
|
||||||
|
@ -177,7 +177,7 @@ namespace MediaBrowser.Providers.MediaInfo
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Image is already in the cache
|
// Image is already in the cache
|
||||||
item.PrimaryImagePath = path;
|
item.SetImagePath(ImageType.Primary, path);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -227,7 +227,7 @@ namespace MediaBrowser.Providers.MediaInfo
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Image is already in the cache
|
// Image is already in the cache
|
||||||
item.PrimaryImagePath = path;
|
item.SetImagePath(ImageType.Primary, path);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -256,7 +256,7 @@ namespace MediaBrowser.Providers.MediaInfo
|
|||||||
|
|
||||||
await _mediaEncoder.ExtractImage(inputPath, type, false, video.Video3DFormat, imageOffset, path, cancellationToken).ConfigureAwait(false);
|
await _mediaEncoder.ExtractImage(inputPath, type, false, video.Video3DFormat, imageOffset, path, cancellationToken).ConfigureAwait(false);
|
||||||
|
|
||||||
video.PrimaryImagePath = path;
|
video.SetImagePath(ImageType.Primary, path);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
@ -116,7 +116,7 @@ namespace MediaBrowser.Providers.TV
|
|||||||
|
|
||||||
if (!File.Exists(path))
|
if (!File.Exists(path))
|
||||||
{
|
{
|
||||||
episode.PrimaryImagePath = null;
|
episode.SetImagePath(ImageType.Primary, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -137,7 +137,7 @@ namespace MediaBrowser.Providers.TV
|
|||||||
|
|
||||||
if (file != null)
|
if (file != null)
|
||||||
{
|
{
|
||||||
item.PrimaryImagePath = file.FullName;
|
item.SetImagePath(ImageType.Primary, file.FullName);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -154,7 +154,7 @@ namespace MediaBrowser.Providers.TV
|
|||||||
|
|
||||||
if (file != null)
|
if (file != null)
|
||||||
{
|
{
|
||||||
item.PrimaryImagePath = file.FullName;
|
item.SetImagePath(ImageType.Primary, file.FullName);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
using MediaBrowser.Controller.Entities.TV;
|
using MediaBrowser.Controller.Entities.TV;
|
||||||
using MediaBrowser.Controller.Persistence;
|
using MediaBrowser.Controller.Persistence;
|
||||||
using MediaBrowser.Controller.Providers;
|
using MediaBrowser.Controller.Providers;
|
||||||
|
using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Model.Logging;
|
using MediaBrowser.Model.Logging;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
@ -90,7 +91,7 @@ namespace MediaBrowser.Providers.TV
|
|||||||
|
|
||||||
if (File.Exists(filename))
|
if (File.Exists(filename))
|
||||||
{
|
{
|
||||||
item.PrimaryImagePath = filename;
|
item.SetImagePath(ImageType.Primary, 0, filename);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user