mirror of
https://github.com/jellyfin/jellyfin-plugin-fanart.git
synced 2024-11-22 21:29:46 +00:00
Guess correct Thumb image size (#52)
This commit is contained in:
parent
3e8d44f276
commit
19f5d471c7
@ -10,6 +10,15 @@ namespace Jellyfin.Plugin.Fanart.Dtos
|
||||
[JsonPropertyName("url")]
|
||||
public string Url { get; set; }
|
||||
|
||||
[JsonPropertyName("width")]
|
||||
public int Width { get; set; }
|
||||
|
||||
[JsonPropertyName("height")]
|
||||
public int Height { get; set; }
|
||||
|
||||
[JsonPropertyName("added")]
|
||||
public string Added { get; set; }
|
||||
|
||||
[JsonPropertyName("likes")]
|
||||
public string Likes { get; set; }
|
||||
|
||||
|
@ -10,6 +10,15 @@ namespace Jellyfin.Plugin.Fanart.Dtos
|
||||
[JsonPropertyName("url")]
|
||||
public string Url { get; set; }
|
||||
|
||||
[JsonPropertyName("width")]
|
||||
public int Width { get; set; }
|
||||
|
||||
[JsonPropertyName("height")]
|
||||
public int Height { get; set; }
|
||||
|
||||
[JsonPropertyName("added")]
|
||||
public string Added { get; set; }
|
||||
|
||||
[JsonPropertyName("lang")]
|
||||
public string Language { get; set; }
|
||||
|
||||
|
@ -11,6 +11,15 @@ namespace Jellyfin.Plugin.Fanart.Dtos
|
||||
[JsonPropertyName("url")]
|
||||
public string Url { get; set; }
|
||||
|
||||
[JsonPropertyName("width")]
|
||||
public int Width { get; set; }
|
||||
|
||||
[JsonPropertyName("height")]
|
||||
public int Height { get; set; }
|
||||
|
||||
[JsonPropertyName("added")]
|
||||
public string Added { get; set; }
|
||||
|
||||
[JsonPropertyName("lang")]
|
||||
public string Language { get; set; }
|
||||
|
||||
|
@ -138,7 +138,7 @@ namespace Jellyfin.Plugin.Fanart.Providers
|
||||
{
|
||||
PopulateImages(list, obj.SeasonPosters, ImageType.Primary, 1000, 1426, seasonNumber);
|
||||
PopulateImages(list, obj.SeasonBanners, ImageType.Banner, 1000, 185, seasonNumber);
|
||||
PopulateImages(list, obj.SeasonThumbs, ImageType.Thumb, 500, 281, seasonNumber);
|
||||
PopulateImages(list, obj.SeasonThumbs, ImageType.Thumb, 1000, 562, seasonNumber);
|
||||
PopulateImages(list, obj.Showbackgrounds, ImageType.Backdrop, 1920, 1080, seasonNumber);
|
||||
}
|
||||
|
||||
@ -184,6 +184,11 @@ namespace Jellyfin.Plugin.Fanart.Providers
|
||||
info.CommunityRating = likes;
|
||||
}
|
||||
|
||||
if (type == ImageType.Thumb && DateTime.Parse(i.Added, null) < new DateTime(2016,1,1)) {
|
||||
info.Width = 500;
|
||||
info.Height = 281;
|
||||
}
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
|
@ -154,7 +154,7 @@ namespace Jellyfin.Plugin.Fanart.Providers
|
||||
PopulateImages(list, obj.ClearArts, ImageType.Art, 500, 281);
|
||||
PopulateImages(list, obj.Showbackgrounds, ImageType.Backdrop, 1920, 1080, true);
|
||||
PopulateImages(list, obj.SeasonThumbs, ImageType.Thumb, 500, 281);
|
||||
PopulateImages(list, obj.TvThumbs, ImageType.Thumb, 500, 281);
|
||||
PopulateImages(list, obj.TvThumbs, ImageType.Thumb, 1000, 562);
|
||||
PopulateImages(list, obj.TvBanners, ImageType.Banner, 1000, 185);
|
||||
PopulateImages(list, obj.TvPosters, ImageType.Primary, 1000, 1426);
|
||||
}
|
||||
@ -201,6 +201,11 @@ namespace Jellyfin.Plugin.Fanart.Providers
|
||||
info.CommunityRating = likes;
|
||||
}
|
||||
|
||||
if (type == ImageType.Thumb && DateTime.Parse(i.Added, null) < new DateTime(2016,1,8)) {
|
||||
info.Width = 500;
|
||||
info.Height = 281;
|
||||
}
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user