fixes #2992 - Dashboard Active Recordings not showing thumbnail

This commit is contained in:
Luke Pulverenti 2017-11-20 16:27:49 -05:00
parent 47d7eaeedb
commit 46be272ec8

View File

@ -1897,7 +1897,15 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
imageSaveFilenameWithoutExtension = "logo";
break;
case ImageType.Thumb:
imageSaveFilenameWithoutExtension = "landscape";
if (program.IsSeries)
{
imageSaveFilenameWithoutExtension = Path.GetFileNameWithoutExtension(recordingPath) + "-thumb";
}
else
{
imageSaveFilenameWithoutExtension = "landscape";
}
break;
case ImageType.Backdrop:
imageSaveFilenameWithoutExtension = "fanart";
@ -1921,9 +1929,11 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
private async Task SaveRecordingImages(string recordingPath, LiveTvProgram program)
{
var image = program.GetImageInfo(ImageType.Primary, 0);
var image = program.IsSeries ?
(program.GetImageInfo(ImageType.Thumb, 0) ?? program.GetImageInfo(ImageType.Primary, 0)) :
(program.GetImageInfo(ImageType.Primary, 0) ?? program.GetImageInfo(ImageType.Thumb, 0));
if (image != null && program.IsMovie)
if (image != null)
{
try
{