• 1
  • 2
  • 3
  • 4(current)
  • 5
  • 6
  • 27
Pictures database and library mode; scan EXIF and IPTC metadata tags into a SQL db
#46
Thank you.
Your help was very helpful.

Request 1:
Will be added in the next beta release

Request 2:
Need more work for this. So wait a couple of releases and i may add it.
#47
I tried it yesterday and it looks very capable. Thanks for a nice plugin!

Couple of things I noticed:

1) It seams to scan PIC to DB again, every time I change skin
2) It seams there is no way to interrupt scanning process. I keep pressing CANCEL without result
EDIT: 3) While scanning, you can't return to home page and let it do scan process in background

Hopefully I'll look at it to more extent following week.
My skins:

Amber
Quartz

#48
Hi
1/ there is a setting in the debug tab, if disabled it shouldn't scan every time. And the scan starts only when the plugin starts. Anyway, it has been improved in the next version to come hopefully in this week
2/ You're right. Normally it is better in the version to come, but not very good as well. I need to work on the scanning process and I'm not sure if I do it for the next version, or if I release a version before re-doing the scanning process
3/ it goes with 2/. The version I am working on now is a bit diffrerent because the path to scan for pictures is not in the settings anymore. Why ? Because you can set as many folders to scan for pictures as you want. So you set your paths from the addon, and you scan your folders when you want. Hopefully it answers to a request many of you made to me.
#49
solexalex Wrote:known bug :
if you choose a month from the 'by dates' filter, and you have any picture in this month, shooted the last day of the month, it bugs. It is because to select a whole day of pictures, I take all the pictures dated between the given day of the month, and the given day +1. So if the month contain only 30 days (for example April) it selects pics from yyyy/04/30 to yyyy/04/31, which python time module says to be wrong (of course)
The correct thing should be 04/30 to 05/01 for a whole day...
I have to fix that.
https://xbmc-scripts.googlecode.com/svn/...e.mypicsdb

Maybe you already fixed the "last day of month" problem in SVN, but I have a quick hack that works for me that you might be able to modify. It uses the "calendar" module in Python. Here's the patch:

Code:
--- default.py.orig     2010-10-06 00:57:42.032253626 -0400
+++ default.py  2010-10-06 00:51:38.149120919 -0400
@@ -441,8 +441,19 @@
             elif self.args.period=="date":
                 #BUG CONNU : trouver un moyen de trouver le jour suivant en prenant en compte le nb de jours par mois
                 a,m,j=self.args.value.split("-")              
-                filelist = MPDB.search_between_dates( ("%s-%s-%s"%(a,m,j),format) , ( "%s-%s-%s"%(a,m,int(j)+1),format) )
+                #filelist = MPDB.search_between_dates( ("%s-%s-%s"%(a,m,j),format) , ( "%s-%s-%s"%(a,m,int(j)+1),format) )

+               import calendar
+                last_day_of_month = calendar.monthrange(int(a), int(m))[1]
+                end_day = int(j) + 1
+                # if we overshoot end of month, reset to that
+               if end_day > last_day_of_month:
+                       end_day = last_day_of_month
+                       filelist = MPDB.search_between_dates( ("%s-%s-%s"%(a,m,j),format) , ( "%s-%s-%s 23:59:59"%(a,m,end_day),"%Y-%m-%d %H:%M:%S") )
+               else:
+                       filelist = MPDB.search_between_dates( ("%s-%s-%s"%(a,m,j),format) , ( "%s-%s-%s"%(a,m,end_day),format) )
+
+                
             elif self.args.period=="period":
                 picfanart = os.path.join(PIC_PATH,"fanart-period.png")
                 filelist = MPDB.search_between_dates(DateStart=(urllib.unquote_plus(self.args.datestart),format),
--- resources/lib/MypicsDB.orig.py      2010-10-06 00:14:15.232460835 -0400
+++ resources/lib/MypicsDB.py   2010-10-06 00:49:24.711131509 -0400
@@ -858,7 +858,17 @@
     elif period=="date":
         #BUG CONNU : trouver un moyen de trouver le jour suivant en prenant en compte le nb de jours par mois
         a,m,j=value.split("-")              
-        filelist = search_between_dates( ("%s-%s-%s"%(a,m,j),format) , ( "%s-%s-%s"%(a,m,int(j)+1),format) )
+       import calendar
+        last_day_of_month = calendar.monthrange(int(a), int(m))[1]
+        end_day = int(j) + 1
+       # if we overshoot end of month, reset to that
+        if end_day > last_day_of_month:
+           end_day = last_day_of_month
+           filelist = search_between_dates( ("%s-%s-%s"%(a,m,j),format) , ( "%s-%s-%s 23:59:59"%(a,m,end_day),"%Y-%m-%d %H:%M:%S") )
+       else:
+           filelist = search_between_dates( ("%s-%s-%s"%(a,m,j),format) , ( "%s-%s-%s"%(a,m,end_day),format) )
+
+        #filelist = search_between_dates( ("%s-%s-%s"%(a,m,j),format) , ( "%s-%s-%s"%(a,m,int(j)+1),format) )
        
     else:
         #pas de periode, alors toutes les photos du 01/01 de la plus petite année, au 31/12 de la plus grande année
#50
Thank you very much for your patch, it's a pleasure to see involvment that some of you put in this !

I don't remember if I fixed that already in the version I'm working on, but I found a better way with natively supported functions in sqlite databases.

In fact Sqlite has some date/time functions to work with datetime fields. I was unable to use those at the beginning as I didn't know anything in sql and sqlite. Now I feel better with it and I succeeded in doing some better requests on database.
The datetime functions accept some modifier parameter which enable to take a date and modify it to get the beginning of year or month or.... or some days after, or some days before aso...
I think I will use these sqlite functions, but if for any reason I don't succeed, Your patch will be very handy !!
#51
I just updated my system today and got the new beta running. Your add on was the first one I found. Thanks so much for working on this!!!! One of my number #1 requests from years ago. Question, do the pictures have to be Local or can they be on a share?

I'm looking forward to working with it... Thanks again.
#52
lennon105 Wrote:Question, do the pictures have to be Local or can they be on a share?

Native XBMC software support SMB access, like in the Music or Video parts of XBMC. In the basic Python scripting SMB access is not implemented, the coder of the add-on should manage itself to access network shares. So, MPD does not access SMB within its file settings.

A work around is to set the network access in the OS systemen and not in XMBC. For eg. in Windows you can use NET USE to make a network mapping to a drive or network folder. I also use a macmini and I have the same 'problem' there. In OSX you can make an automation script, so that the share is mapped before XBMC is started.
#53
Everyhing is said. Except maybe that from my own experience, the scan of smb share is pretty slow compared to local files.
It will be faster when just updating but the first time will be (in any case) slower
#54
Ok...thanks for the info. I have no idea how to setup a share in the OS on my live install. Maybe I should just copy all 14,000+ family photos to the XBMC HD. Smile

Thanks again for the work.
#55
I'm trying to know every os command lines for mounting remote share and I will add the functionnality then.
Waiting for that, I think google is your best friend to know if it is doable and how to mount it from your live XBMC.
#56
lennon105 Wrote:I have no idea how to setup a share in the OS on my live install. Maybe I should just copy all 14,000+ family photos to the XBMC HD. Smile

How do you manage music and movies? Copying?
My skins:

Amber
Quartz

#57
Solexalex - this is a massive improvement thank you for making the effort.

Maybe this is already present ( i.e in collections - not sure how that works ) but do you have any plans to include the option to "Filter By" keywords ?

for example if your images contain the following keywords

Car
+ Ferrari
Holiday
+ Italy
+ Scotland
People
+ John
+ Paul
+ Mary

Could you present all keywords ? even better would be to present them in tree structure
the user then gets to pick for example

Mary
Italy
Ferrari

and all pictures tagged with Mary or Italy or Ferrari would be picked ( could make it AND as well ) ?

thanks !
#58
I dont know any parent/children relations between keywords. Maybe i missed something or maybe you are talking about categories and supplemental categories...
Anyway it is not handled yet. You can only display the whole list of keywords and for each keyword , showing corresponding pics.
The "collections" are only here to group arbitrary pictures as you will do in a real photo album.

What another user asked me for will be done in a further major version (i.e not planed yet). It consists of smart albums in which you dont insert pictures but which pictures are automatically taken from database corresponding to users setted constraints (pictures with "keyword" taken before "a date".....)
I hope i can code it very soon and t will be easily doable...
#59
As you say i dont think "parent/children" relations exists but i thought i would pose the question this way in case you knew this was the case Smile

In Adobe Bridge you can build a keyword tree , but i don't think this relationship persists when saved to the jpg ( or in the case of RAW files an .xml document )

However your list of keywords with associated pictures is a great start Smile .... you know users always want more Smile
#60
Yes I know and I love it ! It proves that my works is a real need for many users. That is my machine : your likes and your requests !
  • 1
  • 2
  • 3
  • 4(current)
  • 5
  • 6
  • 27

Logout Mark Read Team Forum Stats Members Help
Pictures database and library mode; scan EXIF and IPTC metadata tags into a SQL db2