mirror of
https://github.com/tubearchivist/jellyfin.git
synced 2024-11-16 17:00:14 +00:00
add umask to channel folder, fix if folder already exists, #10
This commit is contained in:
parent
248cc41839
commit
3c88c19eb1
@ -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.
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user