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


- solexalex - 2010-12-28 02:27

The-Boxhead Wrote:First of all, when you add folders in your addon the browse system
is not the same as xbmc itself. You should add access to local filesystem
so that people can add a mounted source without having to create a source
trough xbmc first. this goes for linux only i guess.
I made it this way because to me, it looks 'normal' to get a path from the source that are already setted in the picture part of XBMC itself.
Furthermore, doing like I did, I'm sure that the source for my addon, are available for XBMC.

I may change this, but you have to convince me Wink
If many of you wants to add path to scan for pictures in my addon, the same way we add source in the picture section of XBMC, just tell me and I'll do it. (or maybe another option in the settings)


- The-Boxhead - 2010-12-28 02:30

ok i think just getting the already added sources is the best way and
not the advanced browser since this may confuse non geek users, i agree
with you Smile


- fiveisalive - 2010-12-28 03:56

solexalex Wrote:I made it this way because to me, it looks 'normal' to get a path from the source that are already setted in the picture part of XBMC itself.
Furthermore, doing like I did, I'm sure that the source for my addon, are available for XBMC.

I may change this, but you have to convince me Wink
If many of you wants to add path to scan for pictures in my addon, the same way we add source in the picture section of XBMC, just tell me and I'll do it. (or maybe another option in the settings)

I would like to be able to add arbitrary directories to scan without having to add them in the default Pictures source, so the full dialog would be useful to me. In fact I consider this addon a full drop-in replacement for the default Pictures source, which I consider to be completely unusable in comparison (in fact I completely remove the default Pictures app and add MyPicsDB as Pictures using the customization features in the Aeon MQ2 skin).

To make this drop-in complete, you could either 1) emulate how "sources" are added to the default Pictures app (complete with a dialog that allows you to specify how each folder is updated/scanned, as per the current options), or 2) allow access to the full filesystem.


- fiveisalive - 2010-12-28 04:03

Delboy Wrote:Great add-on, picture library is definitely needed although XBMC developers obviously don't think so. Thank you very much for creating it.

However, I have one small problem using it: I keep AVI clips taken with the camera together with the pictures in the folder named by the date taken. I have set to scan AVI files too in the add-on settings and they seem to be scanned. Are they imported to the database? I would really like to have them displayed together with the pictures using view by date option, can you somehow make it possible? Maybe you can take the date of file creation for files that don't have EXIF information when importing them to the database and display them too.

I suppose there are others too who keep their pictures and clips from the camera in the same way, because it is the default for Canon cameras.

Yep, works the same way with my Panasonic Lumix camera, it actually stores them as .MOV files right in the same DCIM subfolder, using the same filename stucture as well. As for metadata, it's a problem, but using mtime is probably the best compromise (I'm also on Linux). I don't think there's any metadata embedded in the .MOV file, but I don't know how to find out for sure.


- Delboy - 2010-12-28 13:29

solexalex Wrote:et voilĂ , I added the st_mtime as a date for videos. This will be available on next release.
st_mtime is said to be :
which may not be the correct date time, but the best I can get right now. I'm opened to every suggestion.

Great Nod

So videos will be included at browse by date output in the next release? Can't wait to see that. Big Grin

I have a suggestion for date choosing, hope it is not too complicated to implement. You can make an add-on setting (like you did for file extensions) to take it from mtime, atime, ctime or even file name or folder name where the file resides. For the last 2 options user has to be able to define the correct date format and you can ignore time (set it to 00:00) or take it from mtime.

I think this will be a big improvement for the database.

Keep up the good work, cheers.Smile


Remote paths - human705 - 2010-12-28 20:57

Alex,

I'm having a problem seen my remote path since the new release. Here is what I see in the log:

13:46:57 T:3916 M:2121875456 NOTICE: Traceback (most recent call last):
13:46:57 T:3916 M:2121875456 NOTICE: File "C:\Users\me\AppData\Roaming\XBMC\addons\plugin.image.mypicsdb\scanpath.py", line 194, in browse_folder
13:46:57 T:3916 M:2121875456 NOTICE: listdir = oslistdir(dirname)
13:46:57 T:3916 M:2121871360 NOTICE: WindowsError: [Errno 67] The network name cannot be found: '\\\\690WIN7\\xbmcuser:xbmcuser@690WIN7\\Pictures-JPEG\\2005\\2005_01_18\\*.*'
13:46:57 T:3916 M:2121871360 NOTICE: MyPicsDB >> Error while trying to get directory content
13:46:57 T:3916 M:2121871360 NOTICE: MyPicsDB >> \\690WIN7\xbmcuser:xbmcuser@690WIN7\Pictures-JPEG\2005\2005_01_18\
13:46:57 T:3916 M:2122706944 NOTICE: MyPicsDB >> This folder does not contain any picture :
13:46:57 T:3916 M:2122706944 NOTICE: MyPicsDB >> \\690WIN7\xbmcuser:xbmcuser@690WIN7\Pictures-JPEG\2005\2005_01_18\
13:46:57 T:3916 M:2122706944 NOTICE: MyPicsDB >>
13:46:57 T:3916 M:2122706944 NOTICE: MyPicsDB >> scan the subfolders of :
13:46:57 T:3916 M:2122706944 NOTICE: MyPicsDB >> \\690WIN7\xbmcuser:xbmcuser@690WIN7\Pictures-JPEG\2005\2005_01_18\
13:46:57 T:3916 M:2122682368 INFO: Scriptresult: Success
13:46:57 T:3916 M:2122657792 INFO: Python script stopped
13:46:57 T:3916 M:2122657792 DEBUG: Thread 3916 terminating
13:46:57 T:3140 M:2122739712 DEBUG: python thread 2 destructed
13:46:57 T:3140 M:2122735616 INFO: Loading skin file: DialogKaiToast.xml
13:46:57 T:3140 M:2121650176 DEBUG: ------ Window Init (DialogKaiToast.xml) ------
13:47:00 T:4100 M:2121068544 DEBUG: thread start, auto delete: 1
13:47:01 T:3140 M:2112835584 DEBUG: CGUIMediaWindow::GetDirectory (plugin://plugin.image.mypicsdb/?method='recentpics'&period=''&value=''&viewmode='view'&action='showpics'&name='Pictures+recently+added')
13:47:01 T:3140 M:2112835584 DEBUG: ParentPath = [plugin://plugin.image.mypicsdb/?action='showhome'&viewmode='view']
13:47:01 T:5020 M:2112835584 DEBUG: XFILE::CPluginDirectory::StartScript - calling plugin My Pictures Database('plugin://plugin.image.mypicsdb/','0','?method='recentpics'&period=''&value=''&viewmode='view'&action='showpics'&name='Pictures+recently+added'')
13:47:01 T:5020 M:2112835584 INFO: initializing python engine.
13:47:01 T:5020 M:2112835584 DEBUG: new python thread created. id=4
13:47:01 T:5020 M:2112819200 DEBUG: XFILE::CPluginDirectory::WaitOnScriptResult - waiting on the My Pictures Database plugin...
13:47:01 T:720 M:2112811008 DEBUG: thread start, auto delete: 0
13:47:01 T:720 M:2112798720 DEBUG: Python thread: start processing
13:47:01 T:720 M:2112651264 DEBUG: msg: 'import site' failed; use -v for traceback
13:47:01 T:720 M:2112651264 NOTICE: -->Python Interpreter Initialized<--
13:47:01 T:720 M:2112651264 DEBUG: XBPyThread::Process - The source file to load is C:\Users\me\AppData\Roaming\XBMC\addons\plugin.image.mypicsdb\default.py
13:47:01 T:720 M:2112651264 DEBUG: XBPyThread::Process - Setting the Python path to C:\Users\me\AppData\Roaming\XBMC\addons\plugin.image.mypicsdb;C:\Users\me\AppDat​a\Roaming\XBMC\addons\script.module.dialogaddonscan\lib;C:\Users\me\AppData\Roam​ing\XBMC\addons\script.module.simplejson\lib;C:\Users\me\AppData\Roaming\XBMC\ad​dons\script.module.beautifulsoup\lib;C:\Program Files (x86)\XBMC\addons\script.module.pil\lib;C:\Program Files (x86)\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 (x86)\XBMC
13:47:01 T:720 M:2112651264 DEBUG: XBPyThread::Process - Entering source directory C:\Users\me\AppData\Roaming\XBMC\addons\plugin.image.mypicsdb
13:47:01 T:720 M:2112647168 WARNING: msvcrt.dll: dll_fstati64 called, TODO: add 'int64 <-> long' type checking
13:47:02 T:720 M:2111787008 NOTICE: using pysqlite2
13:47:02 T:720 M:2111774720 NOTICE: MyPicturesDB plugin called :
13:47:02 T:720 M:2111774720 NOTICE: plugin://plugin.image.mypicsdb/?method='recentpics'&period=''&value=''&viewmode='view'&action='showpics'&name='Pictures+recently+added'
13:47:02 T:720 M:2111774720 NOTICE: --------------------


I know I can access the path because I can browse the source and see the pictures.

I'm using Windows 7 64-bit as the client and the share is located on another windows 7 64bit machine (the same ones i was using before). Let me know if you need any more info.


- fiveisalive - 2010-12-29 01:53

seems to add the movies (using SVN version from google code)! sometimes the date is off, but not by much, and that's because of the file date, so much can be done there (other than maually fixing them). however the date doesn't show up in the right column as it does for pics. also, is it easy to make thumbnails of the videos? when you view rthe directory in the regular video source, it does show a thumbnail, so maybe you can call some xbmc python function to get that?


network shares within MPD on OS/X - mhdebokx - 2010-12-30 23:06

I found something about the shares on OSX

Within XBMC I added a location name like ‘networkstorage’ with the following direction:

smb://userid: password@192.168.2.2/photo/2010/

When I add a path using the MPD add-on, I can select ‘networkstorage’ and I see all the maps/folders at that location. So I know for sure it is working at that moment.

When the scanning is started within MPD, the information stored in the MyPictures.db table ‘Rootpaths’ is being used. In the field ‘path’ a different value is stored:

\\userid: password@192.168.2.2\photo\2010\

I think this is the problem. OSX/Linux do have an different path-notation then Windows machines.

When I modify this value and do a rescan, then it will work!


feature request - mhdebokx - 2010-12-30 23:29

I organised my network photo storage using different folders. In favor of XBMC I added a lot of 'folder.jpg' in the folders, for seeing my own thumbnails.

Whithin the configuration pannel I'd like to see an option that 'thumbnails' can be skipped scanning (and are excluded from the database).
Eg: 'folder.jpg' and '*.tbn' are being skipped.


Remote Paths - human705 - 2011-01-04 17:20

It looks like there is an issue with authentication. I opened the path on the server (windows 9) and now it works.