Skip to content

Commit

Permalink
Added ability to skip downloading content
Browse files Browse the repository at this point in the history
  • Loading branch information
UltimaHoarder committed Jun 19, 2021
1 parent 3db1cbe commit c22783c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
2 changes: 2 additions & 0 deletions classes/make_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ def __init__(self, option={}) -> None:
self.renamer = option.get('renamer', True)
self.reformat_media = option.get(
'reformat_media', True)
self.downloader = option.get(
'downloader', True)
self.delete_empty_directories = option.get(
'delete_empty_directories', False)
self.auto_site_choice = auto_site_choice
Expand Down
17 changes: 9 additions & 8 deletions helpers/main_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -695,14 +695,15 @@ async def process_names(


async def process_downloads(api, module):
for auth in api.auths:
subscriptions = await auth.get_subscriptions(refresh=False)
for subscription in subscriptions:
await module.prepare_downloads(subscription)
if json_global_settings["helpers"]["delete_empty_directories"]:
delete_empty_directories(
subscription.download_info.get("base_directory", "")
)
if json_global_settings["helpers"]["downloader"]:
for auth in api.auths:
subscriptions = await auth.get_subscriptions(refresh=False)
for subscription in subscriptions:
await module.prepare_downloads(subscription)
if json_global_settings["helpers"]["delete_empty_directories"]:
delete_empty_directories(
subscription.download_info.get("base_directory", "")
)


async def process_webhooks(api: Union[OnlyFans.start], category, category2):
Expand Down
1 change: 0 additions & 1 deletion modules/onlyfans.py
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,6 @@ async def process_metadata(
subscription,
delete_metadatas,
):
print
Session, api_type, folder = main_helper.export_sqlite(
archive_path, new_metadata_object, parent_type
)
Expand Down

0 comments on commit c22783c

Please sign in to comment.