mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-04-24 13:57:11 -04:00
Fixed: Don't name with "0" year if no year in db
This commit is contained in:
parent
de2ebba363
commit
f59b391b28
2 changed files with 8 additions and 1 deletions
|
@ -117,7 +117,8 @@ class NamingModal extends Component {
|
|||
{ token: '{Movie Title}', example: 'Movie Title!' },
|
||||
{ token: '{Movie CleanTitle}', example: 'Movie Title' },
|
||||
{ token: '{Movie TitleThe}', example: 'Movie Title, The' },
|
||||
{ token: '{Movie Certification}', example: 'R' }
|
||||
{ token: '{Movie Certification}', example: 'R' },
|
||||
{ token: '{Release Year}', example: '2009' }
|
||||
];
|
||||
|
||||
const movieIdTokens = [
|
||||
|
|
|
@ -214,6 +214,12 @@ namespace NzbDrone.Core.Organizer
|
|||
|
||||
private void AddReleaseDateTokens(Dictionary<string, Func<TokenMatch, string>> tokenHandlers, int releaseYear)
|
||||
{
|
||||
if (releaseYear == 0)
|
||||
{
|
||||
tokenHandlers["{Release Year}"] = m => string.Empty;
|
||||
return;
|
||||
}
|
||||
|
||||
tokenHandlers["{Release Year}"] = m => string.Format("{0}", releaseYear.ToString()); //Do I need m.CustomFormat?
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue