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