Kodi Community Forum
Pictures database and library mode; scan EXIF and IPTC metadata tags into a SQL db - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Add-ons (https://forum.kodi.tv/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


- solexalex - 2011-01-09

Are you sure ? I thought someone reports me it was working with \\server\path for linux too ?
Just to be sure, if a linux user can confirm that it work or not, I change it.


- travist - 2011-01-10

Hi,

Just started using your plugin again. I'm using a NAS on a windows domain, and unfortunately, I can't add my shares with the new version. I read some of the posts above and it seems that this functionallity is broken for now. If that is incorrect, please let me know. It was working the last time, although I don't remember the version number.

Look forward to having this add-on working again. I'd like to test it out a little more with the new version


- solexalex - 2011-01-10

try to type the remote pah you got in the addon in a file browser on the same machine. Wether it works or not send me a log and some details about your installation


- fiveisalive - 2011-01-11

crash with r163 svn upon entering recently added:

Code:
01:32:18 T:140470439872256 M:3006722048  NOTICE: using pysqlite2
01:32:18 T:140470439872256 M:3006722048  NOTICE: MyPicturesDB plugin called :
01:32:18 T:140470439872256 M:3006722048  NOTICE: plugin://plugin.image.mypicsdb/?method='recentpics'&period=''&value=''&viewmode='view'&action='showpics'&name='Picture
s+recently+added'
01:32:18 T:140470439872256 M:3006722048  NOTICE: --------------------
01:32:18 T:140470439872256 M:3006722048  NOTICE: Previous line repeats 1 times.
01:32:18 T:140470439872256 M:3006722048  NOTICE: 0
01:32:18 T:140470439872256 M:3006722048    INFO: -->Python script returned the following error<--
01:32:18 T:140470439872256 M:3006722048   ERROR: Error Type: exceptions.UnboundLocalError
01:32:18 T:140470439872256 M:3006722048   ERROR: Error Contents: local variable 'filelist' referenced before assignment
01:32:18 T:140470439872256 M:3006722048   ERROR: Traceback (most recent call last):
                                              File "/home/myth/.xbmc/addons/plugin.image.mypicsdb/default.py", line 1085, in ?
                                                m.show_pics()
                                              File "/home/myth/.xbmc/addons/plugin.image.mypicsdb/default.py", line 1004, in show_pics
                                                for path,filename in filelist:
                                            UnboundLocalError: local variable 'filelist' referenced before assignment



- fiveisalive - 2011-01-11

ok, now after I rescanned to add some new pics, the whole plugin crashes (maybe related to recentpics problem and/or language files issue):
Code:
1:44:29 T:140470451693312 M:2946797568   DEBUG: RegisterExtensionLib, adding _sqlite.so (0x7fc200209820)
01:44:29 T:140470451693312 M:2946797568   DEBUG: xbp_dlsym - load symbol init_sqlite
01:44:29 T:140470451693312 M:2946797568  NOTICE: using pysqlite2
01:44:29 T:140470451693312 M:2946797568  NOTICE: MyPicturesDB plugin called :
01:44:29 T:140470451693312 M:2946797568  NOTICE: plugin://plugin.image.mypicsdb/
01:44:29 T:140470451693312 M:2946797568  NOTICE: --------------------
01:44:29 T:140470451693312 M:2946797568  NOTICE: Previous line repeats 1 times.
01:44:29 T:140470451693312 M:2946797568  NOTICE: 0
01:44:29 T:140470451693312 M:2946797568    INFO: -->Python script returned the following error<--
01:44:29 T:140470451693312 M:2946797568   ERROR: Error Type: exceptions.TypeError
01:44:29 T:140470451693312 M:2946797568   ERROR: Error Contents: not all arguments converted during string formatting
01:44:29 T:140470451693312 M:2946797568   ERROR: Traceback (most recent call last):
                                              File "/home/myth/.xbmc/addons/plugin.image.mypicsdb/default.py", line 1068, in ?
                                                m.show_home()
                                              File "/home/myth/.xbmc/addons/plugin.image.mypicsdb/default.py", line 215, in show_home
                                                self.addDir(unescape(__language__(30209))%Addon.getSetting("recentnbdays"),[("method","recentpicsdb"),("period",""),("value",""),("viewmode","view")],
                                            TypeError: not all arguments converted during string formatting
01:44:29 T:140470451693312 M:2946797568    INFO: -->End of Python script error report<--
01:44:29 T:140470451693312 M:2946670592   DEBUG: xbp_dlopen loading python lib /usr/local/lib64/xbmc/system/python/python24.zip/collections.so. flags: 2
0

definitely missing strings in English translation, when I added them back to strings.xml it worked again. it would be nice if it defaulted back to French translation if that string wasn;t present in current language, that way it wouldn't crash, and it would make it clear what needed to be translated.


- fiveisalive - 2011-01-11

Another quick buglet, when viewing pics by date, it appears to have the direction reversed. i.e. if the arrow is pointing down, I would expect the pics in the list to be from oldest (at the top) to newest (at the bottom). but the plugin reverses this, so that up sorts from oldest to newest. also oldest to newest should probably the default direction since that's the most consitent the direction at the month and year level.


- solexalex - 2011-01-11

thank you (once again) for your feedbacks.
I don t know how to work with strings. I always have trouble when i add or change some strings.
I already thought how i could fall into default language but never succeeded. I use sometimes string formating which replace %s with a value in my code. It is more flexible but can cause troubles if %s are missing...
The only solution i think of is to work with french and give a translation when releasing in the repo...
I m open with any of your suggestions.

As for picture sorting, my addon does not act on the order of the pics. It just feed the item with the date and xbmc itself sorts the pics depending which sens of order is set.
I will have a look to see if i can arbitrary set this from the addon but i m not sure it is possible.


- fiveisalive - 2011-01-12

solexalex Wrote:thank you (once again) for your feedbacks.
I don t know how to work with strings. I always have trouble when i add or change some strings.
I already thought how i could fall into default language but never succeeded. I use sometimes string formating which replace %s with a value in my code. It is more flexible but can cause troubles if %s are missing...
The only solution i think of is to work with french and give a translation when releasing in the repo...
I m open with any of your suggestions.

It's not so bad whilst it's just an SVN problem. I figured that the main xbmc would have guidelines and/or code to support fallback to a default language for the Python bindings, but maybe not.

Quote:As for picture sorting, my addon does not act on the order of the pics. It just feed the item with the date and xbmc itself sorts the pics depending which sens of order is set.
I will have a look to see if i can arbitrary set this from the addon but i m not sure it is possible.

I looked at the built in Pictures application, and it does appear that when the arrow points "up" (at least in the Aeon MQ 2 skin), that the dates go from oldest to newest and vice-versa when the arrow is "down", so your addon works the same way, so no change needed there.

I think the thing that is different is that MyPicsDB appears to default to the arrow going "down", and hence pics sort from newest to oldest. I think it would be best if the default was the other way around: i.e. oldest to newest for consistency with year and month views.


- solexalex - 2011-01-13

I understand what you mean about the ordering of the files.
I've seen something to change the order from the code, but can't find it anymore. It is not in the python XBMC libraries so I have to look around. Maybe using this I can change the order to show elder pictures first.

Could you send me your strings.xml english file please ?


svn #167 - mhdebokx - 2011-01-17

subversion #167 works great
- new feature of browsing categories is implemented
- smb scanning network drives including user and password works great


- solexalex - 2011-01-17

thank you !!

If you are testing last svn, be aware that english strings are not uptodate and so the addon may crash.

Did you think about sending me you own translations ??


- fiveisalive - 2011-01-17

solexalex Wrote:I understand what you mean about the ordering of the files.
I've seen something to change the order from the code, but can't find it anymore. It is not in the python XBMC libraries so I have to look around. Maybe using this I can change the order to show elder pictures first.

Could you send me your strings.xml english file please ?

Here are my English translations against SVN r171:

http://fpaste.org/9DMj/

I renamed "Periods", "Date ranges", because I think that sounds more natural to English speakers and reworded some other items (e.g. "Perform scan now!" should really be "Perform scan on addon startup", because that's when it occurs).


- solexalex - 2011-01-17

yes i changed so many times the strings that some are not correct at all.
Thanks for the strings.
I have to create some graphics item and then you can except soon a new official version.


- solexalex - 2011-01-18

svn #174 :
Added : browse by "supplemental categories" once again, thanks to mhdebokx

As now there are a lot of items in the main container, I added a setting category dedicated to add/remove items you want to show/hide on main screen.


- solexalex - 2011-02-01

svn #180 added a browsing by countries and cities (IPTC fields)

As a lot of items are present in the main menu, and as thos items may not interest everyone, you may edit the items you want to show.