mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-05 07:18:47 +01:00
update image aspect ratio detection
This commit is contained in:
@@ -1952,6 +1952,8 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
existingImage.Path = image.Path;
|
||||
existingImage.DateModified = image.DateModified;
|
||||
existingImage.Width = image.Width;
|
||||
existingImage.Height = image.Height;
|
||||
}
|
||||
|
||||
else
|
||||
@@ -2268,6 +2270,11 @@ namespace MediaBrowser.Controller.Entities
|
||||
info1.DateModified = FileSystem.GetLastWriteTimeUtc(info1.Path);
|
||||
info2.DateModified = FileSystem.GetLastWriteTimeUtc(info2.Path);
|
||||
|
||||
info1.Width = 0;
|
||||
info1.Height = 0;
|
||||
info2.Width = 0;
|
||||
info2.Height = 0;
|
||||
|
||||
UpdateToRepository(ItemUpdateType.ImageUpdate, CancellationToken.None);
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,9 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// <value>The date modified.</value>
|
||||
public DateTime DateModified { get; set; }
|
||||
|
||||
public int Width { get; set; }
|
||||
public int Height { get; set; }
|
||||
|
||||
[IgnoreDataMember]
|
||||
public bool IsLocalFile
|
||||
{
|
||||
|
||||
@@ -30,10 +30,5 @@ namespace MediaBrowser.Controller.Entities
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public override double? GetDefaultPrimaryImageAspectRatio()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,14 +78,6 @@ namespace MediaBrowser.Controller.Entities
|
||||
}
|
||||
}
|
||||
|
||||
public override double? GetDefaultPrimaryImageAspectRatio()
|
||||
{
|
||||
double value = 16;
|
||||
value /= 9;
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
public override string CreatePresentationUniqueKey()
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(PrimaryVersionId))
|
||||
|
||||
Reference in New Issue
Block a user