Skip to content

Commit

Permalink
fix: Remove invalid %desc specifier from DatedFormat
Browse files Browse the repository at this point in the history
Since the %desc is not supported by guessit, it would always be empty.
Furthermore no documentation was provided and all dated test cases used it.

The specifier was removed and the test cases adjusted accordingly.

See: nzbget#52
  • Loading branch information
fleXible committed Aug 25, 2019
1 parent cf23015 commit a2c83a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 0 additions & 5 deletions VideoSort.py
Original file line number Diff line number Diff line change
Expand Up @@ -901,11 +901,6 @@ def add_dated_mapping(guess, mapping):
mapping.append(('%s.N', show_name_two))
mapping.append(('%s_N', show_name_three))

# Guessit doesn't provide episode names for dated tv shows
mapping.append(('%desc', ''))
mapping.append(('%.desc', ''))
mapping.append(('%_desc', ''))

# date
date = guess.get('date')

Expand Down
4 changes: 2 additions & 2 deletions testdata.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,13 @@
"id": "dated-1",
"INPUTFILE": "The.Daily.Show.2013.06.27.Tom.Goldstein.HDTV.x264-FQM.mkv",
"OUTPUTFILE": "/dated/2013-06/The Daily Show - 2013-6-27.mkv",
"NZBPO_DATEDFORMAT": "%y-%0m/%t - %y-%m-%0d - %desc.%ext"
"NZBPO_DATEDFORMAT": "%y-%0m/%t - %y-%m-%0d.%ext"
},
{
"id": "dated-2",
"INPUTFILE": "Real.Time.with.Bill.Maher.2014.10.31.720p.HDTV.x264-BATV.mkv",
"OUTPUTFILE": "/dated/2014-10/Real Time With Bill Maher - 2014-10-31.mkv",
"NZBPO_DATEDFORMAT": "%y-%0m/%t - %y-%m-%0d - %desc.%ext"
"NZBPO_DATEDFORMAT": "%y-%0m/%t - %y-%m-%0d.%ext"
},
{
"id": "dated-case-correct",
Expand Down

0 comments on commit a2c83a0

Please sign in to comment.