![]() |
|
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: Feature Suggestions (/forumdisplay.php?fid=9) +--- Thread: Pictures database and library mode; scan EXIF and IPTC metadata tags into a SQL db (/showthread.php?tid=22407) |
- ppic - 2010-09-08 10:05 it's already cross platform. - solexalex - 2010-09-08 17:10 Erf!! I know the problem... My soooo uggly and not usefull at all log system need a file named MPDB.log in the addon data folder within xbmc. I need to fix it fast but right know you can try to create it by hand. I'll be back at home soon. You may except a new version in a couple of hour. Smb share: It may already be used. You have to mount it as a virtual drive (i m pretty sure it is doable from windows or linux) and then you access to your share from plugin settings. It looks pretty slow to use but it works. - solexalex - 2010-09-08 18:23 erf erf ! Filename should be MPDB.txt, not .log !!!!!! It is in your XBMC data directory, under userdata/addon_data/plugin.image.mypicsdb/ - marirs - 2010-09-08 19:10 I think the directory defined is "plugin.image.MyPictures". Also this directory doesn't initially exist, so you may need a os.makedirs(DATA_PATH), only if the directory doesn't exist. - ppic - 2010-09-08 19:12 yes, the addon id has been modified, missed the data path change
- marirs - 2010-09-08 20:10 ran into a couple problems: 1) If the date field in the picture is something invalid (like 0000:00:00 00:00:00) it crashes. Added try/except around line 547 in MypicsDB and it works now. 2) Maybe related to first problem, but I didn't get any listings under "sort by date" because of null fields. Removing check "if not None in listperiod:" in default.py, 199 seems to work, but may have broken something else. 3) Sort by folders seems to be broken if you have a root path with no pictures and only subfolders - solexalex - 2010-09-08 22:29 1) I added this date format in an except statement, so that if the standard format is not recognized, this other one is used (hopefully no other format exists. If so, I would code something more efficient) 2) maybe, Robotica sends me pics with such a date format. Didn't took time to test yet. Will do very soon and I will tell you if it works or not 3)I do have a root path with only subfolders and it works. If the problem persists, maybe would you send me your database to check - Jair - 2010-09-09 04:27 Could you please upload a fixed version to the repository? - fiveisalive - 2010-09-09 06:30 I got this to work after quite a bit of fiddling (I am using the version just released to the addons repository with Dharma). It seems that the picture detection algorithm is pretty fragile. It simply looks for files with extension ".jpg". This means that it misses pictures with ".JPG" (which matters on Linux/Unix platforms that are case-sensitive). I hacked the code from Code: listfolderfiles = fnmatch.filter(listdir,"*.jpg")to Code: listfolderfiles = fnmatch.filter(listdir,"*.JPG")Also it won't detect many other picture types that xbmc-proper handles such as .gif, .png etc. Perhaps there are some better python functions that can detect whether a file is an image file based on /etc/magic and file type rather than fragile file extensions, that will detect images that don't have any extension? Another question: how do you set/remove keywords? - fiveisalive - 2010-09-09 06:47 Another issue is that if I leave the plugin and go back to the Home screen, then re-enter the plugin, it seems to rescan my entire directory again, taking as much time as the first time I created the db. I thought the sqlite database would cache this info. This is my settings file: Code: <settings> |