allow custom song background images (#2632)

* allow custom song background images

* allow custom missing album art
This commit is contained in:
Jason Dove
2025-11-11 10:40:45 -06:00
committed by GitHub
parent 3984bc7dbe
commit 1e0bba0dc6
15 changed files with 60 additions and 60 deletions
@@ -30,6 +30,7 @@ public class FFmpegLibraryProcessService : IFFmpegProcessService
private readonly IMpegTsScriptService _mpegTsScriptService;
private readonly ILocalStatisticsProvider _localStatisticsProvider;
private readonly IMediaItemRepository _mediaItemRepository;
private readonly ILocalFileSystem _localFileSystem;
private readonly ICustomStreamSelector _customStreamSelector;
private readonly FFmpegProcessService _ffmpegProcessService;
private readonly IFFmpegStreamSelector _ffmpegStreamSelector;
@@ -49,6 +50,7 @@ public class FFmpegLibraryProcessService : IFFmpegProcessService
IMpegTsScriptService mpegTsScriptService,
ILocalStatisticsProvider localStatisticsProvider,
IMediaItemRepository mediaItemRepository,
ILocalFileSystem localFileSystem,
ILogger<FFmpegLibraryProcessService> logger)
{
_ffmpegProcessService = ffmpegProcessService;
@@ -62,6 +64,7 @@ public class FFmpegLibraryProcessService : IFFmpegProcessService
_mpegTsScriptService = mpegTsScriptService;
_localStatisticsProvider = localStatisticsProvider;
_mediaItemRepository = mediaItemRepository;
_localFileSystem = localFileSystem;
_logger = logger;
}
@@ -759,11 +762,9 @@ public class FFmpegLibraryProcessService : IFFmpegProcessService
}
}
string videoPath = Path.Combine(FileSystemLayout.ResourcesCacheFolder, "background.png");
if (!File.Exists(videoPath))
{
videoPath = Path.Combine(FileSystemLayout.ResourcesCacheFolder, "_background.png");
}
string videoPath = _localFileSystem.GetCustomOrDefaultFile(
FileSystemLayout.ResourcesCacheFolder,
"background.png");
var videoVersion = BackgroundImageMediaVersion.ForPath(videoPath, desiredResolution);