diff --git a/.gitignore b/.gitignore index eaa5a56..6a17f12 100644 --- a/.gitignore +++ b/.gitignore @@ -5,8 +5,4 @@ /.venv/ /.idea/ /.git/ - -/data -/src/nextcast/data/ - /*.zip diff --git a/src/nextcast/data_dir.py b/src/nextcast/data_dir.py index cbe16cc..59c9b39 100644 --- a/src/nextcast/data_dir.py +++ b/src/nextcast/data_dir.py @@ -4,28 +4,32 @@ from pathlib import Path def get_audio_dir() -> Path: - return Path('data') / 'audio' + return datadir() / 'audio' def get_feed_dir() -> Path: - return Path('data') / 'feed' + return datadir() / 'feed' def get_podcast_dir() -> Path: - return Path('data') / 'podcast' + return datadir() / 'podcast' def get_mpv_watch_later_dir() -> Path: - return Path('data') / 'watch_later' + return datadir() / 'watch_later' def get_timestamp_file(): - return Path('data') / 'timestamps.json' + return datadir() / 'timestamps.json' def get_subscription_file(): - return Path('data') / 'subscriptions.json' + return datadir() / 'subscriptions.json' def get_credential_file(): - return Path('data') / 'nc_logins.json' + return datadir() / 'nc_logins.json' + + +def datadir() -> Path: + return Path.home() / 'nextcast'