Release Screensaver for My Pictures Database addon
#1
Hi All,
I built a really simple screensaver that displays pictures that are stored by the My Pictures Database addon. If you have saved any filters in the My Pictures Database addon, then you can set the screensaver to only show pictures that match a saved filter.
The screensaver is very basic, with almost no options.
I've only tested it with Kodi version 19.4 and with plugin.image.mypicsdb2 version 19.4.4. I'm pretty sure it won't work with versions earlier than these.
I hope you might find it worth trying.

Thread for it is here: 371938 (thread)
Reply
#2
Hello
Just wanted to say thanks you, I have installed your addon and it works perfectly well.
My database is pretty large (50K pictures) and no issue at all with that.
Using of "Filters" is cool Cool !
Reply
#3
.... sorry duplicate ...
See next post
Reply
#4
Hello,

I have been using your screensaver with success and like it !

maybe you can guide me a bit there ...

I have my own customized SlideShow.xml file that I use when lauching a slideshow from MyPicsDB2 or standard picture viewing.

Compared to the standard one, I introduced "label" additions like :

                <control type="label">
                        <description>Commentaire et Date PP</description>
                        <posx>20</posx>
                        <posy>60r</posy>
                        <width>1880</width>
                        <height>50</height>
                        <align>center</align>
                        <aligny>center</aligny>
                        <font>font45_title</font>
                        <textcolor>orange</textcolor>
                        <label>$INFO[Slideshow.EXIFDescription]  -  $INFO[Slideshow.EXIFComment]</label>
                        <animation effect="fade" time="1000">WindowOpen</animation>
                        <animation effect="fade" time="1000">WindowClose</animation>
                </control>

This allows me to show on the fly at the bottom of the picture the date and place it was taken (which I added as EXIF Description and Comment in each stored picture).

I tried to add this "label" block to your own screensaver.mypicsdb2.slideshow.xml file but I only manage to get the orange/middle dash (-) showing as text but no EXIFDescription before nor EXIFComment after.

Looks like the:     $INFO[Slideshow.EXIFDescription] etc.. are  not found or empty when launched via the addon screensaver...

Any idea what I might miss here ?
Reply
#5
Quote:I tried to add this "label" block to your own screensaver.mypicsdb2.slideshow.xml file but I only manage to get the orange/middle dash (-) showing as text but no EXIFDescription before nor EXIFComment after.

Looks like the:     $INFO[Slideshow.EXIFDescription] etc.. are  not found or empty when launched via the addon screensaver...

Any idea what I might miss here ?
Hi,
The screensaver isn't really a slideshow, so the Kodi built in infolabels for slideshows won't work with it.
I updated the screensaver to create some window properties you can use in the screensaver xml file. New file is in a new thread here: 371938 (thread)
I also added the option to display all of the properties that I made available, so you can just use that, or customize the xml yourself.
The My Pictures Database addon doesn't use the same tag names as Kodi slideshow, so I'm not sure what EXIFDescription and EXIFComment would correspond to in the addon's tags.
I exposed Headline, Caption, Location, Date and Time, and Folder and File name. Probably Headline and Caption correspond to EXIFDescription and EXIFComment.
The location is actually four tags -- Sublocation, City, State, and Country.  If those tags are set in your images, they will be available in the screensaver.
Let me know if you need any help.
Reply
#6
(2023-02-11, 04:43)sfontes Wrote:
Quote:I tried to add this "label" block to your own screensaver.mypicsdb2.slideshow.xml file but I only manage to get the orange/middle dash (-) showing as text but no EXIFDescription before nor EXIFComment after.

Looks like the:     $INFO[Slideshow.EXIFDescription] etc.. are  not found or empty when launched via the addon screensaver...

Any idea what I might miss here ?
...
I updated the screensaver to create some window properties you can use in the screensaver xml file. New file is in a new thread here: 371938 (thread)
....

Thank you for taking the time, this is great !

In the mean time I had work on my own copy of your code and manage to achieve my goal. I hope you don't mind ! 
What I do is read the EXIF parameters of each image on the fly and :
   - extract/format the date taken DateTimeOriginal (it was my EXIF UserComment tag).
   - extract the last level folder from the image path (it corresponds to my EXIF ImageDescription tag and in my case more or less the place where the picture was taken). Most of my picture do not have true location data....
Then I display this as additional bottom label for each image via a modified screensaver xml file.
Of course all this works well for me but it is a bit specific  Wink. Probably better to rely on database/addon's tags ! 

Anyway for sure I will look into your new version to see if it could fit my context. That would be much better of course...

Small question :  in case I must continue with a personal version, do you have your sources available on Github, it would be easier just to fork from it and build clean mods onto it.
Reply
#7
Hello !

@sfontes    just following-up.

I did not find close enough tags (vs Exif ImageDesciption and Exif UserComment I mean...) among those automatically stored in the database.
specially the Headline or Caption or others never really match ImageDescription. Moreover in my case at least they are only populated for a handfull of pictures. Not sure why...

From StrPath (idTagType 7) and Exif DateTimeOriginal (idTagType 11) I could rebuild something equivalent to my need but it still requires some filtering/formatting before display.
More of less what I did in my current mod.
Exif DateDateOriginal has some limits though because it does not exist at all for my old scans (hence why I used and populated the UserComment tag to insert a preformated date in all my pictures).

Clearly my need here is very specific  Wink

Still it can be an idea to restart from your very last version and only add the formatting/cosmetics mods (and get rid of my own extra ExifRead stuff...). I'll think of it.

Thank you for all the good work on this !
Reply
#8
@sfontes 

I have tried applying my personal mods on top of your 1.1.0 version (the one with mySQL support and info tags display), so I here is some feedback.

Result is mixed : it works OK for me when not activating the infotag option.

When I do activate the option I get 2 errors :

- first :  _ids seems to be returned empty for 'headline' tagtype in the get_settings routine. In fact when browsing my database, only 'Caption/abstract' exist as a tagtype. None of the others you have selected exist in my case. Not sure why... but it creates the error obviously.
I quickly fixed this by adding a test to verify that _ids from sql query is not empty before setting the respective toggle.

- second :  with above fixed, a new error popped up about date-time conversion. See below from kodi log, looks like my file date format is not YYYYMMDD... Probably YYYYDDMM or  DDMMYYYY?
Quote:2023-03-05 17:12:00.198 T:17221    INFO <general>: Loading skin file: /home/osmc/.kodi/addons/screensaver.mypicsdb2.slideshow/resources/skins/default/1080i/screensaver.mypicsdb2.slideshow.xml, load type: LOAD_ON_GUI_INIT
2023-03-05 17:12:01.465 T:17912   ERROR <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                   Error Type: <class 'ValueError'>
                                                   Error Contents: time data '' does not match format '%Y-%m-%d %H:%M:%S'
                                                   Traceback (most recent call last):
                                                     File "/home/osmc/.kodi/addons/screensaver.mypicsdb2.slideshow/lib/screensaver.py", line 110, in onInit
                                                       self._start_show()
                                                     File "/home/osmc/.kodi/addons/screensaver.mypicsdb2.slideshow/lib/screensaver.py", line 213, in _start_show
                                                       self._set_info_fields(picture)
                                                     File "/home/osmc/.kodi/addons/screensaver.mypicsdb2.slideshow/lib/screensaver.py", line 333, in _set_info_fields
                                                       self._set_prop('Date',time.strftime('%A %B %e, %Y',time.strptime(file_info[0][1], '%Y-%m-%d %H:%M:%S')))
                                                     File "/usr/lib/python3.9/_strptime.py", line 562, in _strptime_time
                                                       tt = _strptime(data_string, format)[0]
                                                     File "/usr/lib/python3.9/_strptime.py", line 349, in _strptime
                                                       raise ValueError("time data %r does not match format %r" %
                                                   ValueError: time data '' does not match format '%Y-%m-%d %H:%M:%S'
                                                   -->End of Python script error report<--

I leave it to you what to do with this, if it worth fixing or not.

I don't have the the proper Tags in the list anyway, so I will keep my own mod for that part.

But the mySQL support is indeed important!
Reply

Logout Mark Read Team Forum Stats Members Help
Screensaver for My Pictures Database addon0
This forum uses Lukasz Tkacz MyBB addons.