Skip to content

Commit

Permalink
Merge pull request #68 from leptoid/master
Browse files Browse the repository at this point in the history
Modify animeName.py to solve Issue #67
  • Loading branch information
Xonshiz authored Jan 27, 2019
2 parents 754a32d + 9ce2d26 commit a3bbd6e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions anime_dl/animeName.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def nameEdit(self, animeName, episodeNumber, resolution):
rawName = str(animeName).title().strip().replace("Season ", "S") + " - " +\
str(episodeNumber).strip() + " [" + str(resolution) + "]"
file_name = str(re.sub(r'[^A-Za-z0-9\ \-\' \\]+', '', str(animeName))).title().strip().replace("Season ", "S")\
+ " - " + str(episodeNumber).strip() + " [" + str(resolution) + "].mp4"
+ " - " + str(episodeNumber.zfill(2)).strip() + " [" + str(resolution) + "].mp4"

try:
max_path = int(subprocess.check_output(['getconf', 'PATH_MAX', '/']))
Expand All @@ -30,7 +30,7 @@ def nameEditFuni(self, animeName, seasonNumber, episodeNumber, resolution):
str(episodeNumber).strip())\
+ " [" + str(resolution) + "]"
file_name = str(re.sub(r'[^A-Za-z0-9\ \-\' \\]+', '', str(animeName))).title().strip().replace("Season ", "S") \
+ " - " + str(episodeNumber).strip() + " [" + str(resolution) + "].mp4"
+ " - " + str(episodeNumber.zfill(2)).strip() + " [" + str(resolution) + "].mp4"

try:
max_path = int(subprocess.check_output(['getconf', 'PATH_MAX', '/']))
Expand All @@ -41,4 +41,4 @@ def nameEditFuni(self, animeName, seasonNumber, episodeNumber, resolution):
if len(file_name) > max_path:
file_name = file_name[:max_path]

return file_name
return file_name
6 changes: 3 additions & 3 deletions anime_dl/sites/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import crunchyroll
import funimation
import vrv
import sites.crunchyroll
import sites.funimation
import sites.vrv

0 comments on commit a3bbd6e

Please sign in to comment.