XBMC Community Forum
Pictures database and library mode; scan EXIF and IPTC metadata tags into a SQL db - Printable Version

+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Development (/forumdisplay.php?fid=32)
+--- Forum: Python Add-on Development (/forumdisplay.php?fid=26)
+--- Thread: Pictures database and library mode; scan EXIF and IPTC metadata tags into a SQL db (/showthread.php?tid=80845)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40


Pictures database and library mode; scan EXIF and IPTC metadata tags into a SQL db - solexalex - 2010-09-10 21:53

2006, October 4th, whodini expose something very interesting as a new feature for XBMC. He asks for a picture management like videos and musics have, storing informations inside a database and accessing at will.

Many of us, and surely a lot of people that never write on forums, are asking themselves "Why the picture section is not used through a database ?" but no answer from team.

Again now I still think it's a must have, but as it is not included inside xbmc itself, I made a plugin for that. It is called "MyPicture Database"

Before continuing, you may want/need to have a look to the original conversation :
http://forum.xbmc.org/showthread.php?tid=22407

As the plugin is now released on the official new XBMC dharma addon repository, I opened a topic in the python developpement section for debugging or just for feature requests.

Features
- Recursive jpg picture scanning (gif, png, bmp, tif ... may be added soon)
- EXIF / IPTC pictures metadata databasing
- By date filtering
- By folders filtering
- By keywords filtering
- local or distant files scanning (need to mount a virtual drive to use network folders)
- A python library behind the system so that developpers can write their own plugins/scripts


- solexalex - 2010-09-11 00:48

If everything goes well, you can expect a new version soon (maybe Sunday night in France)
-more file extension discovered and added in the database (but IPTC/EXIF will be only for jpg's)
-Number of pics for each filter
ex.: date : 2009-12 (142 pics)
ex.: keyword : Tour Eiffel (231 pics)


- tslayer - 2010-09-11 18:47

I tried the plugin on linux but get this:


19:09:58 T:140552301729552 M:1088495616 INFO: -->Python script returned the following error<--
19:09:58 T:140552301729552 M:1088495616 ERROR: Error Type: exceptions.ImportError
19:09:58 T:140552301729552 M:1088495616 ERROR: Error Contents: No module named sqlite3
19:09:58 T:140552301729552 M:1088495616 ERROR: Traceback (most recent call last):
File "/home/eric/.xbmc/addons/plugin.image.mypicsdb/default.py", line 31, in ?
import MypicsDB as MPDB
File "/home/eric/.xbmc/addons/plugin.image.mypicsdb/resources/lib/MypicsDB.py", line 51, in ?
from sqlite3 import dbapi2 as sqlite
ImportError: No module named sqlite3
19:09:58 T:140552301729552 M:1088495616 INFO: -->End of Python script error report<--


Thanks.


- solexalex - 2010-09-12 13:08

It can t load sqlite library wich should be taken from native xbmc dharma.
Dont really know why it does not load in you case.
I will have a look later when i will be back home, but you may try to know if it is the real xbmc dharma beta 1 or another home made compilation in which sqlite would not be compiled...


- tslayer - 2010-09-12 15:48

It's just from Dharma branch itself. Maybe something isn't being built compared to ppa or perhaps ppa includes something not in the Dharma branch itself?

Good question.


- tslayer - 2010-09-12 16:37

Looks like this thread: http://forum.xbmc.org/showthread.php?tid=77708


- tslayer - 2010-09-12 16:45

I guess I should have read the README.linux Smile


.3 $ make -C lib/addons/script.module.pil

.4 $ make -C lib/addons/script.module.pysqlite


- solexalex - 2010-09-12 19:29

Are you telling me it is working now ? Does any xbmc for linux need something special ?


- tslayer - 2010-09-12 20:07

It works now.. nothing else needed except proper reading of readme.linux Smile

Though, a lot of my pictures didn't scan in... I'll have to check log later. Lots of the folders (within the plugin) show no pics.


- tslayer - 2010-09-12 20:08

Okay, just looked quickly at the logs:

Filled with:


10:50:51 T:140232956843792 M:1131466752 NOTICE: MyPicsDB >> /home/eric/mounts/Volume_1/Pictures/0 RamirezGross06/2010-06-01
10:50:51 T:140232956843792 M:1131466752 NOTICE: MyPicsDB >> Ce dossier ne contient pas d'images :
10:50:51 T:140232956843792 M:1131466752 NOTICE: MyPicsDB >> /home/eric/mounts/Volume_1/Pictures/0 RamirezGross06/2010-06-01


But I clearly have files in there:


eric@htpc:~/mounts/Volume_1/Pictures/0 RamirezGross06/2010-06-01$ ls
IMG_6140.JPG IMG_6141.JPG IMG_6142.JPG IMG_6143.JPG IMG_6144.JPG IMG_6145.JPG IMG_6146.JPG