Skip to content

Commit

Permalink
fix: Deprecate undocumented DatedFormat specifiers
Browse files Browse the repository at this point in the history
Specifiers *%t, %.t, %_t* are meant for movie titles and are
undocumented for DatedFormat.

- Newly introduced feature to deprecate specifiers is used to inform user.

Closes nzbget#52
  • Loading branch information
fleXible committed Aug 25, 2019
1 parent 47120e1 commit f17263c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions VideoSort.py
Original file line number Diff line number Diff line change
Expand Up @@ -906,9 +906,9 @@ def add_dated_mapping(guess, mapping):
mapping.append(('%_title', title_three))

# title (short forms)
mapping.append(('%t', title))
mapping.append(('%.t', title_two))
mapping.append(('%_t', title_three))
mapping.append(('%t', title, 'consider using %sn'))
mapping.append(('%.t', title_two, 'consider using %s.n'))
mapping.append(('%_t', title_three, 'consider using %s_n'))

# Show name
series = guess.get('title', '')
Expand Down
4 changes: 2 additions & 2 deletions testdata.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,13 @@
"NZBPR__DNZB_EPISODENAME": "Let the Children the Childbearers Toil"
},
{
"id": "dated-1",
"id": "dated-deprecated-t-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.%ext"
},
{
"id": "dated-2",
"id": "dated-deprecated-t-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.%ext"
Expand Down

0 comments on commit f17263c

Please sign in to comment.