Skip to content

NotFound exception not handled when renaming files #65

Description

@andy-maier

When a media file is renamed while the fixups are runing, the resulting exception is not handled.

For example, during the video_genre_cleanup fixup:

Changing genres of movie ...

Traceback (most recent call last):
  File "c:\python37\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\python37\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\Andi\Envs\plex37\Scripts\plexmediafixup.exe\__main__.py", line 7, in <module>
  File "C:\Users\Andi\Envs\plex37\lib\site-packages\plexmediafixup\cli.py", line 412, in main
    config=config, fixup_kwargs=fixup_kwargs)
  File "C:\Users\Andi\Envs\plex37\lib\site-packages\plexmediafixup\fixups\video_genre_cleanup.py", line 173, in run
    change_rev, remove, if_empty)
  File "C:\Users\Andi\Envs\plex37\lib\site-packages\plexmediafixup\fixups\video_genre_cleanup.py", line 217, in process_item
    item.reload()
  File "C:\Users\Andi\Envs\plex37\lib\site-packages\plexapi\base.py", line 341, in reload
    return self._reload(key=key, **kwargs)
  File "C:\Users\Andi\Envs\plex37\lib\site-packages\plexapi\base.py", line 350, in _reload
    data = self._server.query(key)
  File "C:\Users\Andi\Envs\plex37\lib\site-packages\plexapi\server.py", line 667, in query
    raise NotFound(message)
plexapi.exceptions.NotFound: (404) not_found; http://192.168.0.12:32400/library/metadata/91991?checkFiles=1&includeAllConcerts=1&includeBandwidths=1&includeChapters=1&includeChildren=1&includeConcerts=1&includeExternalMedia=1&includeExtras=1&includeFields=thumbBlurHash%2CartBlurHash&includeGeolocation=1&includeLoudnessRamps=1&includeMarkers=1&includeOnDeck=1&includePopularLeaves=1&includePreferences=1&includeRelated=1&includeRelatedCount=1&includeReviews=1&includeStations=1 <html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions