1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-04 10:02:40 +01:00

Fixed: Use movieId instead of seriesId from MediaCover route

This commit is contained in:
Qstick 2020-02-11 20:34:30 -05:00
parent a19f0202b0
commit b766f0693a

View File

@ -1,4 +1,4 @@
using System.IO;
using System.IO;
using System.Text.RegularExpressions;
using Nancy;
using Nancy.Responses;
@ -22,12 +22,12 @@ public MediaCoverModule(IAppFolderInfo appFolderInfo, IDiskProvider diskProvider
_appFolderInfo = appFolderInfo;
_diskProvider = diskProvider;
Get(MEDIA_COVER_ROUTE, options => GetMediaCover(options.seriesId, options.filename));
Get(MEDIA_COVER_ROUTE, options => GetMediaCover(options.movieId, options.filename));
}
private object GetMediaCover(int seriesId, string filename)
private object GetMediaCover(int movieId, string filename)
{
var filePath = Path.Combine(_appFolderInfo.GetAppDataPath(), "MediaCover", seriesId.ToString(), filename);
var filePath = Path.Combine(_appFolderInfo.GetAppDataPath(), "MediaCover", movieId.ToString(), filename);
if (!_diskProvider.FileExists(filePath) || _diskProvider.GetFileSize(filePath) == 0)
{