updates sync processing logic
This commit is contained in:
@@ -4,7 +4,9 @@ from .store import Content, Store
|
||||
from .config import load_config, BadConfiguration
|
||||
from .utils import print_error, print_success
|
||||
|
||||
def find_deleted():
|
||||
|
||||
def find_imported():
|
||||
""" Finds files imported into the gallery """
|
||||
return Content()
|
||||
|
||||
|
||||
@@ -39,11 +41,14 @@ def main(opts):
|
||||
|
||||
if opts.sync: # Synchronize deleted files
|
||||
print_success("Syncing...")
|
||||
deleted = find_deleted()
|
||||
imported = find_imported()
|
||||
for ext, backup in backups.items():
|
||||
backup.trash_content(deleted.filter_by_ext(ext))
|
||||
if opts.update_card:
|
||||
camera.remove_content(deleted)
|
||||
with_ext = imported.filter_by_ext(ext)
|
||||
deleted = backup.difference(with_ext)
|
||||
backup.trash_content(deleted)
|
||||
if opts.update_card:
|
||||
deleted = camera.difference(with_ext)
|
||||
camera.remove_content(deleted)
|
||||
|
||||
if opts.wipe_card: # Wipe the camera memory
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user