Kodi Community Forum
Release MyPicsDB: Pictures DB with EXIF, IPTC & XMP tags - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Picture Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=150)
+---- Thread: Release MyPicsDB: Pictures DB with EXIF, IPTC & XMP tags (/showthread.php?tid=133905)



RE: [RELEASE] MyPicsDB: Pictures DB with EXIF, IPTC & XMP tags - BenAtNVS - 2013-07-05

Yes...so cool. It work perfectly.Rofl
Thank a lot


RE: [RELEASE] MyPicsDB: Pictures DB with EXIF, IPTC & XMP tags - euphos - 2013-07-30

What changes need to be made to work with Gotham Dev Builds? A post on the 12.0.0 release suggested you plan on a 13.0 version for it. Just installed the RBEJ Gotham, so now my MyPicsDB doesn't work.


RE: [RELEASE] MyPicsDB: Pictures DB with EXIF, IPTC & XMP tags - Xycl - 2013-07-31

As long as Gotham is in early alpha status I won't change anything in MyPicsDB.
The Gotham migration will begin with the first Gotham RC.


RE: [RELEASE] MyPicsDB: Pictures DB with EXIF, IPTC & XMP tags - Zeddd - 2013-08-03

MyPicsDB Version: 12.0.0
MySQL version: 5.5.17

Hey Xycl, I'm getting the following error when MyPicsDB scans my pictures. This error causes over 8000 of my 11000+ pictures to NOT get inserted into the database because the Date Taken tag is empty.

11:35:55 T:700 ERROR: [plugin.image.mypicsdb] line 440 in MypicsDB.py object file_insert >> <type 'exceptions.Exception'> - 1292: Incorrect datetime value: 'null' for column 'ImageDateTime' at row 1

After a little investigation I was able to resolve this problem on my own by making the following change in the MypicsDB.py file at line 418.

Changed line 418
From:
imagedatetime = "null"
To:
imagedatetime = "0000-00-00 00:00:00"

You may have already fixed this in a newer version but thought I'd mention it in case there are others out there pulling their hair out trying to figure out why their pics arent being inserted that may have a similar setup.

Thanks for all your hard work!


RE: [RELEASE] MyPicsDB: Pictures DB with EXIF, IPTC & XMP tags - Xycl - 2013-08-04

Thanks.

I didn't know about this error.
Fixed in new 12.0.4 version in my repo.

Xycl


RE: [RELEASE] MyPicsDB: Pictures DB with EXIF, IPTC & XMP tags - Zeddd - 2013-08-06

Updating the database with a large number of pictures is mind-numbingly slow especially if there are only a handful of pictures that are new or updated. If i'm not mistaken, and please correct me if I am, the script is walking through each path and checking each picture to determine which files are new or have been modified to update or insert into the database.

Have you given much consideration to implementing a "quick scan" feature that uses the parent folder modification date instead? The parent folder modification date should reflect any child files that have been modified. This would quickly rule out unnecessary image scans in folders that have not been modified since the last scan and speed up the scan significantly.


RE: [RELEASE] MyPicsDB: Pictures DB with EXIF, IPTC & XMP tags - Xycl - 2013-08-10

The xbmcvfs (virtual file system) module doesn't contain a stat (or similar) function.
There is no function to get a modification, creation or whatever file/directory date.

To determine a changed picture a hash value is calculated and stored into the DB.
In case of remotely stored pictures that means that each picture has to be send to your XBMC machine.


RE: [RELEASE] MyPicsDB: Pictures DB with EXIF, IPTC & XMP tags - Zeddd - 2013-08-11

The built-in os.path functions will return creation and modification times.

os.path.getmtime(path) #modification time
os.path.getctime(path) #creation time
os.path.getatime(path) #time of last access

I've partially implemented this on my local machine. So far it's working well but still have a long way to go for full implementation.

If you dont mind, i have another feature request.

Please add strPath and ftype as tags. You're currently excluding both tags in the mypicsdb.py tags_insert function. I can only speak for myself but I have to believe there are many others out there that find tagging pictures to be a painful exercise and instead store my pictures based on folder hierarchy.

For example:
Pictures\
Pictures\destinations\
Pictures\destinations\Argentina\
Pictures\destinations\Argentina\Buenos Aires
Pictures\destinations\Argentina\Iguazu
Pictures\destinations\Europe\

The Browse by Folder selection is meant to address this but is limited by only being able to view one folder at a time, and more importantly, it cannot be used in combination with the Filter Wizard. By adding the strPath tag you'd allow us to search by multiple path locations in addition to other tags as well.

Similarly the ftype tag would allow us to include/exclude movie/picture items from our searches. Both tags would grant us a lot more flexibility in our filter wizard searches.

Really great work by the way. IMO MyPicsDB is arguably the single most useful addon for XBMC and really should be included in xbmc core as the default interface for viewing pictures.


RE: [RELEASE] MyPicsDB: Pictures DB with EXIF, IPTC & XMP tags - Xycl - 2013-08-12

(2013-08-11, 20:42)Zeddd Wrote: The built-in os.path functions will return creation and modification times.

os.path.getmtime(path) #modification time
os.path.getctime(path) #creation time
os.path.getatime(path) #time of last access

I've partially implemented this on my local machine. So far it's working well but still have a long way to go for full implementation.

These functions will return the times of locally stored files and directories.
What is with files stored on a NAS and directories which aren't mounted locally (Linux, MacOS) or accessed with a drive character (Windows)?

One big change of MyPicsDB was to support xbmcvfs module. Your're able to use remote sources with smb, nfs, zeroconf etc which is not nativly supported by Python file functions.

(2013-08-11, 20:42)Zeddd Wrote: If you dont mind, i have another feature request.

Please add strPath and ftype as tags. You're currently excluding both tags in the mypicsdb.py tags_insert function. I can only speak for myself but I have to believe there are many others out there that find tagging pictures to be a painful exercise and instead store my pictures based on folder hierarchy.

For example:
Pictures\
Pictures\destinations\
Pictures\destinations\Argentina\
Pictures\destinations\Argentina\Buenos Aires
Pictures\destinations\Argentina\Iguazu
Pictures\destinations\Europe\

The Browse by Folder selection is meant to address this but is limited by only being able to view one folder at a time, and more importantly, it cannot be used in combination with the Filter Wizard. By adding the strPath tag you'd allow us to search by multiple path locations in addition to other tags as well.

Similarly the ftype tag would allow us to include/exclude movie/picture items from our searches. Both tags would grant us a lot more flexibility in our filter wizard searches.

Really great work by the way. IMO MyPicsDB is arguably the single most useful addon for XBMC and really should be included in xbmc core as the default interface for viewing pictures.

I'll look on it.


RE: [RELEASE] MyPicsDB: Pictures DB with EXIF, IPTC & XMP tags - ggubben - 2013-08-14

Hi Xycl and thanks for a great plugin!

This might be a stupid question, but is there a good reason for the exif-parser to open the file with "modify" permissions? Specifically, I'm referring to lines 395 and 397 in scanpath.py:
Code:
try:
            f=open(picfile,"r+b")
        except:
            f=open(picfile.encode('utf-8'),"r+b")
Since I run xbmc as a separate user on my computer I thought read permission would be enough to scan my pictures. If I change these lines to:
Code:
try:
            f=open(picfile,"rb")
        except:
            f=open(picfile.encode('utf-8'),"rb")
I no longer get a permission error and the EXIF-data is imported correctly. And again, a big THANK YOU for all the effort you have put into this plugin.


RE: [RELEASE] MyPicsDB: Pictures DB with EXIF, IPTC & XMP tags - Xycl - 2013-08-15

Hi ggubben,

the reason is grr's post to use memory mapped files.
This only works on Windows with enabled modify flag.

Xycl


RE: [RELEASE] MyPicsDB: Pictures DB with EXIF, IPTC & XMP tags - Xycl - 2013-08-22

(2013-08-11, 20:42)Zeddd Wrote: The built-in os.path functions will return creation and modification times.

os.path.getmtime(path) #modification time
os.path.getctime(path) #creation time
os.path.getatime(path) #time of last access

Gotham
I found:
st = xbmcvfs.Stat(path)
modified = st.st_mtime()

That means that only a "special" MyPicsDB Gotham release will support the modification time verification.
With 1st Gotham RC I'll release this MyPicsDB.


RE: [RELEASE] MyPicsDB: Pictures DB with EXIF, IPTC & XMP tags - Xycl - 2013-09-11

(2013-07-30, 04:22)euphos Wrote: What changes need to be made to work with Gotham Dev Builds? A post on the 12.0.0 release suggested you plan on a 13.0 version for it. Just installed the RBEJ Gotham, so now my MyPicsDB doesn't work.

I installed Alpha 7 in portable mode (Windows) and MyPicsDB works.


RE: [RELEASE] MyPicsDB: Pictures DB with EXIF, IPTC & XMP tags - Xycl - 2013-09-21

MyPicsDB 12.1.0

available in my repository.

It contains a lot of bug fixes introduced with the DB abstraction layer used for the MySql connectivity in version 12.0.0. ( which is and will forever be the last one in official XBMC repository. EDIT It is already removed. )


RE: [RELEASE] MyPicsDB: Pictures DB with EXIF, IPTC & XMP tags - Xycl - 2013-10-02

MyPicsDB 12.1.3

available in my repository.

(2013-08-06, 08:08)Zeddd Wrote: Updating the database with a large number of pictures is mind-numbingly slow especially if there are only a handful of pictures that are new or updated. If i'm not mistaken, and please correct me if I am, the script is walking through each path and checking each picture to determine which files are new or have been modified to update or insert into the database.

Have you given much consideration to implementing a "quick scan" feature that uses the parent folder modification date instead? The parent folder modification date should reflect any child files that have been modified. This would quickly rule out unnecessary image scans in folders that have not been modified since the last scan and speed up the scan significantly.

Menu "Paths of picture folders"->"Search for new pictures" which only looks for new pictures and ignores already available ones. It's much faster.

(2013-08-11, 20:42)Zeddd Wrote: ...

Please add strPath and ftype as tags. You're currently excluding both tags in the mypicsdb.py tags_insert function. I can only speak for myself but I have to believe there are many others out there that find tagging pictures to be a painful exercise and instead store my pictures based on folder hierarchy.

For example:
Pictures\
Pictures\destinations\
Pictures\destinations\Argentina\
Pictures\destinations\Argentina\Buenos Aires
Pictures\destinations\Argentina\Iguazu
Pictures\destinations\Europe\

The Browse by Folder selection is meant to address this but is limited by only being able to view one folder at a time, and more importantly, it cannot be used in combination with the Filter Wizard. By adding the strPath tag you'd allow us to search by multiple path locations in addition to other tags as well.

Similarly the ftype tag would allow us to include/exclude movie/picture items from our searches. Both tags would grant us a lot more flexibility in our filter wizard searches.

Really great work by the way. IMO MyPicsDB is arguably the single most useful addon for XBMC and really should be included in xbmc core as the default interface for viewing pictures.

File type and picture path now available as tag to use it in Filter Wizard.


This forum uses Lukasz Tkacz MyBB addons.