• 1
  • 3
  • 4
  • 5(current)
  • 6
  • 7
  • 27
Pictures database and library mode; scan EXIF and IPTC metadata tags into a SQL db
#61
solexalex Wrote: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 !

Some other quick wishlist items off the top of my head:

  1. ability to add all pictures in a "period" in the "Browse By Dates" view to a "Collection", e.g. I would like to be able to navigate to a date e.g. "2010-10-18" and choose the right context menu to add all pics of that date to a "Collection"
  2. more user-friendly dates in "periods" for display e.g. 18 Oct 2010, easier for non-computer folks (ideally this would be an option, so ISO dates could also be displayed)
  3. ability to edit "Periods", currently in order to change the start or end of a period, you need to create a new one from scratch, there's no way to edit the start or end after creation (you can only change the name)

I'll sync my copy with the svn version and see if I can implement a few of these myself if I get the time.
#62
fiveisalive Wrote:Some other quick wishlist items off the top of my head:

  1. ability to add all pictures in a "period" in the "Browse By Dates" view to a "Collection", e.g. I would like to be able to navigate to a date e.g. "2010-10-18" and choose the right context menu to add all pics of that date to a "Collection"

ah, so it seems that this now works in svn, thanks for adding that, however it only appears to work for individual days. I would like to be able to add all dates in, say Sept 2010 ("2010-10"), no context menu appears in that case. In addition it appears that all the other context menu options (e.g slideshow etc.) disappear. is there a way to add a new option alongside the old default options for the right-context menu with the Python API?
#63
Here's an updated patch for the end-of-month bug that I reported earlier. This patch is against SVN and is slightly cleaner, because it doesn't need to special case for the end of the month situation. I simply use the datetime module to get the next day for the enddate using the timedelta(1) call:

Code:
Index: default.py
===================================================================
--- default.py    (revision 128)
+++ default.py    (working copy)
@@ -626,7 +626,10 @@
             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) )
+        import datetime
+        enddate = datetime.date(int(a), int(m), int(j)) + datetime.timedelta(1)
+                #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) , ( enddate.isoformat(),format) )
                
             elif self.args.period=="period":
                 picfanart = os.path.join(PIC_PATH,"fanart-period.png")
Index: resources/lib/MypicsDB.py
===================================================================
--- resources/lib/MypicsDB.py    (revision 128)
+++ resources/lib/MypicsDB.py    (working copy)
@@ -975,8 +975,11 @@
        
     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) )
+        a,m,j=value.split("-")            
+        import datetime
+        enddate = datetime.date(int(a), int(m), int(j)) + datetime.timedelta(1)
+        #filelist = search_between_dates( ("%s-%s-%s"%(a,m,j),format) , ( "%s-%s-%s"%(a,m,int(j)+1),format) )
+        filelist = search_between_dates( ("%s-%s-%s"%(a,m,j),format) , ( enddate.isoformat(),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

I understand that this may be superceded by a better solution for getting dates, but meanwhile this fixes the existing code in a slightly cleaner way than my previous patch.
#64
Sorry but many updates append since my last commit in the svn.
I modified the system for correct handling of the end of month. I now use the datetime sqlite function in my requests.

I added many interesting features but they are not finished yet. (if the picture contain geotagging info, localize the pic in a google map for example)

About contextual menu, there will be sometimes many custom entries and i think it is a mess with all standard context menu entries. Contextual menu is limited to 10 (not sure about the number) items.
I may add some of the standard entries if you tell me which one you need.

I will add some nice looking dates everywhere the dates are used.

Not sure i answered all your points but i am sick and tired and answering from mobile phone.
Will look better tonight.
#65
OK
- I added the 'add to selection' context menu to every 'by date' views.
- Dates in the 'by date' section are all pretty lookin. Need to add some settings for country related date notations
- I started something to edit the periods.
- Now user can : select one of the dates of the in base pictures OR input a date by hand. Need some improvment to test if the input is a valid date format and if the start date is before the end date.

Things going further with ideas and needs of everyone !!
#66
solexalex Wrote:Sorry but many updates append since my last commit in the svn. I modified the system for correct handling of the end of month. I now use the datetime sqlite function in my requests.

I added many interesting features but they are not finished yet. (if the picture contain geotagging info, localize the pic in a google map for example)

About contextual menu, there will be sometimes many custom entries and i think it is a mess with all standard context menu entries. Contextual menu is limited to 10 (not sure about the number) items.
I may add some of the standard entries if you tell me which one you need.

I will add some nice looking dates everywhere the dates are used.

Not sure i answered all your points but i am sick and tired and answering from mobile phone. Will look better tonight.

Thanks for all the new features. The particular additions to the context menu that I think should be available for all folders/dates/collections/time periods are "View slideshow", "Recursive slideshow" and "Add to favourites". i.e. it's very useful to have a slide show of a whole year, a whole month, or a whole day, and it is also useful to add that particular time period/collection etc. to the favourite list.

Also when I was checking out the svn version that uses the new scanpath.py functionality, I notice that it requires a new module "script.module.dialogaddonscan" which is currently only available from the queep repository. Even when I enabled that repo and installed that module, it would fail with an error something to effect of can't find "WindowError" which appears to be a Python class, but I couldn't seem to find it in the xbmc source. Is dialogaddonscan Windows-specific? In any case it meat that I couldn't add any new photos to the database. What's the plan going forward for the dependencies for mypicsdb?
#67
I havent test the dialogscan with anything else than windows so i can r tell you if it works with any platform. I hope it does !!

Once again the scanpath.py in the svn may not be functionnal. It uses the dialogscan addon which has been made by Frost on my request. It enables the use of a progress dialog displaying on screen but not taking the hand so that user can still use xbmc while scan is in progress.

Tonight i will commit for you and hopefully you can use it.

You say you use favourite item in the context menu. Can you explain me how you use it, for which purpose... Thanks.
#68
solexalex Wrote:I havent test the dialogscan with anything else than windows so i can r tell you if it works with any platform. I hope it does !!

Once again the scanpath.py in the svn may not be functionnal. It uses the dialogscan addon which has been made by Frost on my request. It enables the use of a progress dialog displaying on screen but not taking the hand so that user can still use xbmc while scan is in progress.

Tonight i will commit for you and hopefully you can use it.

Thanks. The version that you had in SVN (r128) definitely did not work on my Linux system (Fedora). I suspect that the dialogscan feature does depend on Windows-only features. Why not just use the built-in progress dialog? I believe it can be used in the background (at least the Music update progress bar works that way, although that's probably not Python-based).

Quote:You say you use favourite item in the context menu. Can you explain me how you use it, for which purpose... Thanks.

As an example, I could move the cursor to a month, say 2010-09, right-context-menu-click and add that month to my Favorites. Then I don't need to go through MyPicsDB in order to view that month, I just open up the favourites and click "2010-09" (I could also rename it as "Pics from Sep 2010" or somesuch).
#69
The builtin progress dialog you speak about is in the XBMC core and unfortunately unavailable from python. Frost did his best to use it without any success. It's sad because I wanted to use it so that it looks like video or audio scanning.
Anyway, Frost made it nice looking too and customizable. It even displays in any XBMC window you are showing.
The only dialogprogress available from python "take the hand" and the whole XBMC is unavailable during this time. I could scan in background but without any progress, it is not very nice as we don't know if it scans or not...
Be sure that, even if it does not work now for any other plateform than Windows, Frost likes good works, so he will change it as much as possible to make it plateform INdependant.

Quote:I could move the cursor to a month, say 2010-09, right-context-menu-click and add that month to my Favorites. Then I don't need to go through MyPicsDB in order to view that month,
OK I got it. I thought you wanted to add pictures from this month in the favourite menu. (to tell the truth, I don't find any interesting use of the favourite menu.... lol. The one you say is, I have to say, a good idea.)

Commited rev129
#70
solexalex Wrote:The builtin progress dialog you speak about is in the XBMC core and unfortunately unavailable from python. Frost did his best to use it without any success. It's sad because I wanted to use it so that it looks like video or audio scanning.
Anyway, Frost made it nice looking too and customizable. It even displays in any XBMC window you are showing.
The only dialogprogress available from python "take the hand" and the whole XBMC is unavailable during this time. I could scan in background but without any progress, it is not very nice as we don't know if it scans or not...
Be sure that, even if it does not work now for any other plateform than Windows, Frost likes good works, so he will change it as much as possible to make it plateform INdependant.

Got it. Bummer about not being able use to built-in progress dialog. Perhaps open up a trac bug to get the xbmc devs to expose it to Python? That might be the best long-term solution. Should I report the Windows-only nature of dialogprogress to Frost directly? or will you bring it up? Currently also your plugin is also being imported into the official XBMC.org Addons (which is where I first discovered it) as well as being on queeup. If the next version relies on dialogprogress, I guess you'll also have to request XBMC.org upstream to also add the dialogprogress to their git repo as well?

Quote:OK I got it. I thought you wanted to add pictures from this month in the favourite menu. (to tell the truth, I don't find any interesting use of the favourite menu.... lol. The one you say is, I have to say, a good idea.)

Yes, sorry, I should have been more clear. I envision this feature being used from within MyPicsDB, not from within Favorites.

Another useful feature alongside the view-by-date might be some prespecified queries such as "Today", "Yesterday", "Last 7 days", "Last month" and "Last import" (assuming the sqlite db can keep track of the files added to the db since the last scan). That would bring MyPicsDb on par with desktop photo viewing apps like f-spot, iPhoto and others and would make it very to check the most recent imports without having to scroll to the newer dates.
#71
fiveisalive Wrote:Perhaps open up a trac bug to get the xbmc devs to expose it to Python?
I don't know how to do that.... I don't felle good enough with english for this.
fiveisalive Wrote:That might be the best long-term solution. Should I report the Windows-only nature of dialogprogress to Frost directly? or will you bring it up?
I will do it. Did you try it with the new mypicsdb version in svn ? Does it works or not ? Do you have a log file for me ?
fiveisalive Wrote:Currently also your plugin is also being imported into the official XBMC.org Addons (which is where I first discovered it) as well as being on queeup. If the next version relies on dialogprogress, I guess you'll also have to request XBMC.org upstream to also add the dialogprogress to their git repo as well?
I don't know the queeup repository, I thought Frost put it inside XBMC.org repo, but it looks like not. I'll ask him to do it.
Maybe you can find it using the passion-xbmc repo (french team, Frost made it for me in passion-xbmc webforum). Here is the direct link to the zipped addon :
http://passion-xbmc.org/addons/Download....-1.0.4.zip
fiveisalive Wrote:Yes, sorry, I should have been more clear. I envision this feature being used from within MyPicsDB, not from within Favorites.
OK now I don't understand ! lol

fiveisalive Wrote:Another useful feature alongside the view-by-date might be some prespecified queries such as "Today", "Yesterday", "Last 7 days", "Last month" and "Last import" (assuming the sqlite db can keep track of the files added to the db since the last scan). That would bring MyPicsDb on par with desktop photo viewing apps like f-spot, iPhoto and others and would make it very to check the most recent imports without having to scroll to the newer dates.
Excellent Idea ! I'll code it, maybe I have to reorganize the whole menu later.

thank you
#72
solexalex Wrote:I don't know how to do that.... I don't felle good enough with english for this.
I can file the bug on http://trac.xbmc.org/ on your behalf. I'll post the link back here.

Quote:I will do it. Did you try it with the new mypicsdb version in svn ? Does it works or not ? Do you have a log file for me ?
Haven't had a chance to check out r129 from SVN yet. When I do, I'll send you a log file with the error.

Quote:I don't know the queeup repository, I thought Frost put it inside XBMC.org repo, but it looks like not. I'll ask him to do it.
Maybe you can find it using the passion-xbmc repo (french team, Frost made it for me in passion-xbmc webforum). Here is the direct link to the zipped addon :
http://passion-xbmc.org/addons/Download....-1.0.4.zip
Sorry, maybe it was passion-xbmc that I was thinking of, either way it isn't in the official XBMC.org repo AFAICT, here's the git repo for scripts.*:

http://xbmc.git.sourceforge.net/git/gitw...dharma-pre

Quote:OK now I don't understand ! lol
Meaning: within MyPicsDb the right-context menu for the date period, e.g. whether the entire year "2010", the month "2010-09" or the day "2010-09-27" should include "Add to favorites". This will create a "bookmark" in favorites. As opposed to opening up "Favorites" and trying to link to a date perod MyPicsDB (which doesn't work anyway).

Quote:Excellent Idea ! I'll code it, maybe I have to reorganize the whole menu later.
thank you
Great!
#73
waiting for your feedbacks, I just started to add this new feature :
Last month
Last 100

I think I will add an item that will display only if the database contains pictures taken the same day but year(s) ago. Smile
#74
solexalex Wrote:waiting for your feedbacks, I just started to add this new feature :
Last month
Last 100

I think I will add an item that will display only if the database contains pictures taken the same day but year(s) ago. Smile

I think also "Last week" and "Last import" (perhaps call it "New images") would also be good (i.e. all pics added since the last scan), so you could jump to the new photos.

Also I have now updated to SVN r129, and here's the error from the ~/.xbmc/temp/xbmc.log:

Code:
19:01:26 T:140291684169488 M:2972856320   DEBUG: Process - Entering source directory /home/myth/.xbmc/addons/plugin.image.mypicsdb
19:01:26 T:140291684169488 M:2972856320   ERROR: dll_fstat64 emulated function failed
19:01:26 T:140292101482256 M:2972856320    INFO: -->Python script returned the following error<--
19:01:26 T:140292101482256 M:2972856320   ERROR: Error Type: exceptions.NameError
19:01:26 T:140292101482256 M:2972856320   ERROR: Error Contents: name 'WindowsError' is not defined
19:01:26 T:140292101482256 M:2972094464   ERROR: Traceback (most recent call last):
                                              File "/home/myth/.xbmc/addons/plugin.image.mypicsdb/scanpath.py", line 58, in ?
                                                from DialogAddonScan import AddonScan
                                              File "/home/myth/.xbmc/addons/script.module.dialogaddonscan/lib/DialogAddonScan.py", line 9, in ?
                                                from gui import Window
                                              File "/home/myth/.xbmc/addons/script.module.dialogaddonscan/lib/gui.py", line 29, in ?
                                                class xbmcguiWindowError( WindowsError ):
                                            NameError: name 'WindowsError' is not defined
19:01:26 T:140292101482256 M:2972094464    INFO: -->End of Python script error report<--

I am using the dialogaddonscan from the passion repo (1.0.4) you sent me. Although this particular addon doesn't appear in the addon browser, so I had to add it manually by downloading it.
#75
Quote: class xbmcguiWindowError( WindowsError ):
NameError: name 'WindowsError' is not defined
grrr a stupide error created by me 'WindowsError' is for windows only

for a moment. change WindowsError for Exception and WindowsError.__init__( self, winError ) for self.winError = winError

soon I fixe it

sorry
For my bad English, sorry. I am French Canadian.
Admin @ Passion-XBMC.org
  • 1
  • 3
  • 4
  • 5(current)
  • 6
  • 7
  • 27

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