mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-18 20:24:20 +01:00
update configuration for virtual episodes
This commit is contained in:
@@ -357,7 +357,10 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
var path = Path;
|
||||
|
||||
if (LocationType == LocationType.Remote || LocationType == LocationType.Virtual)
|
||||
var locationType = LocationType;
|
||||
|
||||
if (locationType == LocationType.Remote ||
|
||||
locationType == LocationType.Virtual)
|
||||
{
|
||||
return new ItemResolveArgs(ConfigurationManager.ApplicationPaths, LibraryManager);
|
||||
}
|
||||
@@ -1499,7 +1502,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
BackdropImagePaths.Remove(file);
|
||||
|
||||
RemoveImageSourceForPath(file);
|
||||
|
||||
|
||||
// Delete the source file
|
||||
DeleteImagePath(file);
|
||||
}
|
||||
@@ -1720,6 +1723,14 @@ namespace MediaBrowser.Controller.Entities
|
||||
throw new ArgumentNullException("imagePath");
|
||||
}
|
||||
|
||||
var locationType = LocationType;
|
||||
|
||||
if (locationType == LocationType.Remote ||
|
||||
locationType == LocationType.Virtual)
|
||||
{
|
||||
return File.GetLastWriteTimeUtc(imagePath);
|
||||
}
|
||||
|
||||
var metaFileEntry = ResolveArgs.GetMetaFileByPath(imagePath);
|
||||
|
||||
// If we didn't the metafile entry, check the Season
|
||||
|
||||
@@ -796,7 +796,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
|
||||
foreach (var tuple in list)
|
||||
{
|
||||
if (tasks.Count > 5)
|
||||
if (tasks.Count > 7)
|
||||
{
|
||||
await Task.WhenAll(tasks).ConfigureAwait(false);
|
||||
}
|
||||
@@ -1347,7 +1347,12 @@ namespace MediaBrowser.Controller.Entities
|
||||
|
||||
try
|
||||
{
|
||||
if (ResolveArgs.PhysicalLocations.Contains(path, StringComparer.OrdinalIgnoreCase))
|
||||
if (LocationType == LocationType.Remote && string.Equals(Path, path, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
||||
if (LocationType != LocationType.Virtual && ResolveArgs.PhysicalLocations.Contains(path, StringComparer.OrdinalIgnoreCase))
|
||||
{
|
||||
return this;
|
||||
}
|
||||
@@ -1358,8 +1363,13 @@ namespace MediaBrowser.Controller.Entities
|
||||
}
|
||||
|
||||
//this should be functionally equivilent to what was here since it is IEnum and works on a thread-safe copy
|
||||
return RecursiveChildren.FirstOrDefault(i =>
|
||||
return RecursiveChildren.Where(i => i.LocationType != LocationType.Virtual).FirstOrDefault(i =>
|
||||
{
|
||||
if (i.LocationType == LocationType.Remote)
|
||||
{
|
||||
return string.Equals(i.Path, path, StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
return i.ResolveArgs.PhysicalLocations.Contains(path, StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
Reference in New Issue
Block a user