• 1
  • 22
  • 23
  • 24(current)
  • 25
  • 26
  • 32
Library Auto Updater - Version 1.1.0
Cheers all,
First thanks for the dev for this great addon. Really one of the best.
I have a small question hoping somebody could help out.
Is there a way to increase the number of custom video paths to be more than 3.
I need to have 6 custom paths in order to avoid scanning whole drives that will only have 1 of its directories having new files to update.
Also, if a whole drive is chosen and it contains non-media files/directories, what will scan yield ?
Appreciate any ideas and help from you guys.
Again, thanks a lot to the dev for this great addon.
Reply
Just thought I'd update, my questions regarding picture slideshow updates. Unfortunately it would appear that the default picture slideshow does not update.

I launched the slideshow, added a couple pictures to the remote folder where the slideshow is coming from, and waited a few hours. I deleted a file, hoping to 'trick' the system into a refresh, but that didn't work either. This is with openelec on raspi.

I'm going to explore other picture addons that might work, or as a last resort some script to restart the pi every hour
Reply
(2015-11-24, 16:14)accacc5 Wrote: Cheers all,
First thanks for the dev for this great addon. Really one of the best.
I have a small question hoping somebody could help out.
Is there a way to increase the number of custom video paths to be more than 3.
I need to have 6 custom paths in order to avoid scanning whole drives that will only have 1 of its directories having new files to update.
Also, if a whole drive is chosen and it contains non-media files/directories, what will scan yield ?
Appreciate any ideas and help from you guys.
Again, thanks a lot to the dev for this great addon.

Thanks for reminding me of this, I made a ticket for more paths a while back and just forgot. You can now create a custom_paths.xml file and it will read in your paths. This makes it so you can create a potentially unlimited list of custom path and schedule options. Right now this is just in the github version. If you can test and confirm I'll push it to the Kodi repo. Instructions are in the ReadMe file.

As far as your other question about the full drive scan. I have no idea what will happen. I am under the impression that you have to give a path already scanned in to your sources to the "Update Library()" command. I imagine if you've set the whole drive as your library source it will scan it. If you didn't, it probably won't do anything. It's important the paths line up.
Reply
(2015-11-30, 19:26)robweber Wrote:
(2015-11-24, 16:14)accacc5 Wrote: Cheers all,
First thanks for the dev for this great addon. Really one of the best.
I have a small question hoping somebody could help out.
Is there a way to increase the number of custom video paths to be more than 3.
I need to have 6 custom paths in order to avoid scanning whole drives that will only have 1 of its directories having new files to update.
Also, if a whole drive is chosen and it contains non-media files/directories, what will scan yield ?
Appreciate any ideas and help from you guys.
Again, thanks a lot to the dev for this great addon.

Thanks for reminding me of this, I made a ticket for more paths a while back and just forgot. You can now create a custom_paths.xml file and it will read in your paths. This makes it so you can create a potentially unlimited list of custom path and schedule options. Right now this is just in the github version. If you can test and confirm I'll push it to the Kodi repo. Instructions are in the ReadMe file.

As far as your other question about the full drive scan. I have no idea what will happen. I am under the impression that you have to give a path already scanned in to your sources to the "Update Library()" command. I imagine if you've set the whole drive as your library source it will scan it. If you didn't, it probably won't do anything. It's important the paths line up.

Thanks robweber for your reply.
I created the custom_paths.xml files as per instructions, saved it in userdata/addon_data/service.libraryautoupdate. When I open the addon settings, it still shows the original setup and not the custom_paths parameters. This is a sample line from what I have in the custom_paths file:
<path name="path 2" >"H:\Movies"</path>
It seems it doesn't read the new file.
Any ideas ?
Thanks again for your help.
Reply
2 Things:

1) You have to put the cron value in the tag like this:

Code:
<path name="path2" cron="* */5 * * *">H:\Movies</path>

Without the cron value it won't work (and probably throws and error).

2) You won't see these paths in the settings. The settings are hard-coded so there are only 3 listed. The ones you put in this file are read in at runtime but you won't see them in the GUI. You can check the log if you want to make sure they are being read.
Reply
(2015-12-01, 16:57)robweber Wrote: 2 Things:

1) You have to put the cron value in the tag like this:

Code:
<path name="path2" cron="* */5 * * *">H:\Movies</path>

Without the cron value it won't work (and probably throws and error).

2) You won't see these paths in the settings. The settings are hard-coded so there are only 3 listed. The ones you put in this file are read in at runtime but you won't see them in the GUI. You can check the log if you want to make sure they are being read.

thanks rob for your help. I added the cron values and it worked. It also seems that I had to downlaod the latest version from github.
Thanks again for your interest and helpful replies and a real practical useful addon.
Reply
No problem. Glad you got it working. The github version is the only place these changes are working for now. Now that you have it working as well (not just me) I'll get it pushed to the main repo.
Reply
(2015-12-01, 18:39)robweber Wrote: No problem. Glad you got it working. The github version is the only place these changes are working for now. Now that you have it working as well (not just me) I'll get it pushed to the main repo.

One more question rob please.
Assume I add a new path with a cron job to run every 5 hours. I start XBMC, before the job runs I shut off XBMC, an hour later I run XBMC again...so at which point does the timer start counting the 5 hours interval ? does it count from the frist time running XBMC after adding the cron job or it keeps on starting the timer each time I shut down XBMC and run it again later ?
Because the latter will cause the timer to be always starting from zero and never reach the 5 hours mark.
I am asking because after testing like I told you with 1 custom path and had it run, i added 5 more custom paths but when i start XBMC the notification is only about path 1 and nothing about the new 5 paths i added.
Thanks again.
Reply
(2015-12-01, 18:39)robweber Wrote: No problem. Glad you got it working. The github version is the only place these changes are working for now. Now that you have it working as well (not just me) I'll get it pushed to the main repo.

Dea rob, as I find your addon very useful and one of the best addons, i am trying to give you as much feedback as possible in regards to my experience with it so you could enhance it even more.
One issue i found using custom paths is the following:
The addon doesn't update subdirectories included in a custom path directory. Example: Directory H:\Movies contains several subdirectories each for a different movie. When a new subdirectory (ex: H:\Movies\Everest) is created and the movie file is inside it, the addon doesn't get it (not added to library). If i run a normal update (from within XBMC) the movie is added.
I think you should look into this as it is impossible to create a custom path before each new movie is added.
Thanks again and all my best.
Reply
Hi all, just found out the cause of the issue mentioned in my above message when using custom_paths xml file to specify your directories...thought it might help others.
The issue is, if the directory name, example H:\Movies, does not include spaces in the name, DO NOT use quotation marks. Quotation marks are ONLY for directories with spaces in the name like H:\TV Shows which should be written with quotation marks to work like this "H:\TV Shows".
Cheers to all and many that to robweber for his work and effort.
Reply
Thanks for your feedback. I'll try to answer all your questions, if something isn't working as you'd expect please let me know how it could be made more intuitive.

Regarding the "starting point" for when the timer starts. There is an ongoing counter that is stored in the addon_data folder for this addon. After each database run it saves the last time an update (for any timer) was executed. This is used as the "start time" when calculating all subsequent runs. As an example, if you create something for every 5 hours and start the addon for the first time it will use 0 as the start point (Unix Epoch Time) and run an update. After the update it will store the time it ran and use that time to calculate the next run, 5 hours from that time. If you turn off Kodi for 2 hours and then turn it back on again, it will calculate 5 hours from the original time - so 3 hours left. This is how it figures out if it misses a run, if you turn the program off for 10 hours and turn it back on, it will realize it missed one and start the scan. Then it will update the last run time and re-calculate the next 5 hour interval. Make sense?

The notifications are you are seeing may be a bit confusing. It only shows a notification for the next scheduled run time. If you have 5 timers set, you'll see a notification for the next one that is to run. When that one goes, it finds the next in line and does that one. This is just to decrease the amount of notification spam you're getting.

Sounds like you fixed the sub directory issue you had right? I hope so, since that is something to do with the Kodi core scanning function, I'm simply passing in the path you give to it. It should do sub directories if given the right path. If it doesn't let me know.
Reply
(2015-12-02, 16:32)robweber Wrote: Thanks for your feedback. I'll try to answer all your questions, if something isn't working as you'd expect please let me know how it could be made more intuitive.

Regarding the "starting point" for when the timer starts. There is an ongoing counter that is stored in the addon_data folder for this addon. After each database run it saves the last time an update (for any timer) was executed. This is used as the "start time" when calculating all subsequent runs. As an example, if you create something for every 5 hours and start the addon for the first time it will use 0 as the start point (Unix Epoch Time) and run an update. After the update it will store the time it ran and use that time to calculate the next run, 5 hours from that time. If you turn off Kodi for 2 hours and then turn it back on again, it will calculate 5 hours from the original time - so 3 hours left. This is how it figures out if it misses a run, if you turn the program off for 10 hours and turn it back on, it will realize it missed one and start the scan. Then it will update the last run time and re-calculate the next 5 hour interval. Make sense?

The notifications are you are seeing may be a bit confusing. It only shows a notification for the next scheduled run time. If you have 5 timers set, you'll see a notification for the next one that is to run. When that one goes, it finds the next in line and does that one. This is just to decrease the amount of notification spam you're getting.

Sounds like you fixed the sub directory issue you had right? I hope so, since that is something to do with the Kodi core scanning function, I'm simply passing in the path you give to it. It should do sub directories if given the right path. If it doesn't let me know.


thanks rob for being there as usual with your support mate. Of course the way the counter works makes sense, it is the logical approach and wouldn't have it any other way Smile
Now everything is running fine with your amazing practical addon.
There is still an issue when scanning that I came across though:
If I have a new file which is an old movie for example, it is put in windows with the "date modified" stamp in the past (like 3 months ago for example) because the file was old and this is its time stamp, the "date created" time stamp is the current actual date. The thing is it doesn't get scanned when the addon runs. I guess it somehow sees the "date modified" as before the last run time and thus doesn't see it as a new file.Does the script base its scans on "date modified" or "Date Created" time stamp of the files? It is not an issue of XBMC as a normal library scan gets it.
Any ideas on this issue ?
Thanks again for your help.
Reply
Another issue rob, thought to tell you so you might find a solution for it.
As I mentioned couple of posts ago, that the directory with no namesapce in it works without quotation marks and this makes the scan see the subdirectories (my example was "H:\Movies\Everest"), now WHEN a subdirectory has namesapces like for example The Martian it doesn't get scanned ! putting quotation marks on the main directory in the custom_paths doesn't solve it. It only works if the namespaces are removed or replaced by something like a "." (ex:The.Martian). The way the addon interacts with XBMC is a bit confusing as all these issues don't happen using the XBMC "scan for new content" method. I hope you could look into this also with what I wrote in my previous post. I really hate to see such a practical and useful addon having those issues that hurt its purpose and usefulness to all of us using it. I hope you take my feedback as a small effort to help out as much as I can and accept my apologies for disturbing you so many times.
Reply
Really like this add-on. Thank you for your hard work on it! Have run into a couple issues on version 0.9.8 that thought you should be aware of.

1) Cleaning - Can't seem to set cron schedule on cleaning via the GUI. Whenever I navigate to the cleaning tab in the settings and select "Cron Expression" for the cleaning frequency the 'Video Cron Expression' and 'Music Cron Expression' fields are displayed but are not enabled (grayed out). I've attempted different library to clean combinations and can't seem to enable it. I've noted this behavior on both an OpenElec (latest build) as well as my Windows (16B4) systems. Manually setting the cron via the settings.xml file works fine. Just would be nice to not have to manually edit the file.

2) Cron Syntax - Using the GUI I attempted to set the Video library to update ever 30 minutes starting at 10 minutes after the hour. For this I chose to use a step value entry (10/30). Entering the expression into the GUI is quick and easy. Unfortunately upon restarting Kodi the add-on fails throwing an exception error. See sample error log and settings xml below. From my tests it looks like the error is only encountered when attempting to use a step value so I'd say it is the '/' that is causing the exception.

NOTE: For newbies like me, a great site for checking the cron syntax is; http://crontab.guru/

NOTE: With your add-on I've been able to set up a window to update my libraries at a desired interval and then outside of the update window set cleaning to the time of my choosing in a configuration that I can easily transfer from system to system (Linux or Windows). Thanks again!

EXCEPTION ERROR FROM LOG
------------------------------------------------------------------------------------------------------------------------------
15:18:38 T:9920 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.KeyError'>
Error Contents: ('10/30',)
Traceback (most recent call last):
File "C:\Users\XXXXXX\AppData\Roaming\Kodi\addons\service.libraryautoupdate\default.py", line 6, in <module>
AutoUpdater().runProgram()
File "C:\Users\XXXXXX\AppData\Roaming\Kodi\addons\service.libraryautoupdate\service.py", line 35, in __init__
self.createSchedules(True)
File "C:\Users\XXXXXX\AppData\Roaming\Kodi\addons\service.libraryautoupdate\service.py", line 162, in createSchedules
aSchedule.next_run = self.calcNextRun(aSchedule.expression,self.last_run)
File "C:\Users\XXXXXX\AppData\Roaming\Kodi\addons\service.libraryautoupdate\service.py", line 231, in calcNextRun
cron = croniter(cronExp,startTime)
File "D:\Users\XXXXXX\AppData\Roaming\Kodi\addons\service.libraryautoupdate\resources\lib\croniter.py", line 93, in __init__
t = self.ALPHACONV[i][t.lower()]
KeyError: ('10/15',)
-->End of Python script error report<--

SAMPLE SETTINGS.XML
------------------------------------------------------------------------------------------------------------------------------
<settings>
<setting id="clean_libraries" value="true" />
<setting id="clean_music_cron_expression" value="0 4 * * *" />
<setting id="clean_timer" value="1" />
<setting id="clean_video_cron_expression" value="0 2 * * *" />
<setting id="custom_1_advanced_timer" value="false" />
<setting id="custom_1_cron_expression" value="0 * * * *" />
<setting id="custom_1_scan_path" value="" />
<setting id="custom_1_timer" value="0" />
<setting id="custom_2_advanced_timer" value="false" />
<setting id="custom_2_cron_expression" value="0 * * * *" />
<setting id="custom_2_scan_path" value="" />
<setting id="custom_2_timer" value="2" />
<setting id="custom_3_advanced_timer" value="false" />
<setting id="custom_3_cron_expression" value="0 * * * *" />
<setting id="custom_3_scan_path" value="" />
<setting id="custom_3_timer" value="2" />
<setting id="disable_manual_prompt" value="false" />
<setting id="help_button" value="" />
<setting id="library_to_clean" value="1" />
<setting id="music_advanced_timer" value="false" />
<setting id="music_cron_expression" value="0 * * * *" />
<setting id="music_timer" value="2" />
<setting id="notify_next_run" value="false" />
<setting id="run_during_playback" value="false" />
<setting id="run_on_idle" value="true" />
<setting id="startup_delay" value="0" />
<setting id="update_music" value="false" />
<setting id="update_video" value="true" />
<setting id="use_custom_1_path" value="false" />
<setting id="use_custom_2_path" value="false" />
<setting id="use_custom_3_path" value="false" />
<setting id="user_confirm_clean" value="false" />
<setting id="video_advanced_timer" value="true" />
<setting id="video_cron_expression" value="10/30 0-1,5-23 * * *" />
<setting id="video_timer" value="0" />
</settings>
Reply
(2016-01-08, 05:48)ac_car Wrote: Really like this add-on. Thank you for your hard work on it! Have run into a couple issues on version 0.9.8 that thought you should be aware of.

1) Cleaning - Can't seem to set cron schedule on cleaning via the GUI. Whenever I navigate to the cleaning tab in the settings and select "Cron Expression" for the cleaning frequency the 'Video Cron Expression' and 'Music Cron Expression' fields are displayed but are not enabled (grayed out). I've attempted different library to clean combinations and can't seem to enable it. I've noted this behavior on both an OpenElec (latest build) as well as my Windows (16B4) systems. Manually setting the cron via the settings.xml file works fine. Just would be nice to not have to manually edit the file.

I'm running in the same problem, anyway to fix this?
Reply
  • 1
  • 22
  • 23
  • 24(current)
  • 25
  • 26
  • 32

Logout Mark Read Team Forum Stats Members Help
Library Auto Updater - Version 1.1.00