[RELEASE] Picasa Desktop

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
datom Offline
Junior Member
Posts: 16
Joined: Jul 2010
Reputation: 0
Thumbs Up  [RELEASE] Picasa Desktop
Post: #1
this addon read's the picasa database an shows all your albums in xbmc.

i dont want to share my picture with google also i dont want to manage all folder to view my albums in xbmc. so i created this tiny addon to access easily the albums from my picasa desktop.

maybe some other need this feature too.

Knowing issues
Not working with picasa 3.9

Version 0.6
Initial linux support
Testet on Ubuntu 11.10 with Picasa 3.0 Beta

Version 0.3
Added network support


network how to
1) download picasastarter http://sites.google.com/site/picasastartersite/
2) run and add a new database. in the base directory will picasa store the database. eg. \\192.168.0.100\Share\Picasa
3) click "Run Picasa"
4) add picture from the network to picasa. eg. \\192.168.0.100\Share\MyPicture\Holiday
5) make an album in picasa an add your picture
6) goto xbmc picture plugins and open the plugin settings dialog from picasa-desktop
7) switch location to network
8) enter the picasa network database location eg. \\192.168.0.100\Share\Picasa
9) if nothing went wrong you musst see your albums
i don't know why but xbmc can't show the thumbs over network. you have to force regenerate thumbs to see it

Picasa Desktop
http://www.da-tom.com/xbmc/plugin.image....esktop.zip


Picasa Desktop 2 Beta
https://github.com/datom/xbmc-addons

I have completely re written the source code. So we have now some very cool feature i think.
the first one, Picasa 3.9 is now supported
the second one is for every linux user, smb network share works now out of the box. this means you dont have to mount your network shares by your own. hello openelec :-)
of course everything from the old addon is working again

please keep in mind, it's beta ;-)
(This post was last modified: 2012-06-01 09:31 by datom.)
find quote
craigd Offline
Senior Member
Posts: 285
Joined: May 2007
Reputation: 0
Post: #2
Will try this soon, great idea as picasa is a great tool for managing photos.
find quote
Bourne23 Offline
Junior Member
Posts: 2
Joined: Jan 2011
Reputation: 0
Post: #3
Hi, this Add-On doesn't work.
I have Win 7 and Picasa 3, XBMC 10.0.35647.
After installing the Add-On there is an Error, at this moment where i click on Picasa Dektop.
"Script Error in ...."

Sometimes it goes to the next page but displays nothing.

Any Idea of fixing this Problem?

Martin
find quote
Bourne23 Offline
Junior Member
Posts: 2
Joined: Jan 2011
Reputation: 0
Post: #4
This feuature is one of the most interresting for me at XBMC.
For the future I hope so i can access my QNap NAS and search by the tags that i have set with picasa.

Ok i have found the failur. Only the Albs will be shown.

(Ich fände es super wenn man ein Plugin bauen könnte dass, wie das normale Picasa Plugin ist. Nur halt auf localer Basis.
Ich kenne auch niemanden der diese bescheuerten Webalben benutzt, 1 GB was soll man damit schon machen und wieso sollte man überhaupt seine Persönlichen Bilder so nem Datensammler wie Googel zugänglich machen wenn man das nicht ohnehin schon mit der Desktop Anwendung macht. (Im Script standen Deutsche Bemerkungen, und da ich Deutsch ein wenig besser kann als Englisch habe ich es mal so probiert))

Gruß Martin
(This post was last modified: 2011-01-05 22:28 by Bourne23.)
find quote
tequila Offline
Junior Member
Posts: 41
Joined: Nov 2009
Reputation: 0
Post: #5
yeah that would be neat... don´t want to share my private family photos online too

what is the problem with linux ? as I see it is python

datom: da sind übrigens ein paar "persönliche" Daten im .pyo ;-)
wenn die Pfade so verwendet werden, dann wirds natürlich problematisch auf anderen Rechnern
find quote
datom Offline
Junior Member
Posts: 16
Joined: Jul 2010
Reputation: 0
Post: #6
thanks for the notice. i changed the comments and removed the python cache file.
the addon works with the Dharma release.

@Bourne23
have you still any problems?

@tequila
i think there is no (big) problem with linux but i have no machine to test the linux version.
---
im code sind die pfade natürlich dynamisch. pyo datei ist ja nur die cache file von python damit der code schneller läuft. aber gut zu wissen das da sowas drinn steht ;-)


some infos about picasa desktop:
There are 2 ways to load the albums from picasa

1) access the picasa database file (the addon use this solution)
problems:
i have sometimes the problem that the addon can't find the database because picasa is refreshing theses files. after 60 seconds or less it works again

network solution:
picasa have to use a network share to store there own database files
you have to enter the picasa database id in the addon config page


2) acces the albums via an hidden webserver in picasa
problems:
picasa musst run to access the albums
you have to send an shortcut to picasa to start the webserver
you can connect only via localhost

network solution:
works only if a tiny programm run and wrap the request from network to the localhost



I have not much time in the moment but i will try to check the linux functionality until the next week.

please stand by and thanks for testing :-)
find quote
gpulido Offline
Junior Member
Posts: 33
Joined: Aug 2009
Reputation: 0
Post: #7
Hello!, nice work!
I have picasa 3.6 installed in linux using wine.
In the same machine I've an xbmc running as a program, so it has access to the file system where the picasa is installed.
I've revised your code, and it seems that pointing the addon to the place in the file system where the picasa .pal files are located, should be enough to have the xbmc populated with the picasa albums.

Unfortunately I haven't been able to install your plugin (I tried the install from zip and the xbmc doesn't make any changes, and I tried unziping the addon in the plugins directory and it doesn't work Sad )

Two questions:
-How can I install the plugin? If I'm able to install it, I could try to test my scenario.
- is it correct that the plugin only would need the path to the .pal files?. If the answer is yes, the picasa files could be located in a network path with a symlink to the "installation" path. This way for the picasa installation is transparent where the files are located, and every computer on the network could have a xbmc installation with the plugin that could access the .pal location.
find quote
datom Offline
Junior Member
Posts: 16
Joined: Jul 2010
Reputation: 0
Post: #8
gpulido Wrote:Two questions:
-How can I install the plugin? If I'm able to install it, I could try to test my scenario.

you only have to unzip the file and put the plugin.image.picasa-desktop folder in your xbmc addons. it should be work out of the box.

Quote:- is it correct that the plugin only would need the path to the .pal files?. If the answer is yes, the picasa files could be located in a network path with a symlink to the "installation" path. This way for the picasa installation is transparent where the files are located, and every computer on the network could have a xbmc installation with the plugin that could access the .pal location.

yes. its possible so tell the addon where the .pal files can be found. in detail: the addon needs the location of the \Google\Picasa2Albums folder. under vista / 7 its located at c:\users\_username_\appdata\local\. in xp its c:\documents and settings\... i think.
find quote
gpulido Offline
Junior Member
Posts: 33
Joined: Aug 2009
Reputation: 0
Post: #9
Hello datom!!
Thanks for the answer.
I tried to unzip the plugin in the plugins directory (I'm using dharma 10.1) and the plugin doesn't show in the picture addons.
I'll try again this afternoon at home.
About the location of the files, in linus+wine they are in a more complex path, but it can be located, so as soon I can install the plugin, I would try the two scenarios:
- Normal instalation of picasa with wine in the same machine as the xbmc program. Under Linux (ubuntu 10.10)
-Picasa installed with wine, the config files moved to a network location with symlinks. Two instances of xbmc accesing from two diferents nodes of the network.
find quote
gpulido Offline
Junior Member
Posts: 33
Joined: Aug 2009
Reputation: 0
Post: #10
Hello again,
To be able to test the addon in Linux, in the addon.xml the platform section should be remplaced to <platform>all</platform>

At this moment the addon doesn't works in linux basically for the \ and / diferences in the paths separator.

I'm cheking it, when I have the modifications I'll send them to you ok?.
(probably with a bunch of "if os.name == "posix":" added Smile
find quote
datom Offline
Junior Member
Posts: 16
Joined: Jul 2010
Reputation: 0
Post: #11
for the path separator i use the python os.. function (for future unix support) . so it should be work.
ok send me the changes and i add these to the addon. thanks for your help Smile

one more think,
if you run xbmc in wine, so xbmc should be identify the sys as "win" an the platform tag "win" should be work right? its a little bit weird
find quote
gpulido Offline
Junior Member
Posts: 33
Joined: Aug 2009
Reputation: 0
Post: #12
You are using the os separation function in the path concat but not in the substitution of the paths in the filename inside the .pal file
(the section
for filenode in dom.getElementsByTagName("filename"):
in the album_metadata(self, album_id): function)

I have two xbmc instances:
-one running over ubuntu in the same system that the picasa
- Second running in a htpc in the living room, is a live-stand alone instalation (linux based).
The picasa app, runs under wine in the ubuntu installation.
My photos are stored in a NAS. The NAS units are mounted in both systems under /media/Volume1 and /media/Volume2 (the same for both system.

I have to check it well because Picasa generates strange paths under wine.

I was thinking on using some kind of path conversion defined by the user as a properties to translate between local path to picasa and local paths to xbmc for the cases where the photos are stored in a network location like a NAS
(This post was last modified: 2011-05-04 15:58 by gpulido.)
find quote
gbia Offline
Junior Member
Posts: 9
Joined: May 2011
Reputation: 0
Post: #13
Hi, this addon sounds very interesting to me, but I don't manage to make it work. I have Dharma 10.1 running on Win7 SP1 and Picasa 3.8. If I run the addon I get the message "Script failed". I have then set the addon path to the "Picasa2album" folder (where I have the folder with the long name with the .pal files inside), and I still get the same error.
Any idea on what's the reason?
Thanks in advance!

The XBMC log reports this:

16:34:07 T:5036 M:1088606208 DEBUG: CGUIMediaWindow::GetDirectory (plugin://plugin.image.picasa-desktop/)
16:34:07 T:5036 M:1088606208 DEBUG: ParentPath = [addons://sources/image/]
16:34:07 T:5540 M:1088606208 DEBUG: XFILE::CPluginDirectory::StartScript - calling plugin Picasa Desktop('plugin://plugin.image.picasa-desktop/','0','')
16:34:07 T:5540 M:1088606208 INFO: initializing python engine.
16:34:07 T:5540 M:1088606208 DEBUG: Win32DllLoader::Load(special://xbmcbin/system/python/python24.dll)
16:34:07 T:5540 M:1087569920 DEBUG: msg: 'import site' failed; use -v for traceback
16:34:07 T:5540 M:1087553536 DEBUG: new python thread created. id=1
16:34:07 T:5540 M:1087549440 DEBUG: XFILE::CPluginDirectory::WaitOnScriptResult - waiting on the Picasa Desktop plugin...
16:34:07 T:604 M:1087537152 DEBUG: thread start, auto delete: 0
16:34:07 T:604 M:1087533056 DEBUG: Python thread: start processing
16:34:07 T:604 M:1087365120 DEBUG: msg: 'import site' failed; use -v for traceback
16:34:07 T:604 M:1087348736 NOTICE: -->Python Interpreter Initialized<--
16:34:07 T:604 M:1087348736 DEBUG: XBPyThread::Process - The source file to load is C:\Users\giorgio\AppData\Roaming\XBMC\addons\plugin.image.picasa-desktop\default.py
16:34:07 T:604 M:1087348736 DEBUG: XBPyThread::Process - Setting the Python path to C:\Users\giorgio\AppData\Roaming\XBMC\addons\plugin.image.picasa-desktop;C:\Users\giorgio\AppData\Roaming\XBMC\addons\script.module.dialogaddonsc​an\lib;C:\Users\giorgio\AppData\Roaming\XBMC\addons\script.module.simplejson\lib​;C:\Users\giorgio\AppData\Roaming\XBMC\addons\script.module.beautifulsoup\lib;C:​\Program Files\XBMC\addons\script.module.pil\lib;C:\Program Files\XBMC\addons\script.module.pysqlite\lib;special://xbmc/system/python/DLLs;special://xbmc/system/python/Lib;special://xbmcbin/system/python/python24.zip;special://xbmc/system/python\DLLs;special://xbmc/system/python\lib;special://xbmc/system/python\lib\plat-win;special://xbmc/system/python\lib\lib-tk;C:\Program Files\XBMC
16:34:07 T:604 M:1087348736 DEBUG: XBPyThread::Process - Entering source directory C:\Users\giorgio\AppData\Roaming\XBMC\addons\plugin.image.picasa-desktop
16:34:07 T:604 M:1086791680 DEBUG: LoadLibraryExA called with flags:
- LOAD_WITH_ALTERED_SEARCH_PATH
16:34:07 T:604 M:1086791680 DEBUG: Win32DllLoader::Load(special://xbmc/system/python/DLLs\_socket.pyd)
16:34:07 T:604 M:1086734336 DEBUG: LoadLibraryExA called with flags:
- LOAD_WITH_ALTERED_SEARCH_PATH
16:34:07 T:604 M:1086734336 DEBUG: Win32DllLoader::Load(special://xbmc/system/python/DLLs\_ssl.pyd)
16:34:07 T:604 M:1085526016 INFO: -->Python script returned the following error<--
16:34:07 T:604 M:1085526016 ERROR: Error Type: exceptions.TypeError
16:34:07 T:604 M:1085526016 ERROR: Error Contents: not all arguments converted during string formatting
16:34:07 T:604 M:1085501440 ERROR: Traceback (most recent call last):
File "C:\Users\giorgio\AppData\Roaming\XBMC\addons\plugin.image.picasa-desktop\default.py", line 129, in ?
picasaDesktop()
File "C:\Users\giorgio\AppData\Roaming\XBMC\addons\plugin.image.picasa-desktop\default.py", line 23, in __init__
self.db_path = self.getSetting('db_path_local') % (os.getenv('USERPROFILE'))
TypeError: not all arguments converted during string formatting
16:34:07 T:604 M:1085501440 INFO: -->End of Python script error report<--
16:34:07 T:604 M:1085399040 INFO: Python script stopped
16:34:07 T:604 M:1085399040 DEBUG: Thread 604 terminating
16:34:07 T:5540 M:1085427712 DEBUG: XFILE::CPluginDirectory::WaitOnScriptResult - plugin exited prematurely - terminating
16:34:07 T:5036 M:1085427712 ERROR: XFILE::CDirectory::GetDirectory - Error getting plugin://plugin.image.picasa-desktop/
16:34:07 T:5036 M:1085427712 ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.image.picasa-desktop/) failed
find quote
datom Offline
Junior Member
Posts: 16
Joined: Jul 2010
Reputation: 0
Post: #14
hi gbia,
im back from my holidays and i try the next days to find your problem
find quote
gbia Offline
Junior Member
Posts: 9
Joined: May 2011
Reputation: 0
Post: #15
Thanks a lot!
Giorgio
find quote
Post Reply