Skip to content

Commit d03ab79

Browse files
authored
[TubeSync-fs] Check for cookiefile option directly
1 parent e221361 commit d03ab79

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tubesync/yt_dlp_plugins/extractor/cache-filesystem.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
@register_provider
1515
class TubeSyncFileSystemPCP(PoTokenCacheProvider): # Provider class name must end with "PCP"
16-
PROVIDER_VERSION = '0.0.1'
16+
PROVIDER_VERSION = '0.0.2'
1717
# Define a unique display name for the provider
1818
PROVIDER_NAME = 'TubeSync-fs'
1919
BUG_REPORT_LOCATION = 'https://github.com/meeb/tubesync/issues'
@@ -42,9 +42,8 @@ def is_available(self) -> bool:
4242
cache_home = getenv('XDG_CACHE_HOME')
4343
if not cache_home:
4444
return False
45-
# TODO: check the actual setting: cookiefile
46-
cookie_file = Path(cache_home) / '../cookies.txt'
47-
if not cookie_file.is_file():
45+
cookie_file = self.ie.get_param('cookiefile')
46+
if cookie_file is None or not Path(cookie_file).is_file():
4847
return False
4948
directory = Path(cache_home) / 'yt-dlp/youtube-pot'
5049
if directory.exists() and directory.is_dir():

0 commit comments

Comments
 (0)