From 4c0e3b493a2a048ce593749df2718511ac2c166c Mon Sep 17 00:00:00 2001 From: I-Al-Istannen Date: Fri, 24 Apr 2020 13:48:06 +0200 Subject: [PATCH] Use download_modified_or_new as default strategy --- PFERD/pferd.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/PFERD/pferd.py b/PFERD/pferd.py index ccfd531..dd72a8e 100644 --- a/PFERD/pferd.py +++ b/PFERD/pferd.py @@ -9,7 +9,8 @@ from typing import Optional from .cookie_jar import CookieJar from .ilias import (IliasAuthenticator, IliasCrawler, IliasDirectoryFilter, IliasDownloader, KitShibbolethAuthenticator) -from .ilias.download_strategies import DownloadStrategy, download_everything +from .ilias.download_strategies import (DownloadStrategy, + download_modified_or_new) from .location import Location from .organizer import Organizer from .tmp_dir import TmpDir @@ -75,7 +76,7 @@ class Pferd(Location): cookies: Optional[Path] = None, username: Optional[str] = None, password: Optional[str] = None, - download_strategy: DownloadStrategy = download_everything, + download_strategy: DownloadStrategy = download_modified_or_new, ) -> None: """ Synchronizes a folder with the ILIAS instance of the KIT. @@ -99,7 +100,7 @@ class Pferd(Location): the user. (default: {None}) download_strategy {DownloadStrategy} -- A function to determine which files need to be downloaded. Can save bandwidth and reduce the number of requests. - (default: {download_everything}) + (default: {download_modified_or_new}) """ # This authenticator only works with the KIT ilias instance. authenticator = KitShibbolethAuthenticator(username=username, password=password)