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 - twiseva - 2016-06-10

(2016-06-10, 03:13)twiseva Wrote:
(2016-06-06, 15:01)peppe_sr Wrote:
(2016-06-06, 12:03)Xycl Wrote: Please try version 13.3.8

it worked at first attempt
thanks
Peppe

So it seems that this same error has appeared for ma after updating to 13.3.8. See http://pastebin.com/raw/SHXqw4ZL. Looks basically the same. Prior to 13.3.8 all was well, afterwards get an error popup and this in the logs.

Did a quick hack that worked for me in default.py as follows. Excuse my hack as I have never programmed in Python.

95 # Altered change to remove the '&reload' and EVERYTHING after it
96 self.parm= self.parm.split('&reload=')[0]


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

To only remove &reload=xxx till next ampersand please use version 13.3.9


RE: [RELEASE] MyPicsDB: Pictures DB with EXIF, IPTC & XMP tags - twiseva - 2016-06-10

(2016-06-10, 15:29)Xycl Wrote: To only remove &reload=xxx till next ampersand please use version 13.3.9

Works great -- thanks @Xycl.


RE: [RELEASE] MyPicsDB: Pictures DB with EXIF, IPTC & XMP tags - stuka - 2016-07-01

Hey,
Before explaining why I came here, let me say that I'm a beginner with Kodi, and Kodi Add-ons.
So I installed Kodi, then your (marvelous) add-on on my old PC, which was running Windows before, and now Mint 17.3.

When I try to scan the folder that contains all my pics (about 20.000), PyPicsDB scans it, but stops after a while. It finds precisely 5311 pictures.
I tried 2 times with different installs, and the problem remains the same. I don't know if I'm just dumb and didn't find an obvious way to fix it, or if a problem exists in my files.

Thanks for reading this, and thanks for you work !

EDIT : It appears that one of my .jpg has been corruted, excluded it and re-scanning, I'll update in the morning


RE: [RELEASE] MyPicsDB: Pictures DB with EXIF, IPTC & XMP tags - peppe_sr - 2016-07-02

The easy way to understand your problem is through a debug log. Turn in on the settings, perform the scan and post the log on pastebin
Peppe


RE: [RELEASE] MyPicsDB: Pictures DB with EXIF, IPTC & XMP tags - stuka - 2016-07-02

Thanks,
I checked myself in the log a bit, and it appears that one folder I was trying to scan contained corrupted files.
I excluded it in the search path, and it worked properly
Thanks for reading me, problem is fixed !


RE: [RELEASE] MyPicsDB: Pictures DB with EXIF, IPTC & XMP tags - varun432 - 2016-07-09

Hi I am new here

Hey , how to add music playlist to my album
I can't seem to be able to do it... Can't find that option anywhere

Please help with this stupid question

Thanks in advance for reply


RE: [RELEASE] MyPicsDB: Pictures DB with EXIF, IPTC & XMP tags - rubpa - 2016-08-20

Hi!

I've been using MyPicsDB for years now and a problem has been bothering me for months. I tag my photos using the face tagging feature of Picasa for Windows (which is configured to write face tags to the photos itself). I've 4000 pics of person X but MyPicsDB shows only about 400. The number shown by MyPicsDB varies whenever I go to Browse by Tags -> Person. Never figured out why. I've tried resetting the whole db and the problem is back after few weeks.

Today,
- I added only 1 folder to MyPicsDB with about 1000 photos. It found 411 photos of person X. Closed Kodi.
- Opened Picasa, tagged a new person (about 25 photos). Closed Picasa.
- Opened Kodi, MyPicsDB, scan for new/changed photos.
- After the scanning, new person has 25 photos, person X is down to 6 photos (all of which have new person as well).

If it helps, Picasa writes XMP-mwg-rs tags for faces.

Kindly fix the problem.


RE: [RELEASE] MyPicsDB: Pictures DB with EXIF, IPTC & XMP tags - rubpa - 2016-08-21

Hi Xycl!

It appears that more tags have a similar problem, not just the Person tag. I did an even more minimal test today. I added a single folder to MyPicsDB with 2 pictures. Both pics had the IPTC Caption/Description set to "Wow". I scanned them and I see 2 pics in the Browse by Tags -> Description -> Wow.

Then I edited one of the pictures and changed the caption to "Wowa". I scanned for new & changed pictures and MyPicsDB correctly shows 1 modified. Now Browse by Tags -> Description -> has only Wowa listed and Wow is missing.

However this does not happen always, sometimes both tags stayed - keep changing the caption from Wow to Wowa and back and the problem does happen soon enough. When it happens, I checked with a sqlite browser that the TagsInFiles.idTagContent has values which do not exist in TagContents table. It appears that instead of reusing the existing idTagType<->TagContent unique pair, a new record is added with a new idTagContent and the old pairs are deleted.

Is it a bug in the sqlite engine? I did my tests with v16.1 on Win7. I strongly believe it is the same problem on my main kodibuntu installation.


RE: [RELEASE] MyPicsDB: Pictures DB with EXIF, IPTC & XMP tags - smarthomems - 2016-09-04

Hi Xycl!,
I have connected the Plugin to my MYSQL database which is working fine and also updating the database. When searching for picture with a certain tag I receive no results due to an SQL exception:
The Log says the following (Searching for Keyword Tag NRW):

16:38:08 T:12264 NOTICE: [My Pictures Database] line 86 in default.py object Main.get_args >> MyPicturesDB plugin called :
16:38:08 T:12264 NOTICE: [My Pictures Database] line 87 in default.py object Main.get_args >> sys.argv[0] = plugin://plugin.image.mypicsdb/
16:38:08 T:12264 NOTICE: [My Pictures Database] line 88 in default.py object Main.get_args >> sys.argv[2] = ?action=%27showpics%27&method=%27tag%27&name=%27NRW%20(32%20Pics)%27&page=%271%27&tag=%27NRW%27&tagtype=%27Keyword%27&viewmode=%27view%27
16:38:08 T:12264 NOTICE: [My Pictures Database] line 101 in default.py object Main.get_args >> action='showpics',method='tag',name='NRW (32 Pics)',page='1',tag='NRW',tagtype='Keyword',viewmode='view'
16:38:08 T:12264 NOTICE: [My Pictures Database] line 63 in MypicsDB.py function __init__ >> Used DB Backend = MySql
16:38:08 T:12264 NOTICE: Previous line repeats 1 times.
16:38:08 T:12264 ERROR: [My Pictures Database] line 274 in dbabstractionlayer.py object Database abstraction layer >> The request failed :
16:38:08 T:12264 ERROR: [My Pictures Database] line 275 in dbabstractionlayer.py object Database abstraction layer >> <type 'exceptions.Exception'> - 3065: Expression #1 of ORDER BY clause is not in SELECT list, references column 'MyPicsDB.f.ImageDateTime' which is not in SELECT list; this is incompatible with DISTINCT
16:38:08 T:12264 ERROR: [My Pictures Database] line 279 in dbabstractionlayer.py object Database abstraction layer >> SQL > SELECT distinct strPath,strFilename FROM Files f, TagContents tc, TagsInFiles tif, TagTypes tt WHERE f.idFile = tif.idFile AND tif.idTagContent = tc.idTagContent AND tc.TagContent = ? and tc.idTagType = tt.idTagType and length(trim(tt.TagTranslation))>0 and tt.TagTranslation = ? order by imagedatetime
16:38:08 T:12264 NOTICE: [My Pictures Database] line 285 in dbabstractionlayer.py object SQL request numvar = 1 content = NRW >> 4
16:38:08 T:12264 NOTICE: [My Pictures Database] line 285 in dbabstractionlayer.py object SQL request numvar = 2 content = Keyword >> 4

The MySQL server is the following: Server-Version: 5.7.13-0ubuntu0.16.04.2 - (Ubuntu)

Needless to say that with SQLLite it works without a problem:-)

Thanks


RE: [RELEASE] MyPicsDB: Pictures DB with EXIF, IPTC & XMP tags - mikebzh44 - 2016-09-05

Just discover that I can use a MySQL Database so I set up the addon to plug my my MySQL database and rescan my folders.

But when I restart Kodi, I have a MyPicsDB error :

Code:
18:53:09 T:1060   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.IndexError'>
                                            Error Contents: list index out of range
                                            Traceback (most recent call last):
                                              File "C:\Kodi\16.1\portable_data\addons\plugin.image.mypicsdb\default.py", line 1940, in <module>
                                                m.set_properties()
                                              File "C:\Kodi\16.1\portable_data\addons\plugin.image.mypicsdb\default.py", line 1398, in set_properties
                                                Collections = MPDB.cur.request( """SELECT COUNT(*) FROM collections""" )[0]
                                            IndexError: list index out of range
                                            -->End of Python script error report<--

Don't know if it's due to my MySQL version (running on my ReadyNAS-RN102 NAS) but table Collection is spelled with a upcase C.

After editing default.py :

Code:
Collections = MPDB.cur.request( """SELECT COUNT(*) FROM Collections""" )[0]

Everything is OK.


RE: [RELEASE] MyPicsDB: Pictures DB with EXIF, IPTC & XMP tags - mikebzh44 - 2016-09-06

Hi Xycl.

Just mod your release to return comment in Window properties :

http://forum.kodi.tv/showthread.php?tid=195665&pid=2409499#pid2409499

I will make a PR on your GITHUB if you wan to include this new feature.

Thanks for this awesome addon Wink


RE: [RELEASE] MyPicsDB: Pictures DB with EXIF, IPTC & XMP tags - MrsAngelD - 2016-09-26

(2016-09-05, 18:59)mikebzh44 Wrote: Just discover that I can use a MySQL Database so I set up the addon to plug my my MySQL database and rescan my folders.

But when I restart Kodi, I have a MyPicsDB error :

Code:
18:53:09 T:1060   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.IndexError'>
                                            Error Contents: list index out of range
                                            Traceback (most recent call last):
                                              File "C:\Kodi\16.1\portable_data\addons\plugin.image.mypicsdb\default.py", line 1940, in <module>
                                                m.set_properties()
                                              File "C:\Kodi\16.1\portable_data\addons\plugin.image.mypicsdb\default.py", line 1398, in set_properties
                                                Collections = MPDB.cur.request( """SELECT COUNT(*) FROM collections""" )[0]
                                            IndexError: list index out of range
                                            -->End of Python script error report<--

Don't know if it's due to my MySQL version (running on my ReadyNAS-RN102 NAS) but table Collection is spelled with a upcase C.

After editing default.py :

Code:
Collections = MPDB.cur.request( """SELECT COUNT(*) FROM Collections""" )[0]

Everything is OK.

I don't think it's just you, I had the same error and editing my file fixed it as well. My database is running on Ubuntu Linux 14.04.

Thanks for posting your fix btw Smile


RE: [RELEASE] MyPicsDB: Pictures DB with EXIF, IPTC & XMP tags - Tolot - 2016-10-03

Hi Xycl,

I started testing MyPicsDB to be able to show only a subset of the pictures with a corresponding rating, which Kodi unfortunately not supports.

With two images, I get the following error message:

Code:
12:20:17 T:140612934301440  NOTICE: [My Pictures Database] line   401 in scanpath.py object VFSScanner._get_metas()._get_xmp() >> Finished reading XMP tags
12:20:17 T:140612934301440   ERROR: Traceback (most recent call last):
12:20:17 T:140612934301440   ERROR:   File "/storage/.kodi/addons/plugin.image.mypicsdb/scanpath.py", line 137, in dispatcher
12:20:17 T:140612934301440   ERROR:     self._addpath(path, None, recursive, update)
12:20:17 T:140612934301440   ERROR:   File "/storage/.kodi/addons/plugin.image.mypicsdb/scanpath.py", line 353, in _addpath
12:20:17 T:140612934301440   ERROR:     self._addpath(dirname, folderid, True, update)
12:20:17 T:140612934301440   ERROR:   File "/storage/.kodi/addons/plugin.image.mypicsdb/scanpath.py", line 353, in _addpath
12:20:17 T:140612934301440   ERROR:     self._addpath(dirname, folderid, True, update)
12:20:17 T:140612934301440   ERROR:   File "/storage/.kodi/addons/plugin.image.mypicsdb/scanpath.py", line 288, in _addpath
12:20:17 T:140612934301440   ERROR:     tags = self._get_metas(common.smart_unicode(localfile))
12:20:17 T:140612934301440   ERROR:   File "/storage/.kodi/addons/plugin.image.mypicsdb/scanpath.py", line 427, in _get_metas
12:20:17 T:140612934301440   ERROR:     if picentry['Image Rating'] is None or len(picentry['Image Rating']) == 0:
12:20:17 T:140612934301440   ERROR: TypeError: object of type 'int' has no len()

Any idea, what the problem could be? It reads more than 13000 pictures without any problems.


RE: [RELEASE] MyPicsDB: Pictures DB with EXIF, IPTC & XMP tags - ködi-zömbie - 2016-10-11

(2016-09-05, 18:59)mikebzh44 Wrote: After editing default.py :

Code:
Collections = MPDB.cur.request( """SELECT COUNT(*) FROM Collections""" )[0]

Everything is OK.

I did this but my port is not default port and I still can not connect to mysql server.
Error log shows default port not my own port:

Code:
InterfaceError: 2003: Can't connect to MySQL server on '192.168.1.254:3306'

When I m at home I post full debug log

http://pastebin.com/1as5hEmC


This forum uses Lukasz Tkacz MyBB addons.