diff --git a/README.md b/README.md index 6198c1b..aec7e05 100644 --- a/README.md +++ b/README.md @@ -99,8 +99,6 @@ Some ideas for why that is: - JF doesn't have the permissions to see the folder created by the extension. - You didn't mount the volumes as expected and JF is looking in the wrong place. -You might have to cleanup any leftover year folders in the channel if you have reached a `TimeoutError` before you can run it again. - ## Migration problems Due to the filesystem change between Tube Archivist v0.3.6 to v0.4.0, this will reset your YouTube videos in Jellyfin and will add them as new again. Unfortunately there is no migration path. diff --git a/app/src/series.py b/app/src/series.py index 3843b1a..0e9a7f2 100644 --- a/app/src/series.py +++ b/app/src/series.py @@ -192,7 +192,13 @@ class Show: os.path.split(jf_ep["Path"].replace("\\", "/"))[0] )[-1] season_folder = os.path.join(base, channel_folder, expected_season) - os.makedirs(season_folder) + if not os.path.exists(season_folder): + original_umask = os.umask(0) + try: + os.mkdir(season_folder, mode=0o777) + finally: + os.umask(original_umask) + self._wait_for_season(expected_season) return season_folder