Exemple #1
0
    def fs_checks(root_folder: Path, args: dict):
        Utils.minimum_date()
        Checks.get_max_path_length(root_folder)
        Checks.get_max_filename_length(root_folder)

        # check if symlinks are supported
        if not Checks.symlinks_supported(root_folder):
            args.skip_albums = True

        # check if file system is case sensitive
        if not args.case_insensitive_fs:
            if not Checks.is_case_sensitive(root_folder):
                args.case_insensitive_fs = True

        return args
Exemple #2
0
    def fs_checks(root_folder: Path, args: dict):
        Utils.minimum_date(root_folder)
        # store the root folder filesystem checks globally for all to inspect
        do_check(root_folder, int(args.max_filename), bool(args.ntfs))

        # check if symlinks are supported
        if not get_check().is_symlink:
            args.skip_albums = True

        # check if file system is case sensitive
        if not args.case_insensitive_fs:
            if not get_check().is_case_sensitive:
                args.case_insensitive_fs = True

        return args
 def __init__(self, root_folder: Path, db: LocalData, photos_path="photos"):
     self._root_folder: Path = root_folder
     self._db: LocalData = db
     self._media_folder: Path = Path(photos_path)
     self.files_indexed: int = 0
     self.files_index_skipped: int = 0
     self.start_date: datetime = None
     self.end_date: datetime = None
     if db:
         self.latest_download = self._db.get_scan_date() or \
                                Utils.minimum_date()
     self.extractor = LocationExtract()
    def __init__(self, api: RestClient, root_folder: Path, db: LocalData,
                 photos_path: Path, use_flat_path: bool = False):
        self._api: RestClient = api
        self._root_folder: Path = root_folder
        self._db: LocalData = db
        self._media_folder: Path = Path(photos_path)
        self._use_flat_path = use_flat_path

        self.files_indexed: int = 0
        self.files_index_skipped: int = 0

        if db:
            self.latest_download = self._db.get_scan_date() or \
                                   Utils.minimum_date()

        # attributes to be set after init
        # thus in theory one instance could do multiple indexes
        self.start_date: datetime = None
        self.end_date: datetime = None
        self.include_video: bool = True
        self.rescan: bool = False
        self.favourites = False