• 1
  • 2(current)
  • 3
  • 4
  • 5
  • 27
Pictures database and library mode; scan EXIF and IPTC metadata tags into a SQL db
#16
Hi robotica

You are doing good to write here your last requests.

* Unicode errors in the path are fixed just right now Smile It will be included in the next release.

* Datetime errors should be OK now.
It tries the standard datetime format (only dots separating the values) and if it does not work, try some others.
Sometimes it can't retrieve date time because as what I've seen in some pics, datime is 0000:00:00 00:00:00 and of course it is not a valid date time.

* XMP / picture rating
I haven't found any pure python library to retrieve XMP metadatas. I would love add this kind of metadatas as it is the most recent kind of information and it works with many different kind of file types.
If someone better than I am, knows about such a library, or if somebody knows how to use a XMP C library from python, feel free to contact me ! thank you
Picture rating may be done from scratch and only in and for mypictureDB.
Anyway, I say it again, it was not in my first thought to enable picture edition from this plugin as it requires a lot of attention to be safe and not corrupt your pics.
#17
Thnx for fixing that!

This EXIF-tool (http://www.sno.phy.queensu.ca/~phil/exiftool/) would be great but it's written in PERL. Maybe when jfcaroll is ready http://forum.xbmc.org/showthread.php?tid=80984 ....

Also found this: http://www.zoia.org/blog/2006/08/13/extr...ng-python/
#18
I don't understand everything he says.... lol Hope it will be usefull later !
#19
As mentioned per e-mail 2 kind of unicode problems occure. I hope there is a solution to translate in ascii strings to unicode

If photo's are geotagged using GeoSetter/ExifTools with option save IPTC in unicode, the next error occures:

08:34:53 T:880 M:248811520 NOTICE: MyPicsDB >> >>> DB_file_insert ...
08:34:53 T:880 M:248811520 NOTICE: MyPicsDB >> exceptions.Exception - You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicode strings.
08:34:53 T:880 M:248811520 NOTICE: MyPicsDB >> INSERT INTO files('GPS GPSLatitude','category','supplemental category','strFilename','country/primary location name','Image Model','Image Orientation','EXIF DateTimeOriginal','GPS GPSLongitude','UseIt','country/primary location code','EXIF DateTimeDigitized','contact','city','keywords','EXIF ExifImageWidth','idFolder','province/state','EXIF SceneCaptureType','strPath') values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)


some camera's also write unicode EXIF information, like the Canon 5D Mark II. The next error occures

08:34:53 T:880 M:248557568 ERROR: Error Type: exceptions.UnicodeEncodeError
08:34:53 T:880 M:248557568 ERROR: Error Contents: 'ascii' codec can't encode characters in position 61-62: ordinal not in range(128)
08:34:53 T:880 M:248516608 ERROR: Traceback (most recent call last):
File "C:\Documents and Settings\Michel\Application Data\XBMC\addons\plugin.image.mypicsdb\default.py", line 429, in ?
ok = scan_my_pics()#scan lorsque le plugin n'a pas de paramètres
File "C:\Documents and Settings\Michel\Application Data\XBMC\addons\plugin.image.mypicsdb\default.py", line 406, in scan_my_pics
MPDB.browse_folder(chemin,parentfolderID=None,recursive=xbmcplugin.getSetting(int(sys.argv[1]),'recursive')=="true",update=False,updatefunc = pupdate)
File "C:\Documents and Settings\Michel\Application Data\XBMC\addons\plugin.image.mypicsdb\resources\lib\MypicsDB.py", line 466, in browse_folder
iptc = get_iptc(dirname,picfile)
File "C:\Documents and Settings\Michel\Application Data\XBMC\addons\plugin.image.mypicsdb\resources\lib\MypicsDB.py", line 644, in get_iptc
log( "WARNING : '%s' is not a valid IPTC info (value : %s)"%(k,info.data[k][:80]) )
File "C:\Documents and Settings\Michel\Application Data\XBMC\addons\plugin.image.mypicsdb\resources\lib\MypicsDB.py", line 82, in log
print str("MyPicsDB >> %s"%msg)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 61-62: ordinal not in range(128)
08:34:53 T:3732 M:248442880 ERROR: XFILE::CDirectory::GetDirectory - Error getting plugin://plugin.image.mypicsdb/
08:34:53 T:3732 M:248442880 ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.image.mypicsdb/) failed
#20
Hum...
Your last error looks like an iptc info found in the picture is not valid. I need to test it this evening.
I think you sent me this pic and it is a good thing.
I'll add it to my library and watch for what is going wrong.
#21
Hi all

V 0.1.3 is available :
Code:
2010/09/15 --> v 0.1.3
  In the Sort by folder view, the count of the pictures was counting only the pics within the concerned folder, not all the pics from its subfolders
  
2010/09/14
  Fixed an issue that appear when scanning non unicode IPTC metadatas
  The strings are now localized ready. Please submit string.xml in your language
    need a german update (maybe correct english lannguage too)
  
2010/09/13
  Added German language for settings
  fixed : unicode errors in the file path, filename
  Setting to force reinit of the database on each plugin start is by default set to False.
    Picture folder will be scanned only at the start of the plugin. Next start, only new pics will be added and pictures physically removed will be removed from the databasse too.
    
2010/09/10
  Count how many pics for each filter
  
2010/09/09
  New way to select pictures to add in the database.
    Many file extension can be added (as for now are : ".JPG",".TIF",".PNG",".GIF",".BMP")
    but only jpg will be scanned for EXIF and IPTC metadatas

It should be available from dharma update addons.
Hope you like it !

I need your help, this plugin is for you all. So feel free to post your language strings.xml file, report me any bug, anything you like or even you dislike, continue telling me what do you wish for this plugin.

Next release (if not too much bugs reported) I will try to add something I think it is a good thing. You should be able to save pics (individually or not) as selections. So you'll be able to make albums, easy then to display some holiday pictures wherever pictures are saved.
#22
Great!

Is it possible to store links to the pics in the database so I don't need to scan my folder everytime (maybe as an option)?

And about creating albums... Can you use smart playlists for this so you can combine those pics with other media..

btw: Is there a seperate download for the XBOX-users?
#23
Robotica Wrote:Is it possible to store links to the pics in the database so I don't need to scan my folder everytime (maybe as an option)?
You have this option, it is the last one, and now, it should default to False :
Initialize the database before scanning
Unmark it and then it should only scan for new pics, and remove pics that are not physically present on your drive

Robotica Wrote:And about creating albums... Can you use smart playlists for this so you can combine those pics with other media..
Why not. Do you know a format for this ? Does XBMC play pictures smartplaylists ?
If it is doable, then I may do that after 'picture selection' stuff
Robotica Wrote:btw: Is there a seperate download for the XBOX-users?
No unfortunately no... It would take me too much time to maintain the plugin for both XBMC version (pre-dharma and post dharma)
If someone fill like doing a xbox version, feel free to tell me, would love to talk about it !
#24
beta1 worked fine on XBOX...
#25
yes, the very first release was pre-dharma. But from this time I made many change, including necessary changes for dharma addon system.

(Oh, I hope I did'nt missed a news telling dharma was ported to xbox as well !!!)
#26
known bug :
if you choose a month from the 'by dates' filter, and you have any picture in this month, shooted the last day of the month, it bugs. It is because to select a whole day of pictures, I take all the pictures dated between the given day of the month, and the given day +1. So if the month contain only 30 days (for example April) it selects pics from yyyy/04/30 to yyyy/04/31, which python time module says to be wrong (of course)
The correct thing should be 04/30 to 05/01 for a whole day...
I have to fix that.

Tonight I made something to sort pictures from any date to any other, so that you can easily sort all pics for a whole WE or all pics of you whole holidays. You'll have to wait for next release Wink or check my svn : https://xbmc-scripts.googlecode.com/svn/...e.mypicsdb
#27
dutch translation is send to your email adress
in the next release this will be available
#28
Just a suggestion, maybe is stupid at this point, but...

Both the picasa application and picasa web allow face recognition and (partially automatic) naming of the people in each picture, and it works pretty well, I have like a thousand photos face and name tagged. It would be great to have that information imported somehow into the database
#29
@pko66: Facebook does that also...
#30
the plugin already read tag, so if picasa tag the picture, it will be available in the plugin.
  • 1
  • 2(current)
  • 3
  • 4
  • 5
  • 27

Logout Mark Read Team Forum Stats Members Help
Pictures database and library mode; scan EXIF and IPTC metadata tags into a SQL db2