summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGunnar Wrobel <wrobel@gentoo.org>2005-11-14 21:15:00 +0000
committerGunnar Wrobel <wrobel@gentoo.org>2005-11-14 21:15:00 +0000
commitb83e0d9cd33b723d2266ae2c9a8b79875688ffef (patch)
treec634826e19f783b095523323aa476940f5c6991a /net-fs/flickrfs
parentFlickrfs fix (diff)
downloadoverlay-b83e0d9cd33b723d2266ae2c9a8b79875688ffef.tar.gz
overlay-b83e0d9cd33b723d2266ae2c9a8b79875688ffef.tar.bz2
overlay-b83e0d9cd33b723d2266ae2c9a8b79875688ffef.zip
Flickrfs fix
svn path=/; revision=525
Diffstat (limited to 'net-fs/flickrfs')
-rw-r--r--net-fs/flickrfs/files/flickrfs-1.1.patch53
1 files changed, 50 insertions, 3 deletions
diff --git a/net-fs/flickrfs/files/flickrfs-1.1.patch b/net-fs/flickrfs/files/flickrfs-1.1.patch
index a23a286..c9a6500 100644
--- a/net-fs/flickrfs/files/flickrfs-1.1.patch
+++ b/net-fs/flickrfs/files/flickrfs-1.1.patch
@@ -1,6 +1,6 @@
diff -Naur --exclude='*.pyc' flickrfs-1.1/flickrapi.py flickrfs-1.1-mod/flickrapi.py
--- flickrfs-1.1/flickrapi.py 2005-11-08 15:21:57.000000000 +0100
-+++ flickrfs-1.1-mod/flickrapi.py 2005-11-14 19:47:37.000000000 +0100
++++ flickrfs-1.1-mod/flickrapi.py 2005-11-14 22:07:26.000000000 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!python
@@ -31,7 +31,7 @@ diff -Naur --exclude='*.pyc' flickrfs-1.1/flickrfs.conf flickrfs-1.1-mod/flickrf
+
diff -Naur --exclude='*.pyc' flickrfs-1.1/flickrfs.py flickrfs-1.1-mod/flickrfs.py
--- flickrfs-1.1/flickrfs.py 2005-11-08 22:01:39.000000000 +0100
-+++ flickrfs-1.1-mod/flickrfs.py 2005-11-14 21:10:49.000000000 +0100
++++ flickrfs-1.1-mod/flickrfs.py 2005-11-14 21:56:16.000000000 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!python
@@ -65,7 +65,54 @@ diff -Naur --exclude='*.pyc' flickrfs-1.1/flickrfs.py flickrfs-1.1-mod/flickrfs.
class TransFlickr: #Transactions with flickr
def uploadfile(self, filepath, taglist, bufData, mode):
-@@ -700,6 +711,12 @@
+@@ -246,26 +257,28 @@
+ running in foreground, you can have threads
+ """
+ log.info("sets_thread: started")
+- self._mkfileOrDir("/sets", isDir=True)
++ self._mkfileOrDir("/sets", isDir=True)
+ rsp = fapi.photosets_getList(api_key=flickrAPIKey, auth_token=token)
+ if rsp!=None:
+- for a in rsp.photosets[0].photoset:
+- title = a.title[0].elementText.replace('/', ' ')
+- curdir = "/sets/" + title
+- if title.strip()=='':
+- curdir = "/sets/" + a['id']
+- set_id = a['id']
+- self._mkfileOrDir(curdir, id=set_id, isDir=True)
+- photos = fapi.photosets_getPhotos(api_key=flickrAPIKey, photoset_id=set_id)
+- if photos!=None:
+- for b in photos.photoset[0].photo:
+- title = b['title'].replace('/', ' ')
+- if title.strip()=='':
+- title = str(b['id'])
+- title = title[:32] #Only allow 32 characters
+- self._mkfileOrDir(curdir+'/'+title, \
+- id=str(b['id']), isDir=False)
+-
++ try:
++ for a in rsp.photosets[0].photoset:
++ title = a.title[0].elementText.replace('/', ' ')
++ curdir = "/sets/" + title
++ if title.strip()=='':
++ curdir = "/sets/" + a['id']
++ set_id = a['id']
++ self._mkfileOrDir(curdir, id=set_id, isDir=True)
++ photos = fapi.photosets_getPhotos(api_key=flickrAPIKey, photoset_id=set_id)
++ if photos!=None:
++ for b in photos.photoset[0].photo:
++ title = b['title'].replace('/', ' ')
++ if title.strip()=='':
++ title = str(b['id'])
++ title = title[:32] #Only allow 32 characters
++ self._mkfileOrDir(curdir+'/'+title, \
++ id=str(b['id']), isDir=False)
++ except Exception, e:
++ print str(e)
+
+
+
+@@ -700,6 +713,12 @@
#@+node:mainline
if __name__ == '__main__':