[MOD] FileCleaner with show selection
#1
This is a mod of the xbmcfilecleaner service.
The purpose is to add functionality for show exceptions for TV Show deletion.

EDIT: I have release a new version (0.1.0) with a GUI for show selection.
I have also created a new thread in the proper sub section.
http://forum.xbmc.org/showthread.php?tid=132527


I am working on the GUI. For the moment the exceptions have to be added in the db.
You can also use it exactly as the orginal by changing default to delete.

I have now re-applied my mod to the WIP eden version of the xbmcfilecleaner.
It is an early version, be very careful!


If you want to test my version you need to set up the shows manually in e.g. sqliteman.
Or change default to delete and it will work as the original addon (all shows monitored).
However, it is not recommended to do that AND apply exception as it is very risky.

Do not use more than one version of the filecleaner at once!


Example:
Configure a show to be auto deleted:
-----------------------------
attach '/home/vikjon0/.xbmc/userdata/Database/MyVideos34.db' as xbmc
attach '/home/vikjon0/.xbmc/userdata/addon_data/script.filecleaner/addon.db' as addon

--Add shows to monitor (0=do not delete;1=delete;2=default)
insert into tvshowsettings
select idShow,c00,1 from tvshow
where c00 like '%Blue%'
-----------------------------------
Add all shows except glee and game of thrones

insert into tvshowsettings
select idShow,c00 ,1 from tvshow
where not (c00 like '%Game%' or c00 like '%Glee%' )
and idShow not in (select idShow from tvshowsettings)
Reply
#2
..
Reply
#3
..
Reply
#4
I have re-applied my mod to the WIP eden version of the xbmcfilecleaner.

It is an early version, be very careful!
Still no gui, but it is coming.

You can install it from my repository
https://github.com/vikjon0/qf-xbmc-addons/downloads

or from zip
https://github.com/vikjon0/qf-xbmc-addon...leaner.ext
Reply
#5
Gave this a try, but it freezes when XBMC tries to exit. I switched to this one because the other file cleaner thats out there does the same thing. When I disable it it seems to work fine. Any ideas whats going on?

Its interesting to note, that if I disable the addon, and quit, it still hangs. But the next time I open xbmc and then quit, everything is fine. The last line in the log says:

Code:
xbpythread::stop - script didn't stop in proper time - lets kill it
stop python

I get that same error for both your mod and the original one.

I'm pulling these out of the log on my Intel Mac install, but also seem to have this problem on my Win7 machine at home.
Reply
#6
I haven't touched and barely looked at that part. I see it is a loop waiting for the service to be told to stop.

I got that error once when disabling but you only get when exit?
I have noticed that xbmc on my dev machine is VERY slow to exit but it was like that before the I installed the cleaner.

I think the only thing I can do is to compare the code with the code of the library updater.
If you are up to it you could take a look your self and tell me what you see. Or perhaps test the library updater and see if you get the same problem.
Reply
#7
The problem is that the same loop is used for timing the cleanings. I.e. the sleep time for the service loop = the cleaning interval.
That will not fly but I do not know if I can fix it the next few days. I think the best solution is to use the cron tech form the lib updater.

The quick fix is to recalc the cleaning interval to number of service loops and and skip i times.

servicesleep = 10




ticker = cleanintervall *60/servicesleep
t = 0

while notstop
t = t +1
if t = ticker
t = 0
run
Reply
#8
I have pushed a fix through to my repository. Get and test version 0.0.3
(not in https://github.com/vikjon0/script.filecleaner.ext as I do not use branches yet)

only here
https://github.com/vikjon0/qf-xbmc-addons
Reply
#9
Hey, sorry for the late reply, got swamped at work. You still want me to test the library updater?
Reply
#10
test my version 0.0.3 it should behave correctly or at least the same as the lib updater.
I.e. testing for abort every 10s.

BTW, I have realized that I cannot continue to have the filecleaner in my repo.
Auto update is not a great thing while testing a add-on like this. The user need to be able to test before deploying on a production environment.
I will release it only as zip from now.
Reply
#11
Sweet! That works for me Smile Thanks man!
Reply
#12
I have finished a first version with a GUI to select shows.

https://github.com/vikjon0/script.filecl.../downloads

I also created a new thread in the proper sub section
http://forum.xbmc.org/showthread.php?tid=132527
please close this one.
Reply

Logout Mark Read Team Forum Stats Members Help
[MOD] FileCleaner with show selection0