clinton-hall / nzbToMedia

Provides NZB and Torrent postprocessing To CouchPotatoServer, SickBeard/SickRage, HeadPhones, Mylar and Gamez
GNU General Public License v3.0
674 stars 176 forks source link

KeyError when processing movie downloads. #1894

Closed redhat421 closed 2 years ago

redhat421 commented 2 years ago

Describe the bug A clear and concise description of what the bug is.

When attempting to post process downloaded movies, nzbToMedia is exiting w/ status 1. Looking at the logs, I see a KeyError exception is generated on this line: https://github.com/clinton-hall/nzbToMedia/blob/d23c2c2d3a01d7850fc5ea4de9e427a804e47b6a/core/auto_process/movies.py#L575

A closer inspection uncovered a minor bug in the release selection logic.

Technical Specs

  1. Running on Linux.
  2. Python version 3.9.7
  3. Download Client SABnbzd
  4. Intended Media Management CouchPotoato

Expected behavior Post processing sends HTTP RPC to CouchPotoato, and processes media.

Log

Traceback (most recent call last):
File "/nzbtomedia/nzbToMedia.py", line 1061, in <module>
exit(main(sys.argv))
File "/nzbtomedia/nzbToMedia.py", line 966, in main
result = process(os.environ['SAB_COMPLETE_DIR'], input_name=os.environ['SAB_FINAL_NAME'], status=int(os.environ['SAB_PP_STATUS']),
File "/nzbtomedia/nzbToMedia.py", line 851, in process
result = movies.process(section_name, input_directory, input_name, status, client_agent, download_id, input_category, failure_link)
File "/nzbtomedia/core/auto_process/movies.py", line 401, in process
release = get_release(base_url, imdbid, download_id, release_id)
File "/nzbtomedia/core/auto_process/movies.py", line 568, in get_release
results.pop(id)
KeyError: '1e22f666ae8a4ef5b388044a7a6ddafe'
clinton-hall commented 2 years ago

Thanks for the fix. It is now in Nightly

redhat421 commented 2 years ago

Cool, this should be fixed!