GoogleCodeArchives / xbmc-scripts

Automatically exported from code.google.com/p/xbmc-scripts
0 stars 0 forks source link

image rating does not exists in FILE table #4

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
when running the add-on and looking in XBMC logging the following error occures:

22:35:43 T:3664 M:231047168  NOTICE: MyPicsDB >> SQL > SELECT files."EXIF 
DateTimeOriginal" FROM files WHERE strPath="D:\Mijn afbeeldingen\201012 Opa 90 
jaar\" AND strFilename="IMG00062-20091026-2127.jpg";
22:35:43 T:3664 M:231112704  NOTICE: MyPicsDB >> SQL > SELECT files."Image 
Rating" FROM files WHERE strPath="D:\Mijn afbeeldingen\201012 Opa 90 jaar\" AND 
strFilename="IMG00062-20091026-2127.jpg";
22:35:43 T:3664 M:231112704  NOTICE: MyPicsDB >> The request failed :
22:35:43 T:3664 M:231112704  NOTICE: MyPicsDB >> exceptions.Exception - no such 
column: files.Image Rating

I think the "Image Rating" column is not defined in the database table.

Original issue reported on code.google.com by mdeb...@gmail.com on 19 Jan 2011 at 9:47

GoogleCodeExporter commented 9 years ago
True, EXIF fields are added at needs. Only the fields contained in the pictures 
are added to the table.
If none of the picture scanned contains the Rating field, then any request 
asking for this field will crash.

Anyway, the request is handled in a try...except statement, which prevent the 
whole addon to crash.

To avoid this exception in log, I may simply create the "Image Rating" field a 
files table creation. Is that a better solution ?

Original comment by alexso...@gmail.com on 19 Jan 2011 at 10:05

GoogleCodeExporter commented 9 years ago
Changed the sqlite request of creation for the 'files' table. Added the column 
definition "Image Rating"

Original comment by alexso...@gmail.com on 19 Jan 2011 at 10:17

GoogleCodeExporter commented 9 years ago
I thing it is indeed better to make an extra column.
Normaly an exception handler (like try...exception) causes more overhead and 
decreases performance

Original comment by mdeb...@gmail.com on 19 Jan 2011 at 10:46

GoogleCodeExporter commented 9 years ago
ok. Will be added on next commit

Original comment by alexso...@gmail.com on 19 Jan 2011 at 10:53