Skip to content

pierri/Photos2Flickr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Photos to Flickr

App Icon - Photos2Flickr

Menulet for uploading Mac OS X Photos to Flickr.

Provided as-is, with no warranty that it'll be working as expected.

Warning, it might even delete elements from your Flickr account!

Libraries / Pods Used

Design - Signals

operationsToPerformSignal = mediaObjectsLoadedSignal.map(determineOperationForMediaObject)

flickrUploaderReadySignal = everySecondSignal.zip(previousOperationDoneSignal);

operationsToPerformSignal.zip(flickrUploaderReadySignal).subscribeNext(operation, ready) {
    operation.execute();
}

Design - Operations

                                    +----------------+
                                    | P2FOperation   |
                                    |----------------|
                                    | execute()      |
                                    | getSizeBytes() |
                                    | isDone()       |
                                    +----------------+
                                             ^
                                             |
             /—————————––––––––––––––––––––––+––––––––––––––––––––––––––––-\
             |                               |                             |
+--------------------------+   +--------------------------+   +--------------------------+
| P2FUploadMediumOperation |   | P2FUpdateMediumOperation |   | P2FUpdateFolderOperation |
|--------------------------|   |--------------------------|   |--------------------------|
|                          |   |                          |   |                          |
|––––––––––––––––––––––––––|   |--------------------------|   |--------------------------|
|                          |   |                          |   |                          |
+--------------------------+   +--------------------------+   +--------------------------+

Design - Progress Indication

Progress computation:

  • Goal: Progress indication with time remaining (e.g. 1:20 hour remaining)
  • Assumption: Stable network connection
  • Percent indication over total size in MB
  • Use pic size in MB
  • Assume 0.05 MB for all other requests
  • Display "Estimating time remaining" until first MB uploaded
  • Time remaining computed using average throughput during time elapsed

Operations performed:

  • Fetch picture list from Flickr, including metadata

    • Max. 500 pics / request (Flickr API limit)
    • Progress can be computed only after this operation
    • Status indication: "Getting picture list from Flickr..."
  • For pics deleted since last upload: Delete picture from Flickr

  • For new pics & pics changed since last upload: Upload pictures and set metadata

    • Upload order: oldest first
    • Use size in MB for determining progress
    • Progress indication: "Uploading Photos to Flickr..." + overall time remaining
    • Debug info: Uploading : MB of MB uploaded + ( % completed)
  • For existing pics: Update pic metadata if changed

    • Progress indication: "Uploading Photos to Flickr..." + overall time remaining
    • Debug info: Updating ( of ) + ( % completed)
  • Create albums & assign pics to albums

    • Progress indication: "Uploading Photos to Flickr..." + overall time remaining
    • Debug info: Updating album ( of ) + ( % completed)
  • Sort albums: Out of scope

  • Done!

    • Progress indication: "Last upload to Flickr on dd.mm.yyyy hh:mm"

Status bar:

  • One-line progress indication
  • Button to upload now / Button to abort

Backlog

High priority:

  • Feature: Upload Shared albums

Medium priority:

  • Feature: Retry failed operations (and mark completed operations as done)
  • Feature: Automatically upload to Flickr whenever media library is updated
  • Feature: Persist and display last upload completion timestamp (x minutes ago)
  • Feature: Use OFFlickrAPIRequest cancel to interrupt request in progress
  • Feature: Update tags on Flickr when they're updated in Photos

Low priority:

  • Refactor: Make FlickrClient reactive/asynchronous (not only its upload method)
  • Feature: Sort albums

About

Upload your Photos albums (Mac OS X) to Flickr

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published