Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
  • 1
  • 17
  • 18
  • 19(current)
  • 20
  • 21
  • 28
Release Janitor
First of all, apologies for not responding sooner. I have taken up a new full time job recently and don't have that much time for Janitor anymore.

(2016-07-05, 18:50)mels0n Wrote: Every time I run Janitor it locks up and I get the following in the log:
Code:
11:27:26 629.741699 T:1766851568  NOTICE: Janitor: Starting cleaning routine.
11:27:27 629.793152 T:1766851568  NOTICE: Janitor: Cleaning of 'movies' is disabled. Skipping.
11:27:27 629.810242 T:1766851568  NOTICE: Janitor: Cleaning of 'musicvideos' is disabled. Skipping.
11:27:27 629.899780 T:1766851568  NOTICE: Janitor: [VideoLibrary.GetEpisodes] Filters enabled: [{'operator': 'greaterthan', 'field': 'playcount', 'value': '0'}, {'operator': 'notinthelast', 'field': 'lastplayed', 'value': '30.000000'}, {'operator': 'false', 'field': 'inprogress', 'value': ''}]
11:27:28 631.583740 T:1766851568  NOTICE: Janitor: [VideoLibrary.GetEpisodes] Response: '{"id":1,"jsonrpc":"2.0","result":{"episodes":[{"episodeid":2,"file":"nfs://192.168.1.200/Torrents/TV Shows/White Collar/Season 06/White Collar - S06E01 - Borrowed Time.mkv","label":"6x01. Borrowed Time","showtitle":"White Collar"},{"episodeid":3,"file":"nfs://192.168.1.200/Torrents/TV Shows/White Collar/Season 06/White Collar - S06E02 - Return to Sender.mkv","label
11:27:28 631.614441 T:1766851568   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.UnicodeDecodeError'>
                                            Error Contents: 'utf8' codec can't decode byte 0xe2 in position 85: invalid continuation byte
                                            Traceback (most recent call last):
                                              File "/home/osmc/.kodi/addons/script.filecleaner/service.py", line 46, in <module>
                                                autostart()
                                              File "/home/osmc/.kodi/addons/script.filecleaner/service.py", line 32, in autostart
                                                results, _ = cleaner.clean_all()
                                              File "/home/osmc/.kodi/addons/script.filecleaner/default.py", line 234, in clean_all
                                                cleaned_files, count, status = self.clean(video_type)
                                              File "/home/osmc/.kodi/addons/script.filecleaner/default.py", line 140, in clean
                                                expired_videos = self.get_expired_videos(video_type)
                                              File "/home/osmc/.kodi/addons/script.filecleaner/default.py", line 342, in get_expired_videos
                                                result = json.loads(response)
                                              File "/usr/lib/python2.7/json/__init__.py", line 338, in loads
                                                return _default_decoder.decode(s)
                                              File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
                                                obj, end = self.raw_decode(s, idx=_w(s, 0).end())
                                              File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
                                                obj, end = self.scan_once(s, idx)
                                            UnicodeDecodeError: 'utf8' codec can't decode byte 0xe2 in position 85: invalid continuation byte
                                            -->End of Python script error report<--
11:27:29 631.824890 T:1766851568 WARNING: CPythonInvoker(2, /home/osmc/.kodi/addons/script.filecleaner/service.py): the python script "/home/osmc/.kodi/addons/script.filecleaner/service.py" has left several classes in memory that we couldn't clean up. The classes include: N9XBMCAddon4xbmc7MonitorE,N9XBMCAddon7xbmcgui14DialogProgressE
From this error message I understand there is a problem with the second file in the results set. It looks like the title scraped into the library for the episode White Collar 6x02 contains some unicode characters that result in an error when processed by Janitor. I'm not sure why this happens. I have performed various tests scraping a movie into my library using the Russian and Korean titles, but these are in fact cleaned up successfully:

Code:
22:41:33 T:10208  NOTICE: Janitor: [VideoLibrary.GetMovies] Filters enabled: [{'operator': 'greaterthan', 'field': 'playcount', 'value': '0'}, {'operator': 'false', 'field': 'inprogress', 'value': ''}, {'operator': 'doesnotcontain', 'field': 'path', 'value': 'nfs://192.168.0.3/mnt/storage/downloads/'}, {'operator': 'doesnotcontain', 'field': 'path', 'value': 'E:\\Downloads\\Unsorted\\Misc\\'}]
22:41:33 T:10208   DEBUG: CVideoDatabase::RunQuery took 4 ms for 1 items query: select * from movie_view  WHERE ((CAST(movie_view.playCount as DECIMAL(5,1)) > 0)) AND (movie_view.idFile  NOT IN (SELECT DISTINCT idFile FROM bookmark WHERE type = 1)) AND ((movie_view.strPath NOT LIKE '%nfs://192.168.0.3/mnt/storage/downloads/%' OR movie_view.strPath IS NULL)) AND ((movie_view.strPath NOT LIKE '%E:\Downloads\Unsorted\Misc\%' OR movie_view.strPath IS NULL))
22:41:33 T:10208  NOTICE: Janitor: [VideoLibrary.GetMovies] Response: '{"id":1,"jsonrpc":"2.0","result":{"limits":{"end":1,"start":0,"total":1},"movies":[{"file":"E:\\\\Downloads\\\\Unsorted\\\\Movies\\\\Schindlers.List.1080p.BluRay.x264-SPARKS\\\\Schindlers.List.1080p.BluRay.x264-SPARKs.mkv","label":"\xec\x89\xb0\xeb\x93\xa4\xeb\x9f\xac \xeb\xa6\xac\xec\x8a\xa4\xed\x8a\xb8","movieid":375,"title":"\xec\x89\xb0\xeb\x93\xa4\xeb\x9f\xac \xeb\xa6\xac\xec\x8a\xa4\xed\x8a\xb8"}]}}'
22:41:33 T:10208  NOTICE: Janitor: Building list of expired videos
22:41:33 T:10208  NOTICE: Janitor: Found 1 watched movies matching your conditions
22:41:33 T:10208  NOTICE: Janitor: JSON Response: {u'movies': [{u'title': u'\uc270\ub4e4\ub7ec \ub9ac\uc2a4\ud2b8', u'movieid': 375, u'file': u'E:\\Downloads\\Unsorted\\Movies\\Schindlers.List.1080p.BluRay.x264-SPARKS\\Schindlers.List.1080p.BluRay.x264-SPARKS.mkv', u'label': u'\uc270\ub4e4\ub7ec \ub9ac\uc2a4\ud2b8'}], u'limits': {u'start': 0, u'total': 1, u'end': 1}}
22:41:33 T:10208  NOTICE: Janitor: Expired videos: [[u'E:\\Downloads\\Unsorted\\Movies\\Schindlers.List.1080p.BluRay.x264-SPARKS\\Schindlers.List.1080p.BluRay.x264-SPARKS.mkv', u'\uc270\ub4e4\ub7ec \ub9ac\uc2a4\ud2b8']]
22:41:33 T:10208  NOTICE: Janitor: Found 1 videos that may need cleaning.
22:41:33 T:10208  NOTICE: Janitor: Unstacking 'E:\\Downloads\\Unsorted\\Movies\\Schindlers.List.1080p.BluRay.x264-SPARKS\\Schindlers.List.1080p.BluRay.x264-SPARKS.mkv' is not needed.
22:41:33 T:10208  NOTICE: Previous line repeats 1 times.
22:41:33 T:10208  NOTICE: Janitor: Attempting to move 'E:\\Downloads\\Unsorted\\Movies\\Schindlers.List.1080p.BluRay.x264-SPARKS\\Schindlers.List.1080p.BluRay.x264-SPARKS.mkv' to 'E:\\Downloads\\Unsorted\\Expired\\\xec\x89\xb0\xeb\x93\xa4\xeb\x9f\xac \xeb\xa6\xac\xec\x8a\xa4\xed\x8a\xb8'.
22:41:33 T:10208  NOTICE: Janitor: Created destination 'E:\\Downloads\\Unsorted\\Expired\\\xec\x89\xb0\xeb\x93\xa4\xeb\x9f\xac \xeb\xa6\xac\xec\x8a\xa4\xed\x8a\xb8'.
22:41:33 T:10208  NOTICE: Janitor: Moving 'E:\\Downloads\\Unsorted\\Movies\\Schindlers.List.1080p.BluRay.x264-SPARKS\\Schindlers.List.1080p.BluRay.x264-SPARKS.mkv' to 'E:\\Downloads\\Unsorted\\Expired\\\xec\x89\xb0\xeb\x93\xa4\xeb\x9f\xac \xeb\xa6\xac\xec\x8a\xa4\xed\x8a\xb8\\Schindlers.List.1080p.BluRay.x264-SPARKS.mkv'.
22:41:33 T:10208  NOTICE: Janitor: File(s) moved successfully.

Could you try deleting this episode manually and trying again?

(2016-07-27, 11:13)matt666 Wrote: I'm having a similar problem to the user above where exclusions are no longer working - not a massive problem for me as I only have Janitor enabled on TV Series, and the only thing I want to keep is a folder of a kids TV show for my kids.

It's running on a Synology NAS and I had the idea that I'd just set the permissions on that folder to Read Only, however the files still get deleted. Does the Janitor process use the root account to carry out it's delete operation?

Is there anything I can do to preserve this folder?

Thanks
(2016-07-27, 20:35)matt666 Wrote: This is weirder than I thought, the episodes don't delete when I kick off Janitor manually but they do disappear if they have a watched status and the system kicks off an automatic sweep. Nothing in the logs to say they've been deleted either.
I'm not quite sure why this happens for you. Janitor runs within Kodi, not with elevated privileges, so if it is deleting something that is read only, I suspect it might be a bug within Kodi's python API. Could you show me a log that shows this behavior?

(2016-09-01, 19:28)i3laze Wrote: Thanks for your efforts!

Would you please publish the old version, that still supports Gotham?
Got "Dependencies not met" installing on Gotham box (PrismCube).

UPD: Found it: https://github.com/Anthirian/script.file...r/releases
Is 4.0.1 the latest to work on Gotham?
UPD: Yes.

I got the bug with log not being created - should I downgrade to 4.0.0? Or.. Whats's the filename and path for the log file? (I will create it manually)
UPD: The log is up and running at "./mnt/hdd0/program/.xbmc/userdata/addon_data/script.filecleaner/cleaner.log",
yet when i press "View cleaning history" from the app the log window does not popup : (

P.S. Sorry for self-talk.. just wonder why I had log window working previously (before i reinstalled XMBC).
As explained above my time has become limited, so I unfortunately don't have the time to keep compabitility with older versions of Kodi. Maybe if you were to post a log I could point you in the right direction.

(2016-09-19, 02:26)kbaudi Wrote: Do you plan to update Janitor for Kodi 17 betas, or do we need to wait for the official Kodi release?
I'm not planning to update it for the betas, so your best bet is to wait until Kodi 17 is released and I update the addon. It may take a while before it is updated however, since as I mentioned above, I now have a full time job that takes up most of my time.
Reply
(2016-10-02, 23:03)Anthirian Wrote:
(2016-09-19, 02:26)kbaudi Wrote: Do you plan to update Janitor for Kodi 17 betas, or do we need to wait for the official Kodi release?
I'm not planning to update it for the betas, so your best bet is to wait until Kodi 17 is released and I update the addon. It may take a while before it is updated however, since as I mentioned above, I now have a full time job that takes up most of my time.


@Anthirian If you run Kodi 17 beta it disables it on load but you can enable it and it appears to work perfectly fine. Any chance you could add whatever it is that says the plugin is valid for Kodi 17. I would stick with 16 but there is a feature in 17 that I need ha Wink thanks.
Reply
(2016-10-27, 14:27)wwfc69 Wrote:
(2016-10-02, 23:03)Anthirian Wrote:
(2016-09-19, 02:26)kbaudi Wrote: Do you plan to update Janitor for Kodi 17 betas, or do we need to wait for the official Kodi release?
I'm not planning to update it for the betas, so your best bet is to wait until Kodi 17 is released and I update the addon. It may take a while before it is updated however, since as I mentioned above, I now have a full time job that takes up most of my time.


@Anthirian If you run Kodi 17 beta it disables it on load but you can enable it and it appears to work perfectly fine. Any chance you could add whatever it is that says the plugin is valid for Kodi 17. I would stick with 16 but there is a feature in 17 that I need ha Wink thanks.

Great to know. Trying it now. Thanks.
Reply
I bet it's a problem with the <requires> setting in Kodi\addons\script.filecleaner\addon.xml

This is what's there now, but I don't know what the values should be.
Code:
<requires>
        <import addon="xbmc.python" version="2.24.0" />
        <import addon="xbmc.json" version="6.32.4" />
        <import addon="xbmc.gui" version="5.10.0" />
</requires>

Update:

According to this http://kodi.wiki/view/addon.xml#Dependency_versions, the Krypton version of xbmc.gui is 5.12.0, with no stated backward compatibility. I wonder if it's as simple as changing the line in the xml file.
Reply
I changed the value for the XBMC gui to 5.12.0 as suggested above, and it worked. This xml is located in C:\Users\*youruserid*\AppData\Local\Packages\XBMCFoundation.Kodi_4n2hpmxwrvr6p\LocalCache\Roaming\Kodi\addons\script.filecleaner\addon.xml
in the Windows Store version of Kodi 17. The suffix prior to LocalCache may be different depending on when you installed.

Thanks "kbaudi" for the tip.

UPDATE: This value keeps getting changed back to the original "5.10.0" during restarts of KODI. Anyone know how or why this is happening?
Reply
Thumbs Up 
I *think* I've gotten this working for the Kodi Krypton Betas.

The modification mentioned in the last post is necessary, but also one more. I think the way to force to stick is to update in the Add-On zip file before you install it.

I've posted the zip with the modifications here. Hope this doesn't break any rules -- if so my apologies in advance!

https://drive.google.com/file/d/0Bx4NYXT...sp=sharing
Reply
(2016-12-02, 18:49)bcgaynor82 Wrote: I *think* I've gotten this working for the Kodi Krypton Betas.

The modification mentioned in the last post is necessary, but also one more. I think the way to force to stick is to update in the Add-On zip file before you install it.

I've posted the zip with the modifications here. Hope this doesn't break any rules -- if so my apologies in advance!

https://drive.google.com/file/d/0Bx4NYXT...sp=sharing

I installed your modified File Cleaner install package, and it seems to have done the trick (at least so far, following one restart of Kodi). Good work. Thank you. I had to change my security settings to allow installation from "unknown sources".
Reply
Great to hear!

The two updates were both in the "Requires" section of addon.xml. Kodi Krypton requires xmbc.python 2.25.0 and xmbc.gui 5.12.0.

<requires>
<import addon="xbmc.python" version="2.25.0" />
<import addon="xbmc.json" version="6.32.4" />
<import addon="xbmc.gui" version="5.12.0" />
</requires>
Reply
Thank you for the updated zip, that worked great! Finally got this addon installed on the Windows 10 version.
Reply
Hi, is it possible to delete empty folders only for movies?

Sent from my A0001
Reply
If you are manually editing the addon.xml file without installing the zip, one way to get the update to stick is update the version="4.2.1" to version="4.2.2~beta" I believe Kodi tries to update from the repo if available, so if you make Kodi recognize the version as newer it wont revert.
Reply
Great thinking guys, thanks for helping each other out. I will soon be releasing a new version that is compatible with Krypton and adds a few new features as well.
(2017-01-31, 00:01)dkyazimov Wrote: Hi, is it possible to delete empty folders only for movies?
Unfortunately no, not at the moment. Adding this would require quite a bit of work, but I'll take it into consideration.
Reply
I tried using "Ignore videos without rating" - disabled, with a couple of movies and episodes that didn't have any rating value with a watched status. Janitor didn't delete these videos. Is this normal?
Reply
(2017-02-18, 17:12)sivaptw Wrote: I tried using "Ignore videos without rating" - disabled, with a couple of movies and episodes that didn't have any rating value with a watched status. Janitor didn't delete these videos. Is this normal?
It seems that you have found a bug. Could you please set the debugging setting to enabled, run Janitor again and upload a log file?
Reply
(2017-02-18, 17:18)Anthirian Wrote:
(2017-02-18, 17:12)sivaptw Wrote: I tried using "Ignore videos without rating" - disabled, with a couple of movies and episodes that didn't have any rating value with a watched status. Janitor didn't delete these videos. Is this normal?
It seems that you have found a bug. Could you please set the debugging setting to enabled, run Janitor again and upload a log file?
https://paste.ubuntu.com/24020672/
Reply
  • 1
  • 17
  • 18
  • 19(current)
  • 20
  • 21
  • 28

Logout Mark Read Team Forum Stats Members Help
Janitor4