Some Files are getting deleted

Support for Synology NAS, QNAP NAS and other Embedded Linux systems
Post Reply
suffx
Posts: 11
Joined: 17 Mar 2017, 11:12

Some Files are getting deleted

Post by suffx »

Hi,

im very happy with filebot so far, works really good. But i have one issue. Sometimes when i Download something thats not a movie or tv shoe, desired files are getting deleted. This can be for example an installation manual or keygens etc.

In the filebot log i cant find anything relating to this problem... heres my script:

Code: Select all

#!/bin/sh
LOG="/volume1/video/Serien/amc.log"
EXC="/volume1/video/Serien/amc.txt"
SERIEN="/volume1/video/Serien/{n}/{s}/{n} - {s00e00} - {t} ({y}) {vf}@{channels}"
SERIENOUT="/volume1/video/Serien/{n}/{s}/{n}/"
FILME="/volume1/video/Filme/{n} ({y}) {source}({vf}@{vc}) ({channels}@{ac}) [{rating}]/{n} ({y}) {source}({vf}@{vc}) ({channels}@{ac}) [{rating}]"
UNSORTIERT="/volume1/video/Downloads/videos/unsortiert - {file.structurePathTail}" 
##FileBot ausführen
/var/packages/filebot/target/filebot.sh -script fn:amc --lang de --log-file $LOG --action move "$1" --def "seriesFormat=$SERIEN" "movieFormat=$FILME" "animeFormat=$ANIME" "unsortedFormat=$UNSORTIERT" "artwork=y" -non-strict --def unsorted=y --def skipExtract=y --conflict skip --def clean=y
## Aufräumen, --def root löscht den Unterordner mit
/var/packages/filebot/target/filebot.sh -script fn:cleaner "$1" --def root=y
/volume1/video/sorttitle.sh
--def clean=y means that files are getting deleted after processing them, right? Thats correct so far, since i want movies to be moved to the destination folder and then delete the downloaded ones, but this should not happen when i download something other.



Edit: I just made a test to verify its caused by filebot.

I downloaded a package containing a .txt file, two .exe files and no video. When filebot is being run after the download was finished, it deletes the txt file. After i renamed my filebot.sh file, filebot couldnt be started anymore and the file will be kept untouched.
I set --def clean=n, but still it deletes the file. Do i have to turn --def root=y to --def root=n? Or what else is causing this behaviour?

Edit 2: even if i set both, --def clean=n and --def root=n it still deletes the file. This also happens with various files in bigger packages, and i cant tell which files exactly are getting deleted.


This is what the log says:

Code: Select all

Run script [fn:amc] at [Wed Apr 19 16:25:14 CEST 2017]
Parameter: seriesFormat = /volume1/video/Serien/{n}/{s}/{n} - {s00e00} - {t} ({y}) {vf}@{channels}
Parameter: movieFormat = /volume1/video/Filme/{n} ({y}) {source}({vf}@{vc}) ({channels}@{ac}) [{rating}]/{n} ({y}) {source}({vf}@{vc}) ({channels}@{ac}) [{rating}]
Parameter: animeFormat = 
Parameter: unsortedFormat = /volume1/video/Downloads/videos/unsortiert - {file.structurePathTail}
Parameter: artwork = y
Parameter: unsorted = y
Parameter: skipExtract = y
Parameter: clean = n
Argument[0]: /volume1/video/Downloads/videos/03675
No files selected for processing
Done ヾ(@⌒ー⌒@)ノ
Even though it says No files selected for processing, it still deletes the file(s)
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Some Files are getting deleted

Post by rednoah »

1.
Just use --action hardlink instead of --action move and clean up your active downloads folder manually when needed. FileBot will not delete anything unless you specifically enable that via options.

2.
The logs will tell you what's happening and why. Without logs, even I can't make a guess. The log you posted is not relevant because it's a log of filebot doing nothing. :lol:
:idea: Please read the FAQ and How to Request Help.
suffx
Posts: 11
Joined: 17 Mar 2017, 11:12

Re: Some Files are getting deleted

Post by suffx »

Ok so You mean i should change move to hardlink copy, and then set clean to No?

So i have to delete files manually?

Yeah, i Know the log says nothing, just wanted to show :D
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Some Files are getting deleted

Post by rednoah »

1.
Yes. I'd follow the instructions verbatim and then make as little changes as possible. Do not use the --def clean option. Do not use the cleaner script. That'll make sure that no files will be deleted. Since we're hardlinking everything, we can freely dispose of the "original files" at any time later on from the application that has "ownership" over those files.

Your script looks familiar. You're probably building on a script that somebody else hacked together for their own specific use case that may very well differ from yours.



2.
You're looking at the wrong log is what I'm trying to say. If FileBot is doing anything except nothing, such as moving files or deleting files, then that will show up in the logs.

If you have your own script, you may want to redirect ALL output of that script. For example, in your script, the output of the filebot cleaner script is just printed to console and not anywhere else.
:idea: Please read the FAQ and How to Request Help.
Post Reply