Release - XBMC File Cleaner

  Thread Rating:
  • 3 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
benharvey1985 Offline
Junior Member
Posts: 13
Joined: Sep 2010
Reputation: 0
Post: #91
thanks for the quick reply Anthirian, i wish i had time to get back into coding and dive into the code myself.

keep up the great work!
find quote
zorvalth Offline
Junior Member
Posts: 29
Joined: Jun 2009
Reputation: 0
Post: #92
Hi, Is the option "delete files with similar names" work for anybody?

It never deletes my subtitles. I have usually two subtitle files and they look like this:

name.mkv
name.en.srt
name.bg.srt

But it never deletes the subtitles...
find quote
Anthirian Offline
Member
Posts: 98
Joined: Jan 2012
Reputation: 1
Post: #93
Hi zorvalth, unfortunately at the moment the language codes that are appended to the filename are not being checked. Currently the filename is split by extension (.srt) and the file path (name, name.en or name.bg). Since these are not the same they will not be cleaned. I do plan to fix this, as appending the language code is common practice for most subtitle downloaders. You can expect a fix for this with the Gotham release, but possibly before that.

[Image: all-thin-banner@2x.jpg]
find quote
Anthirian Offline
Member
Posts: 98
Joined: Jan 2012
Reputation: 1
Post: #94
Hi everyone,

I have been working on support for stacked movies, i.e. movies that have multiple parts (cd1, dvd1, part1, etc.). If you have this kind of movies, could you please help me test this by switching to the 'stacked_movies' branch? Please attach log files to any issue you may find.

Thanks in advance.

[Image: all-thin-banner@2x.jpg]
(This post was last modified: 2014-03-15 15:37 by Anthirian.)
find quote
bossanova808 Offline
Donor
Posts: 2,228
Joined: Sep 2009
Reputation: 34
Location: Melbourne, Australia
Post: #95
@Anthirian - per this thread: http://forum.xbmc.org/showthread.php?tid=189144 - I am looking at setting up a take away xbmc system.

Basically, when I get back from holidays I want to use trakt.tv to mark off the stuff I watched on holidays, then XBMC FIle Cleaner maybe to delete the watched items off the holiday unit.

Ideally, this would mean, rather than having a service, having File Cleaner work as on-demand. A number of other addons work this way (trakt itself, artwork downloader etc) - whereby they can be run either way.

Is this something you'd consider adding maybe (or have I missed a method for this already?)

My XBMC stuff:
find quote
Anthirian Offline
Member
Posts: 98
Joined: Jan 2012
Reputation: 1
Post: #96
On-demand launching has been on my to do list for a long time, as you can see on GitHub. I've been meaning to implement it, but it appears that it would require a significant overhaul of the addon as it is now. I will eventually get around to it, but it will take quite a while before it is actually usable.

[Image: all-thin-banner@2x.jpg]
find quote
bossanova808 Offline
Donor
Posts: 2,228
Joined: Sep 2009
Reputation: 34
Location: Melbourne, Australia
Post: #97
No probs, will keep an eye out for it if it should happen.

My XBMC stuff:
find quote
Anthirian Offline
Member
Posts: 98
Joined: Jan 2012
Reputation: 1
Post: #98
Hi everyone, I have just pushed my work on the Cleaning Log functionality that was requested by lysin. This enables you to take a look at the files XBMC File Cleaner has deleted/moved, right from within the addon settings. Before this gets pushed to the official repo however I would like some test results, specifically bug reports in case issues occur. Please check out the cleaning_log branch on GitHub and report back to me if you encounter issues. Thanks in advance!

[Image: all-thin-banner@2x.jpg]
(This post was last modified: 2014-04-02 17:01 by Anthirian.)
find quote
dkyazimov Offline
Junior Member
Posts: 1
Joined: Apr 2014
Reputation: 0
Post: #99
Hi XBMC File cleaner stopped working for me on Xbian wih XBMC 12.2.
File Cleaner is 3.2.1
find quote
snupple Offline
Member
Posts: 52
Joined: Nov 2005
Reputation: 0
Location: Australia
Post: #100
(2013-10-26 00:25)Anthirian Wrote:  Thanks for the update, I forgot to tell you I'm looking into this. It appears to have to do with the mounting of the drive as I expected. Apparently asking for the disk space on smb://BT/D/ is not valid. It needs to be checked on the mount point, but since XBMC uses an internal mounting system it might be a bit harder than I thought.

Hi, having any luck?

This is the latest I see:
Code:
22:00:34 T:2751808592  NOTICE: XBMC File Cleaner: The path now is smb:/BT/D
22:00:34 T:2751808592   ERROR: XBMC File Cleaner: Could not check disk space. Access denied.
find quote
Anthirian Offline
Member
Posts: 98
Joined: Jan 2012
Reputation: 1
Post: #101
Unfortunately I haven't found a fix-all solution yet for your problem. In the meantime a lot of new features were added in the master branch, including better logging for various parts. Could you try cloning from github and posting a fresh debug log of your problem? Please post the entire log to http://www.xbmclogs.com if possible.

[Image: all-thin-banner@2x.jpg]
(This post was last modified: 2014-04-22 15:19 by Anthirian.)
find quote
snupple Offline
Member
Posts: 52
Joined: Nov 2005
Reputation: 0
Location: Australia
Post: #102
(2014-04-22 15:16)Anthirian Wrote:  Unfortunately I haven't found a fix-all solution yet for your problem. In the meantime a lot of new features were added in the master branch, including better logging for various parts. Could you try cloning from github and posting a fresh debug log of your problem? Please post the entire log to http://www.xbmclogs.com if possible.

I'm running Gotham 13:

and get this error:

18:08:33 T:3058221056 DEBUG: Addon script.filecleaner requires xbmc.gui version 4.0.0 which is not available
find quote
zorvalth Offline
Junior Member
Posts: 29
Joined: Jun 2009
Reputation: 0
Post: #103
Hi, I got an idea for a feature. Something like delete tv show when they are watched and older than X episodes behind. For example i want to keep only the last 2 episodes. I tried to put 15 days but sometimes tv shows got pauses for a month or two. Sorry for my english I hope you got what i mean...
find quote
laric Offline
Donor
Posts: 113
Joined: May 2012
Reputation: 1
Post: #104
installed the master version and get the following error on the lastest nightly win32.

Code:
12:49:21 T:7796   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: 'ascii' codec can't decode byte 0xc3 in position 14: ordinal not in range(128)
                                            Traceback (most recent call last):
                                              File "C:\Users\Michael\AppData\Roaming\XBMC\addons\script.filecleaner\default.py", line 691, in <module>
                                                run = Cleaner()
                                              File "C:\Users\Michael\AppData\Roaming\XBMC\addons\script.filecleaner\default.py", line 90, in __init__
                                                self.cleanup()
                                              File "C:\Users\Michael\AppData\Roaming\XBMC\addons\script.filecleaner\default.py", line 142, in cleanup
                                                self.clean_related_files(abs_path)
                                              File "C:\Users\Michael\AppData\Roaming\XBMC\addons\script.filecleaner\default.py", line 615, in clean_related_files
                                                if extra_file.startswith(name):
                                            UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 14: ordinal not in range(128)
                                            -->End of Python script error report<--
12:49:21 T:7796    INFO: Python script stopped

If my post helped you then there is a nice x/- button on the bottom of the post.
find quote
Anthirian Offline
Member
Posts: 98
Joined: Jan 2012
Reputation: 1
Post: #105
(2014-04-27 12:15)snupple Wrote:  
(2014-04-22 15:16)Anthirian Wrote:  Unfortunately I haven't found a fix-all solution yet for your problem. In the meantime a lot of new features were added in the master branch, including better logging for various parts. Could you try cloning from github and posting a fresh debug log of your problem? Please post the entire log to http://www.xbmclogs.com if possible.

I'm running Gotham 13:

and get this error:

18:08:33 T:3058221056 DEBUG: Addon script.filecleaner requires xbmc.gui version 4.0.0 which is not available
That's strange. I am running Gotham beta 4 and I can import xbmc.gui just fine. Are you running an older beta than I am? Or maybe you are running two separate XBMC versions that interfere with eachother?

(2014-04-27 12:19)zorvalth Wrote:  Hi, I got an idea for a feature. Something like delete tv show when they are watched and older than X episodes behind. For example i want to keep only the last 2 episodes. I tried to put 15 days but sometimes tv shows got pauses for a month or two. Sorry for my english I hope you got what i mean...
I think I do understand. It should not be too hard to implement since I can just ask XBMC for the current episode number. It will probably not be ready for the Gotham update yet though, but sometime later.

(2014-04-27 13:00)laric Wrote:  installed the master version and get the following error on the lastest nightly win32.

Code:
12:49:21 T:7796   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: 'ascii' codec can't decode byte 0xc3 in position 14: ordinal not in range(128)
                                            Traceback (most recent call last):
                                              File "C:\Users\Michael\AppData\Roaming\XBMC\addons\script.filecleaner\default.py", line 691, in <module>
                                                run = Cleaner()
                                              File "C:\Users\Michael\AppData\Roaming\XBMC\addons\script.filecleaner\default.py", line 90, in __init__
                                                self.cleanup()
                                              File "C:\Users\Michael\AppData\Roaming\XBMC\addons\script.filecleaner\default.py", line 142, in cleanup
                                                self.clean_related_files(abs_path)
                                              File "C:\Users\Michael\AppData\Roaming\XBMC\addons\script.filecleaner\default.py", line 615, in clean_related_files
                                                if extra_file.startswith(name):
                                            UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 14: ordinal not in range(128)
                                            -->End of Python script error report<--
12:49:21 T:7796    INFO: Python script stopped
Thanks for the bug report. It appears I forgot to add unicode support for finding related files. The fix might be easy enough. Could you add the following code at the start of the for loop where the error happens?

PHP Code:
if isinstance(extra_fileunicode):
    
extra_file extra_file.encode("utf-8"

The result would look like this.
PHP Code:
...
for 
extra_file in xbmcvfs.listdir(path)[1]:
    if 
isinstance(extra_fileunicode):
        
extra_file extra_file.encode("utf-8")
    if 
extra_file.startswith(name):
        ... 

If that does not fix it, do you happen to have the full path of the video that was being cleaned and contains unicode characters, as well as the rest of the folder's contents?

[Image: all-thin-banner@2x.jpg]
find quote
Post Reply