This repository has been archived by the owner on Nov 18, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
31 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
# | ||
# VideoSort post-processing script for NZBGet. | ||
# | ||
# Copyright (C) 2013-2018 Andrey Prygunkov <[email protected]> | ||
# Copyright (C) 2013-2020 Andrey Prygunkov <[email protected]> | ||
# | ||
# This program is free software; you can redistribute it and/or modify it | ||
# under the terms of the GNU Lesser General Public License as published by | ||
|
@@ -36,9 +36,9 @@ | |
# Author: Andrey Prygunkov ([email protected]). | ||
# Web-site: http://nzbget.net/VideoSort. | ||
# License: GPLv3 (http://www.gnu.org/licenses/gpl.html). | ||
# PP-Script Version: 8.0. | ||
# PP-Script Version: 9.0. | ||
# | ||
# NOTE: This script requires Python 2.x to be installed on your system. | ||
# NOTE: This script requires Python 2.x or 3.x to be installed on your system. | ||
|
||
############################################################################## | ||
### OPTIONS ### | ||
|
@@ -271,6 +271,11 @@ | |
import guessit | ||
import difflib | ||
|
||
try: | ||
unicode | ||
except NameError: | ||
unicode = str | ||
|
||
# Exit codes used by NZBGet | ||
POSTPROCESS_SUCCESS=93 | ||
POSTPROCESS_NONE=95 | ||
|
@@ -811,7 +816,7 @@ def add_series_mapping(guess, mapping): | |
episode_num_just = episodes[0].rjust(2, '0') + episode_separator + episodes[-1].rjust(2, '0') | ||
else: # if multiple_episodes == 'list': | ||
for episode_num in episodes: | ||
ep_prefix = episode_separator if episode_num_all <> '' else '' | ||
ep_prefix = episode_separator if episode_num_all != '' else '' | ||
episode_num_all += ep_prefix + episode_num | ||
episode_num_just += ep_prefix + episode_num.rjust(2,'0') | ||
|
||
|
@@ -1162,7 +1167,7 @@ def construct_path(filename): | |
old_path = '' | ||
while old_path != path: | ||
old_path = path | ||
for key, name in REPLACE_AFTER.iteritems(): | ||
for key, name in REPLACE_AFTER.items(): | ||
path = path.replace(key, name) | ||
|
||
path = path.replace('%up', '..') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters