From 8339f7fdb34e5f9e3abb1ea42ca0e00b4292f037 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sat, 23 Feb 2019 11:11:47 -0800 Subject: [PATCH] Fixed: Don't add TV Maze ID to format if unknown --- src/NzbDrone.Core/Organizer/FileNameBuilder.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NzbDrone.Core/Organizer/FileNameBuilder.cs b/src/NzbDrone.Core/Organizer/FileNameBuilder.cs index 30517658b..0a6c4aa83 100644 --- a/src/NzbDrone.Core/Organizer/FileNameBuilder.cs +++ b/src/NzbDrone.Core/Organizer/FileNameBuilder.cs @@ -610,7 +610,7 @@ namespace NzbDrone.Core.Organizer { tokenHandlers["{ImdbId}"] = m => series.ImdbId ?? string.Empty; tokenHandlers["{TvdbId}"] = m => series.TvdbId.ToString(); - tokenHandlers["{TvMazeId}"] = m => series.TvMazeId.ToString(); + tokenHandlers["{TvMazeId}"] = m => series.TvMazeId > 0 ? series.TvMazeId.ToString() : string.Empty; } private void AddPreferredWords(Dictionary> tokenHandlers, Series series, EpisodeFile episodeFile, List preferredWords = null)