Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
  • 1
  • 5
  • 6
  • 7(current)
  • 8
  • 9
  • 32
Library Auto Updater - Version 1.1.0
#91
(2012-05-03, 11:48)Zapa Wrote: When cleaning the library and checking source paths first, a dvd-drive is registered as a broken source, when there are no dvd in it
is it possible to check if content typs, on the source, is set?

To make this run smoothly, the only solution I have found, is to delete the dvd-drive as source

I've checked every place I can think of (jsonrpc, python module commands, built in functions) and I can't seem to find a way to get the content type of a path. The JSON commands used to get the sources only return the label and full file path. Even if we could do this what happens if the root source is not where you set the content? I know sometimes I'll add a source to a root /video path that has subfolders for TV and Movies and then set the path on those?

I'd be happy if someone could prove me wrong here but I don't see a straightforward way to do this.
Reply
#92
ive got a problem that the cleaning section doesnt find the paths, heres a log of one for the TV-Shows. It does update them correctly, just not clean

NOTICE: service.libraryautoupdate: Path smb://TWILIGHT-ZONE/TV-Shows.720p.X264/ does not exist
Reply
#93
(2012-06-02, 04:55)MidKnight Wrote: ive got a problem that the cleaning section doesnt find the paths, heres a log of one for the TV-Shows. It does update them correctly, just not clean

NOTICE: service.libraryautoupdate: Path smb://TWILIGHT-ZONE/TV-Shows.720p.X264/ does not exist

The cause of that error (see code below) is when you have the verify paths option turned on, and the xbmc virtual file system cannot verify that the path exists, according to how that function operates. In short - this is exactly the behavior that this check is meant to do. If the virtual file system cannot find the path, odds are that cleaning the library will remove it anyway. Granted, this isn't a 100% certainty, but it is using the built in xbmc function to verify the path, so that must mean xbmc is having a problem checking if it is available, in some way shape or form.

If you look at the code below from this section of the addon you'll see there isn't a whole lot I can do about this as the xbmcvfs library is not maintained by me. If you really feel that this is in error I would try posting something on the bugtracker about it.

Code:
if not xbmcvfs.exists(source['file']):
                    #let the user know this failed, if they subscribe to notifications
                    if(self.Addon.getSetting('notify_next_run') == 'true'):
                        xbmc.executebuiltin("Notification(Error Cleaning Databse,Source " + source['label'] + " does not exist,4000," + xbmc.translatePath(self.addondir + "/resources/images/clock.png") + ")")

                    self.log("Path " + source['file'] + " does not exist")
                    return
Reply
#94
ok thanks. I dont have any problems when using the clean method manally run from xbmc, so ill just have to keep doing that. thanks anyway Wink
Reply
#95
(2012-06-03, 05:07)MidKnight Wrote: ok thanks. I dont have any problems when using the clean method manally run from xbmc, so ill just have to keep doing that. thanks anyway Wink

If it is working fine just running it manually I would just unchecked the verify sources option. It is really only there for users that are concerned about connectivity issues. It is probably unneeded by most people. Unchecking that option will just launch a normal clean.
Reply
#96
i cant run it that way, as these shares are on a nas server, so if it was launched while the box was turned off, it would delete all the library.
Reply
#97
(2012-03-27, 02:26)robweber Wrote:
(2012-03-27, 00:36)Radikaltimes Wrote: is there a way to add clean library to the process?

Adding the function to clean the database is pretty trivial. The problem I found when trying to add this earlier is that there is no way to tell if a database clean operation is happening (like you can with scanning) so it is possible to hose up the xbmc process by executing it while another is already running. I did a test case with a cron expression set to run fairly often, like every 10 minutes, and locked up xbmc. Granted you wouldn't set them off that close together, but what happens if a clean operation takes 1-2 hours and another kicks off?

I've thought about how to get around this and the best I can think of is to only allow the clean database function to execute minimum once every 24 hours. Another option you have is add a setting to the advancedsettings file that does a clean immediately following an update. http://wiki.xbmc.org/index.php?title=Adv...library.3E

I guess that was just a really long way of saying that I've been working on it. Having a variable to check like there is with scanning to tell if it is running or not would be a big help.

I am looking for the same solution.. detecting if the CleanLibrary function is running. Did you have any luck with this?
Reply
#98
It looks like this commit changed the behavior of the cleanup operation. Now the video scanner class launches and "monitors" the cleanup so a check on isScanning should check for updates or clean operations.

Unfortunately this was not done in time for Eden but is in the pre-frodo code. Since none of the commands in this addon are run while isScanning returns true this feature will help in detecting clean operations without modifying the addon if you use a nightly build or when frodo becomes available.

https://github.com/xbmc/xbmc/commit/ddb0...f9678f65fc
Reply
#99
(2012-06-17, 03:12)robweber Wrote: It looks like this commit changed the behavior of the cleanup operation. Now the video scanner class launches and "monitors" the cleanup so a check on isScanning should check for updates or clean operations.

Unfortunately this was not done in time for Eden but is in the pre-frodo code. Since none of the commands in this addon are run while isScanning returns true this feature will help in detecting clean operations without modifying the addon if you use a nightly build or when frodo becomes available.

https://github.com/xbmc/xbmc/commit/ddb0...f9678f65fc

Thanks Rob. I guess I will fudge my script until Frodo comes out. Is the name of the function Library.IsScanning or Library.IsScanningVideo for video files?
Reply
In python the full command I'm using is:

Code:
xbmc.getCondVisibility('Library.IsScanningVideo')

You can substitute 'video' for 'music' if you want to check that as well.
Reply
(2012-06-02, 20:51)robweber Wrote:
Code:
if not xbmcvfs.exists(source['file']):
                    #let the user know this failed, if they subscribe to notifications
                    if(self.Addon.getSetting('notify_next_run') == 'true'):
                        xbmc.executebuiltin("Notification(Error Cleaning Databse,Source " + source['label'] + " does not exist,4000," + xbmc.translatePath(self.addondir + "/resources/images/clock.png") + ")")

                    self.log("Path " + source['file'] + " does not exist")
                    return

Using
Code:
if not os.path.exists(source['file']):
instead works for me with smb:// paths and maped units on win7.

BR and good work
Reply
(2012-04-23, 23:22)teevee Wrote: Do you know if there is any way to hide the "Cleaning Up Library" notification window? I have the add-on perform a cleanup after every update, and would rather have not have the notification appear. I have this set to update the library even if something is currently playing, which means the notification will even appear on top of what I'm watching.
I'm experiencing the exact same issue. Has someone found a solution or workaround for this?
Reply
I wonder if it is possible to have a delay of the update? I like that it updates automagically when i change a filename. But if i change a lot of filenames it triggers several updates. That don't seem necessary. And with that notification window popping up it is also a little annoying. It would be great if the updates is triggered like maybe 10-15 seconds after the last filechange?

Also, would be nice if the notification window is not shown at all. Like the above suggestion.
Reply
(2012-09-05, 11:12)raptorjr Wrote: I wonder if it is possible to have a delay of the update? I like that it updates automagically when i change a filename. But if i change a lot of filenames it triggers several updates. That don't seem necessary. And with that notification window popping up it is also a little annoying. It would be great if the updates is triggered like maybe 10-15 seconds after the last filechange?

Also, would be nice if the notification window is not shown at all. Like the above suggestion.

This addon works on an interval timer, it doesn't actually monitor any of your file sources for changes. In the settings you can set the timer to be at an interval you find appropriate, and it will then scan at those times. Changing file names does not trigger an update in any way, but all changes will be found the next time an update is run.

You can also disable the notification in the settings if you don't want to see it, depending on the skin I can see how the notifications can get annoying. You'll need to change an advanced setting if you don't wish to see the library scanning windows as well, this is an xbmc specific thing (http://wiki.xbmc.org/index.php?title=Use...library.3E) The only window you can't disable is the one that pops up when a Clean operation is happening. There just isn't a setting for it in xbmc.

Reply
Maybe you're talking about Library Watchdog. Thats the one monitoring filesystem for changes.

Reply
  • 1
  • 5
  • 6
  • 7(current)
  • 8
  • 9
  • 32

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