Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Also upload movie files #13

Open
simonw opened this issue Apr 27, 2020 · 2 comments
Open

Also upload movie files #13

simonw opened this issue Apr 27, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@simonw
Copy link
Contributor

simonw commented Apr 27, 2020

The upload command currently only handles static images:

https://github.com/dogsheep/photos-to-sqlite/blob/d939455af00e07866686457ee2fcb9b2d1b7194e/photos_to_sqlite/utils.py#L26-L33

Need to cover movies taken by my phone and DSLR too.

@simonw simonw added the enhancement New feature or request label Apr 27, 2020
@simonw
Copy link
Contributor Author

simonw commented Apr 27, 2020

>>> def ext_counts(directory):
...     counts = {}
...     for path in pathlib.Path(directory).glob("**/*"):
...         ext = path.suffix
...         counts[ext] = counts.get(ext, 0) + 1
...     return counts
... 
>>> 
>>> ext_counts("/Users/simon/Pictures/Photos Library.photoslibrary/originals")
{'': 16, '.heic': 15478, '.jpeg': 21691, '.mov': 946, '.png': 2262, '.gif': 38, '.mp4': 116, '.aae': 2}

@simonw
Copy link
Contributor Author

simonw commented Apr 28, 2020

I'm going to leave this until I have the mechanism for associating a live photo video with the photo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant