Giter Club home page Giter Club logo

Comments (11)

vanous avatar vanous commented on May 16, 2024

Hi,

after a bit of digging, it seems that this...

Currently photo api relies on a hacked version of gdata: TODO - fork the gdata repo and point dependency at it.

...is the reference to the source of this issue. I have found multiple implementation hints, but none where to look in the gdata/service.py which i presume is the culprit.

thank you for any pointers

from gphotos-sync.

vanous avatar vanous commented on May 16, 2024

Hi,

i have tried rclone and gazillion of different tools which are now all obsolete and it seems like gphotos-sync is my last resort to get a shared album to be screened in realtime on my coworker's wedding (share album to people and pull it periodically, then upload to ftp of moving head video projector and do random slideshow).

Would you kindly share your modified gdata please?

Thank you

P.

from gphotos-sync.

gilesknap avatar gilesknap commented on May 16, 2024

hi sorry for the delay - I've been on Holiday and only just seen this post since GitHub notifications go to work email.

I'm actively working on this project in my spare time, it is in flux and does not yet download albums as such but does scan them and find all their contained files as references into the google drive storage (see the latest branch - not master). The download part will probably be done sometime this week.

However, I caution you that the Picassa web API is severely crippled and two limitations will affect your use case. (1) it is impossible to see shared albums, only unshared albums will show up via picasa API (and it is the only current API to extract album info) (2) albums of over 1000 or so files will get the file list truncated.

If you are still interested then clone https://github.com/google/gdata-python-client.git and apply the following diff:

diff --git a/src/gdata/gauth.py b/src/gdata/gauth.py
index ce290a8..33cc7a1 100644
--- a/src/gdata/gauth.py
+++ b/src/gdata/gauth.py
@@ -1338,7 +1338,7 @@ class OAuth2Token(object):
else:
return response

  • client.http_client.request = new_request
  • #client.http_client.request = new_request
    return client

def revoke(self, revoke_uri=None, refresh_token=None):
diff --git a/src/gdata/photos/service.py b/src/gdata/photos/service.py
index 23c5feb..eabe482 100755
--- a/src/gdata/photos/service.py
+++ b/src/gdata/photos/service.py

from gphotos-sync.

vanous avatar vanous commented on May 16, 2024

Thank you so much for your reply.
The fact that it cannot go into shared albums is a deal breaker for that event, but i will set my coworker with rclone with gdrive-ftp integration, so the rsync only works as a bridge, so he is alright.

I will still play with your code as i am interested in it personally,

thank you once again!

cheers

Petr

from gphotos-sync.

gilesknap avatar gilesknap commented on May 16, 2024

from gphotos-sync.

gilesknap avatar gilesknap commented on May 16, 2024

I've tried to automate the patch of gdata but failed - investigating.

However, the code is now working pretty well. With the above patch, you should be able to sync album contents. Comitted to master.

from gphotos-sync.

gilesknap avatar gilesknap commented on May 16, 2024

The gdata patch is now included in the gphotos-sync code so it should work simply with
pip install -r requirements.txt

from gphotos-sync.

vanous avatar vanous commented on May 16, 2024

This is great, thank you very much, I will try it tonight.

Cheers
P.

from gphotos-sync.

gilesknap avatar gilesknap commented on May 16, 2024

Although the first fix allowed the code to execute it did not refresh the token. This is now fixed and tested. Closing ticket.

from gphotos-sync.

vanous avatar vanous commented on May 16, 2024

swamped by work, but managed to test. Seems to connect successfully, but looks like unexpected data in my folders?

thank you very much

Petr

(aaa) vanous@tc-vanek:~/bin/projects/python/photo-sync/aaa/gphotos-sync$ python gphotos-sync --index-only ../PHOTOS/

Indexing Drive Folders ...
Resolving paths ...
Drive Folders scanned.

Indexing Drive Files ...
Added 1 ../PHOTOS/drive/2013/05/13 - 1 (1)

Done.

Saving Database ...
Database Saved.

Traceback (most recent call last):
File "gphotos-sync", line 7, in
g.main()
File "/home/vanous/bin/projects/python/photo-sync/aaa/gphotos-sync/Main.py", line 169, in main
self.start(args)
File "/home/vanous/bin/projects/python/photo-sync/aaa/gphotos-sync/Main.py", line 141, in start
self.drive_sync.index_drive_media()
File "/home/vanous/bin/projects/python/photo-sync/aaa/gphotos-sync/GoogleDriveSync.py", line 165, in index_drive_media
media.save_to_db(self._db)
File "/home/vanous/bin/projects/python/photo-sync/aaa/gphotos-sync/GoogleMedia.py", line 58, in save_to_db
return db.put_file(data_tuple)
File "/home/vanous/bin/projects/python/photo-sync/aaa/gphotos-sync/LocalData.py", line 127, in put_file
(None,) + data_tuple)
sqlite3.IntegrityError: UNIQUE constraint failed: SyncFiles.Path, SyncFiles.FileName, SyncFiles.DuplicateNo

from gphotos-sync.

gilesknap avatar gilesknap commented on May 16, 2024

from gphotos-sync.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.