Skip to content

Commit

Permalink
fix incorrect naming for multi-part movies
Browse files Browse the repository at this point in the history
  • Loading branch information
Konrad Rieck committed Dec 13, 2015
1 parent 1db6423 commit 4465fd6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.idea
plex
*.gz
*.db
2 changes: 1 addition & 1 deletion perplex.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def build_map(movies, mapping=[]):
_, ext = os.path.splitext(old_name)

template = "%s (%s)/%s (%s)" % (title, year, title, year)
template += " - %.2d" % i if len(files) > 1 else ""
template += " - part%d" % (i + 1) if len(files) > 1 else ""
template += ext

new_name = os.path.join(*template.split("/"))
Expand Down

0 comments on commit 4465fd6

Please sign in to comment.