mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-05 21:37:10 -04:00
Fix exception when episode title is null
Sometimes TheTVDb does not have episode. This caused an exception in EpisodeFileOrganizer
This commit is contained in:
parent
a5f2e21ca4
commit
c4aa744605
@ -504,7 +504,15 @@ namespace MediaBrowser.Server.Implementations.FileOrganization
|
||||
private string GetEpisodeFileName(string sourcePath, string seriesName, int seasonNumber, int episodeNumber, int? endingEpisodeNumber, string episodeTitle, TvFileOrganizationOptions options, int? maxLength)
|
||||
{
|
||||
seriesName = _fileSystem.GetValidFilename(seriesName).Trim();
|
||||
episodeTitle = _fileSystem.GetValidFilename(episodeTitle).Trim();
|
||||
|
||||
if (episodeTitle == null)
|
||||
{
|
||||
episodeTitle = string.Empty;
|
||||
}
|
||||
else
|
||||
{
|
||||
episodeTitle = _fileSystem.GetValidFilename(episodeTitle).Trim();
|
||||
}
|
||||
|
||||
var sourceExtension = (Path.GetExtension(sourcePath) ?? string.Empty).TrimStart('.');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user