Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing title when release_id #1820

Merged
merged 1 commit into from
Mar 8, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions core/auto_process/movies.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,9 +405,9 @@ def process(section, dir_name, input_name=None, status=0, client_agent='manual',
if release:
try:
release_id = list(release.keys())[0]
title = release[release_id]['title']
release_status_new = release[release_id]['status']
if release_status_old is None: # we didn't have a release before, but now we do.
title = release[release_id]['title']
logger.postprocess('SUCCESS: Movie {0} has now been added to CouchPotato with release status of [{1}]'.format(
title, str(release_status_new).upper()), section)
return ProcessResult(
Expand All @@ -416,8 +416,8 @@ def process(section, dir_name, input_name=None, status=0, client_agent='manual',
)

if release_status_new != release_status_old:
logger.postprocess('SUCCESS: Release for {0} has now been marked with a status of [{1}]'.format(
title, str(release_status_new).upper()), section)
logger.postprocess('SUCCESS: Release {0} has now been marked with a status of [{1}]'.format(
release_id, str(release_status_new).upper()), section)
return ProcessResult(
message='{0}: Successfully post-processed {1}'.format(section, input_name),
status_code=0,
Expand Down