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

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Discussions (https://forum.kodi.tv/forumdisplay.php?fid=222)
+--- Forum: Feature Requests (https://forum.kodi.tv/forumdisplay.php?fid=9)
+--- Thread: Pictures database and library mode; scan EXIF and IPTC metadata tags into a SQL db (/showthread.php?tid=22407)

Pages: 1 2 3 4 5 6 7 8 9 10


WOW :grin: - mhdebokx - 2010-08-12

On my Vista machine I first installed the stable Camelot release 9.11 and installed the MyPicture scripting.

The scanning superb, realy fast as you menioned before.
The option/searching by Keyword is spectacular. Now I can finally show a separate slideshow using these keywords. This is an execellent extention for the Picture department of XBMC

Please continue the good work. Next week I will install the plugin on my macmini/OSX release.

Michel


- bee07 - 2010-08-15

Hey, Solexalex
Did I miss something or mess my install up? When I'm setting up the plugin, I only get options to scan the C or Q drives, but not the other usual sources. In particular, I can't get SMB drives. This would be helpful, since all my pictures are on a NAS drive. The only way I have been able to do it is by mapping the NAS folder to a local drive letter. I'm using Windows 7 and XBMC 9.11.
Cheers
Alex


- Robotica - 2010-08-15

I am a XBMC User missing a picture playback feature. Now I found this thread and hopefully this plugin will do a good job. Are there any other pic-related plugins/views etc. to use with XBMC?

Besides databasing, sorting & filtering based on EXIF/TCIP info, star-rating, I would love to use a view which also shows this info. Prefarably, I would use settings to enable which info will show.


- solexalex - 2010-08-16

bee07 Wrote:I only get options to scan the C or Q drives, but not the other usual sources. In particular, I can't get SMB drives. This would be helpful, since all my pictures are on a NAS drive. The only way I have been able to do it is by mapping the NAS folder to a local drive letter.
my pics are on a nas too and no, smb shares are not usable (with my actual knowledge) "as is"... I have no better solution than yours wich works pretty well.
I made a function to mount from plugin a drive to a smb share but the use from xbmc is not very easy. Maybe I need to make more options from config file but it could be triky to do and to use

@Robotica
Picture playback is a thing that i thought about as i am making a picture frame from an old laptop using xbmc.
I can t promess you anything right now but you can explain what you want exactly. It could then be use for future references.


- Robotica - 2010-08-16

I have problems scanning my pics into the database (XBOX):

03:23:34 M: 28311552 WARNING: -->Python Initialized<--
03:23:35 M: 25894912 NOTICE: using pysqlite2
03:23:36 M: 23371776 NOTICE: Q:\plugins\pictures\MyPictures (beta1)\MyPictures.db
03:23:36 M: 23330816 NOTICE: Scan folder :
03:23:36 M: 23347200 NOTICE: ["F:\\Foto's\\xx\\xxxxx\\"]
03:23:36 M: 23330816 NOTICE: F:\Foto's\xx\xxx\
03:23:37 M: 23306240 ERROR: Error Type: exceptions.ValueError
03:23:37 M: 23285760 ERROR: Error Contents: time data did not match format: data=2010.03.24 13.48.00 fmt=%Y:%m:%d %H:%M:%S
03:23:37 M: 23285760 ERROR: Traceback (most recent call last):
File "Q:\plugins\pictures\MyPictures (beta1)\default.py", line 427, in ?
ok = scan_my_pics()#scan lorsque le plugin n'a pas de paramètres
File "Q:\plugins\pictures\MyPictures (beta1)\default.py", line 404, in scan_my_pics
MPDB.browse_folder(chemin,parentfolderID=None,recursive=xbmcplugin.getSetting('recursive')=="true",update=False,updatefunc = pupdate)
File "Q:\plugins\pictures\MyPictures (beta1)\resources\lib\MypicsDB.py", line 426, in browse_folder
exif = get_exif(os.path.join(dirname,picfile).encode('utf8'))
File "Q:\plugins\pictures\MyPictures (beta1)\resources\lib\MypicsDB.py", line 528, in get_exif
tagvalue = time.strftime("%Y-%m-%d %H:%M:%S",time.strptime(tags[tag].__str__(),"%Y:%m:%d %H:%M:%S"))
File "Q:\system\python\python24.zlib\_strptime.py", line 292, in strptime
ValueError: time data did not match format: data=2010.03.24 13.48.00 fmt=%Y:%m:%d %H:%M:%S


- solexalex - 2010-08-16

Looks like you camera did not respect the date/time format which should be :
yyyy:mm:dd hh:mmConfuseds

Your datetimes are stored using single dot
yyyy.mm.dd hh.mm.ss

Maybe are you using a software to modify date and times... Let me know

I'll be back from holidays this sunday and will repair this for a next release.


- Robotica - 2010-08-16

I used a negative-scanner and TWAIN drivers (in WIN7) for that fotoset. The used camera was a model from the eighties... And some folders I batch converted using Irfanview..
Never touched any time/date formating options in both and in win7 those are : as a seperator for my country / region.


- solexalex - 2010-08-16

Can you send me a sample of pics that raise the problem please ?
If your pictures have been scanned then the scanner is the problem (or the driver) and if irfanview has been used, depending of what you ask him to do but it may change some dates... Not sure but sample pics may help


- Robotica - 2010-08-17

pm'ed you.
As I can see, the problem already exists in the TIFF. So the TWAIN-driver used can be the problem. Unfortunately, I can not give any info about the TWAIN driver used.

I also scanned some other file which had no problems and thus ended up in the database. Viewing them however, gave those errors:
Code:
: 29818880  NOTICE: SQL > SELECT DISTINCT strPath FROM files
00:35:39 M: 29589504  NOTICE: -->Python Initialized<--
00:35:40 M: 27291648  NOTICE: using pysqlite2
00:35:40 M: 27271168  NOTICE: SQL > SELECT DISTINCT strftime("%Y","EXIF DateTimeOriginal") FROM files where "EXIF DateTimeOriginal" NOT NULL ORDER BY "EXIF DateTimeOriginal" ASC
00:35:44 M: 32153600  NOTICE: -->Python Initialized<--
00:35:44 M: 29929472  NOTICE: using pysqlite2
00:35:44 M: 29929472  NOTICE: SQL > SELECT distinct strftime("%Y-%m","EXIF DateTimeOriginal") FROM files where strftime("%Y","EXIF DateTimeOriginal") = '2005' ORDER BY "EXIF DateTimeOriginal" ASC
00:35:48 M: 32141312  NOTICE: -->Python Initialized<--
00:35:48 M: 29908992  NOTICE: using pysqlite2
00:35:48 M: 29908992  NOTICE: SQL > SELECT distinct strftime("%Y-%m-%d","EXIF DateTimeOriginal") FROM files where strftime("%Y-%m","EXIF DateTimeOriginal") = '2005-01' ORDER BY "EXIF DateTimeOriginal" ASC
00:35:52 M: 31858688  NOTICE: -->Python Initialized<--
00:35:52 M: 29618176  NOTICE: using pysqlite2
00:35:53 M: 29609984  NOTICE: SQL > SELECT strPath,strFilename FROM files WHERE datetime("EXIF DateTimeOriginal") BETWEEN datetime('2005-01-01 00:00:00') AND datetime('2005-02-01 00:00:00') ORDER BY "EXIF DateTimeOriginal" ASC
00:36:05 M: 30121984   ERROR: convert_checked failed
Previous line repeats 1 times.
00:36:05 M: 30121984   ERROR: PICTURE: Error loading image F:\Foto's\100ÊSIO\CIMG0276.JPG
00:36:10 M: 30425088   ERROR: convert_checked failed
The foldername = 100%CASIO

The viewing experience is the same as in XBMC right now. Hopefully, some nice views will be skinned to show all this information from the database and gives options to edit (rate!) and distribute those pictures. I think to rate XMP is needed also.


- solexalex - 2010-08-17

I definetely need something more than just my mobile phone to tell you more about your problems.
Strange char in the folder may be the cause and i need to fix that.
I already know that my way to call sqlite is unsecure but it is not very important as database is local and personnal
About XMP:
I know that it is a must have in such a script. I looked at it but don t remember why i left it... Maybe no python library to handle them or just want to finish something before going further... I think xmp is not well defined yet. It comes from photoshop if i m not wrong and no open standards are yet done (please correct me if i m wrong)
Anyway i dont think that my script will ever permit to edit any of the exif iptc or xmp datas as if something goes wrong your picture datas may be lost


- Robotica - 2010-08-17

No problems; Enjoy you holiday! I just reported what I know and what I think is useful.

XMP is indeed a standard created by Adobe but Win7/Vista also use it on pics to show info.

Concerning editing, hopefully rating will be an exception.


- solexalex - 2010-08-17

Adding a rating in the database is not a problem and the worse thing may be to add the opportunity to user from the plugin as the plugin's interface is not very convenient for such a thing

One thing to know it s if a "homemade rating" is not a double use with the XMP rating


- Robotica - 2010-08-18

I think rating with XMP is important for WIN-compatibality. Either you rate within windows and view the pics in XBMC or even better: You directly connect your cam to XBMC pc near your tv (livingroom) and upload from their to your picturedatabase.

This would be my use-case of choice for picture playback in XBMC in my livingroom.


- Basemaster - 2010-09-01

hi, I'm new to XBMC and started playing with the Dharma release. I looked around in XBMC a long time to conclude that a pictures library function (based on Exif) is not available, strange enough. This is what you guys already know a long time of course. I still can't really believe it, but OK very nice to read that a separate plugin is now available. As also asked by some of the others, will this plugin be ported to the new Dharma Addon framework anytime soon?


- solexalex - 2010-09-01

Basemaster Wrote:As also asked by some of the others, will this plugin be ported to the new Dharma Addon framework anytime soon?
hi
Thank you for your feedback.
Dharma released the beta a couple of days ago. Now no new features should appear and then it can be interesting to port this plugin for dharma.
I may do a special version for dharma and then continue to add features on this one.
I'm going to install the dharma version and upgrade my plugin soon.