Skip to content

Commit

Permalink
possible fix for #163
Browse files Browse the repository at this point in the history
  • Loading branch information
1337-server committed May 6, 2022
1 parent 551c7e6 commit 7d53bdf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
8 changes: 8 additions & 0 deletions arm/ripper/arm_ripper.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,14 @@ def rip_visual_media(have_dupes, job, logfile, protection):
# Delete the transcode path and update the out path to RAW path
utils.delete_raw_files([hb_out_path])
hb_out_path = hb_in_path
# Update final path if user has set a custom/manual title
if job.title_manual:
# Remove the old final dir
utils.delete_raw_files([final_directory])
job_title = utils.fix_job_title(job)
final_directory = os.path.join(job.config.COMPLETED_PATH, type_sub_folder, job_title)
# Update the job.path with the final directory
utils.database_updater({'path': final_directory}, job)
# Move to final folder
move_files_post(hb_out_path, job)
# Movie the movie poster if we have one - no longer needed, now handled by save_movie_poster
Expand Down
5 changes: 3 additions & 2 deletions arm/ui/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,13 @@ def get_info(directory):

def clean_for_filename(string):
""" Cleans up string for use in filename """
string = re.sub(r"\[[^]]*]", "", string)
string = re.sub('\\s+', ' ', string)
string = re.sub(r'\s+', ' ', string)
string = string.replace(' : ', ' - ')
string = string.replace(':', '-')
string = string.replace('&', 'and')
string = string.replace("\\", " - ")
# Strip out any remaining illegal chars
string = re.sub(r"[^\w -]", "", string)
string = string.strip()
return string

Expand Down

0 comments on commit 7d53bdf

Please sign in to comment.