Blog

Keeping Flickr away from iPhoto

iphoto.png Update: Andrew made a better suggestion in the comments below that I hadn’t thought of: De-authorise iPhoto from your Flickr account, then just delete the Flickr albums in iPhoto. Thanks, Andrew!

iPhoto ’09 introduced Flickr support, so that you can post photos and albums to your Flickr account. Unfortunately for some, it has some issues: A tendency to perform mass-deletions on uploaded photosets after the initial upload. For example, for me, having uploaded several hundred images, iPhoto has deleted almost all of them on two separate occasions, requiring the photosets to be constructed from scratch.

For those who were considering using Flickr from iPhoto, don’t, and save yourself the hassle (use FlickrExport instead). For those who have and are seeking a remedy to keep iPhoto away from Flickr, read on.

I encountered the uncomfortable scenario where iPhoto had forgotten about three quarters of the images in the uploaded photosets, and upon launch, looked like it was going to delete the remainder from my Flickr account. Rather than let this happen, I force quit iPhoto, and performed the following steps to force iPhoto to forget about my Flickr account. This is a very complicated process, not for the faint of heart, but it was necessary for me to save my Flickr account:

  1. Right-click on the ‘iPhoto Library’ package, probably in the ‘Pictures’ folder
  2. For the files AlbumData.xml and AlbumData2.xml:
    1. Backup the files somewhere
    2. Open the file in a text editor
    3. Search for the term ‘http://www.flickr.com’
    4. Wherever this is found, delete the surrounding text between <dict> and </dict>. There will be one of these dict structures for every photoset
    5. Save the file
  3. Now the tricky part: Find an SQLite editor (I used Froq) and open up iPhotoMain.db within the ‘iPhoto Library’ package. To access the file, I had to copy it to my Desktop first, then open it there (back it up first).
    1. Click on the SqPublishedAlbum table to see the contents. This lists all of the published albums, including Flickr, Facebook, etc. Find the entries with a publishedURL at flickr.com, and delete them. In Froq, I had to take note of their primary key values, and manually execute an SQL query (DELETE FROM SqPublishedAlbum WHERE primaryKey = 12345). Remember those primary key values, because you’ll need them.
    2. Click on the SqAlbum table, and delete the albums with the same primary key values – if you used an SQL query as above, you can just re-use the same query but change the table name to SqAlbum.
    3. Repeat the same process for the AlbumsPhotosJoin table – in this case, you’ll need to delete entries with the sqAlbum field values matching the prior primarykey values. Something like DELETE FROM AlbumsPhotosJoin WHERE sqAlbum = 12345 will do it.
    4. Done with this database – commit and close, but remember the primary key values for the Flickr albums.
  4. Next, open up the other SQLite database, iPhotoAux.db, after backing it up
    1. Delete the Flickr album records from the SqAlbumSubclasses table. Something like: DELETE FROM SqAlbumSubclasses WHERE primaryKey = 12345.
    2. Commit and close
  5. Send a bug report to Apple

That’s it! Now, after starting iPhoto, the Flickr albums should be gone, safe at last. FlickrExport is a £12 plugin that provides better, more reliable functionality than iPhoto ’09.

Tagged . Bookmark the permalink. Both comments and trackbacks are currently closed.

5 Comments

  1. Posted June 4, 2009 at 9:09 am | Permalink

    A much easier way to do this same thing would be to de-authorize iphoto on your flickr account (thus severing the link, and protecting all photos still on flickr) and then deleting each flickr album in iphoto. This seemed to work for me.

  2. Nicolas Steinmetz
    Posted November 1, 2009 at 11:14 pm | Permalink

    Thanks, you saved my life :-)

    What a pity FlickrExport does not export (yet) the position set in iphoto…

  3. Rammo
    Posted June 3, 2010 at 10:53 am | Permalink

    I found an app called FlickrFriend which you can use to help – rather than me type out my findings it’s probably easier to download and have a play.

  4. Posted June 3, 2010 at 1:12 pm | Permalink

    That actually looks really good – I particularly like the way it avoids duplicates by checking against the timestamps of uploaded images.

    I’m not 100% sure about the way it provides for selection of images for uploading, with a single ‘exclude album’. I mean, it’d do the job, but it’s a tad inelegant and requires having an album of ugly sitting around.

    Otherwise, looks awesome. Thanks for the heads-up!

  5. BallGame
    Posted June 29, 2010 at 6:57 am | Permalink

    Easier than Remembering the Primary Keys is to run these in this order

    delete from SqAlbum where primaryKey in(select primaryKey from sqpublishedalbum where publishedURL like ‘%flickr%’); delete from AlbumsPhotosJoin where sqAlbum in(select primaryKey from sqpublishedalbum where publishedURL like ‘%flickr%’); delete from sqpublishedalbum where publishedURL like ‘%flickr%’

    Much Faster.

One Trackback

  1. By Eli, the physio | on May 18, 2011 at 9:46 am

    […] iPhoto decided to delete my Flickr Album with the pics. I had to re-upload them, and redo the embedding of the […]