Bug or Feature?: handling of non-media files

All your suggestions, requests and ideas for future development
Post Reply
laharah
Power User
Posts: 13
Joined: 22 Oct 2014, 10:06

Bug or Feature?: handling of non-media files

Post by laharah »

So this is a report that came from the FilebotTool plugin for deluge:

https://github.com/Laharah/deluge-FileBotTool/issues/44

Basically, in 4.9.0 filebot now raises errors on arguments that aren't media files. Previously it simply ignored them.

It's not really a bug, the plugin simply hands all the files over to Filebot to let it decide how to handle the files. It seems a reasonable design choice for filebot to get more strict about things. I'm ready to implement file filtering if need be, but I ran into some behavior that wasn't what I was expecting, making me not sure if it's intended or not:

File Structure:
Onward.2020.720p
├── Horrendous filename.to .txt
├── Onward.2020.720p.mkv
├── Onward.2020.720p.srt
└── Win real Money.txt

when executing

Code: Select all

filebot -rename --action test -non-strict Onward.2020.720p/*
the call errors out with "No Media Files" on the two text files. This makes sense if filebot is now more strict about file arguments.

However this call:

Code: Select all

filebot -rename --action test -non-strict -r Onward.2020.720p
errors out in the same way. To my mind, it seems super likely that a recursive call on an entire directory is very likely to run into files that aren't media files (screenshots, meta.txt, etc.) and to have the call error out makes the -r/recursive flag pretty useless. You'd have to pre-clean your folder anyways, and at that point it doesn't save much more time than just adding the files as arguments.

Obviously I prefer the old behavior (less work for me :D) but I can work around it on the deluge side to pre-filter the arguments sent to Filebot. I just want to make sure that this is intended behavior and not a regression of some sort before I start making changes to the plugin.
User avatar
rednoah
The Source
Posts: 22976
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Bug or Feature?: handling of non-media files

Post by rednoah »

Works as far as I can tell:

Code: Select all

$ filebot -rename -r Onward.2020.720p/* --action TEST --db TheMovieDB -non-strict
...
[TEST] from [Onward.2020.720p/Onward.2020.720p.mkv] to [Onward.2020.720p/Onward (2020).mkv]
Processed 1 files

Code: Select all

$ filebot -rename -r Onward.2020.720p --action TEST --db TheMovieDB -non-strict
...
[TEST] from [Onward.2020.720p/Onward.2020.720p.mkv] to [Onward.2020.720p/Onward (2020).mkv]
Processed 1 files
Not sure what could have changed there. It works as it should if there is at least one media file, and it fails if there's no media files at all. Pretty sure older versions would "fail" to if there's nothing to do, though perhaps with a different error message.


EDIT:

I see! You're doing -rename with series/movie auto-detection. There's definitely something off there. I'll look into it.


EDIT 2:

Fixed with FileBot r7255.
:idea: Please read the FAQ and How to Request Help.
laharah
Power User
Posts: 13
Joined: 22 Oct 2014, 10:06

Re: Bug or Feature?: handling of non-media files

Post by laharah »

Exellent! Thanks!
Post Reply