History

Any questions? Need some help?
Post Reply
icone
Donor
Posts: 19
Joined: 13 Dec 2015, 11:36

History

Post by icone »

Hello,

Ubuntu 14.04 CLI

I am trying to see

Code: Select all

filebot -script fn:history "path/to/Movies"
Result is

Code: Select all

Done ヾ(@⌒ー⌒@)ノ
And then? :)

in .filebot/history.xml it is showing only the latest automated history from transmission_postprocess.sh, not the result of the command fn:history.

Where can I find those results?

Thank you for your help
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: History

Post by rednoah »

Yes, and then? I have no idea what you want.


1.
history.xml has nothing to do with the amc script per se. It's just an xml file that stores the FileBot rename history.

2.
The history script just prints the contents of history.xml in a more user-friendly manner. Why would calling the history script change the contents of history.xml?

3.
This will give you the entire rename history:

Code: Select all

filebot -script fn:history
This will give you the rename history for all files in the current folder, which is useful if you want to find out the original name for certain files:

Code: Select all

filebot -script fn:history .
(you will not be able to query the history based on the old name, or for files that don't currently exist)
:idea: Please read the FAQ and How to Request Help.
icone
Donor
Posts: 19
Joined: 13 Dec 2015, 11:36

Re: History

Post by icone »

Thank for your answer,

In your answer, my problem lies in the "This will give you".
It is not giving me anything except the "Done". Is it supposed to print the result in a file somewhere or in the console?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: History

Post by rednoah »

Command:

Code: Select all

filebot -script fn:history
Console Output:

Code: Select all

[firefly.101.mkv] => [Firefly - 1x01 - The Train Job.mkv]
[firefly.102.mkv] => [Firefly - 1x02 - Bushwhacked.mkv]
[firefly.103.mkv] => [Firefly - 1x03 - Our Mrs. Reynolds.mkv]
[firefly.104.mkv] => [Firefly - 1x04 - Jaynestown.mkv]
[firefly.105.mkv] => [Firefly - 1x05 - Out of Gas.mkv]
[firefly.106.mkv] => [Firefly - 1x06 - Shindig.mkv]
[firefly.107.mkv] => [Firefly - 1x07 - Safe.mkv]
[firefly.108.mkv] => [Firefly - 1x08 - Ariel.mkv]
[firefly.109.mkv] => [Firefly - 1x09 - War Stories.mkv]
[firefly.110.mkv] => [Firefly - 1x10 - Objects in Space.mkv]
[firefly.111.mkv] => [Firefly - 1x11 - Serenity.mkv]
[firefly.112.mkv] => [Firefly - 1x12 - Heart of Gold.mkv]
[firefly.113.mkv] => [Firefly - 1x13 - Trash.mkv]
[firefly.114.mkv] => [Firefly - 1x14 - The Message.mkv]
View history.xml text:

Code: Select all

cat `filebot -script fn:sysinfo | grep "^Data: " | cut -c7-`/history.xml
Console Output:

Code: Select all

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<history>
    <sequence date="…">
        <rename … />
        <rename … />
        …
    </sequence>
</history>
:idea: Please read the FAQ and How to Request Help.
icone
Donor
Posts: 19
Joined: 13 Dec 2015, 11:36

Re: History

Post by icone »

Yes so I did a huge rename.
I need to find what movies where in french before that (silly me).
So I am trying to find the initial names of my files before the rename.
The commande I used was:

Code: Select all

filebot -script fn:amc --output "/path/to/output" --action move -non-strict "/path/to/input" --def excludeList=amc.txt
(move because of storage limit, this worked well!)

And now:

Code: Select all

filebot -script fn:history "/path/to/output"
Console Output

Code: Select all

Done ヾ(@⌒ー⌒@)ノ
:|
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: History

Post by rednoah »

Have you confirmed that history.xml actually contains the information you're looking for? Also, it's user-specific, so if you call amc with User A and then history with User B, then you won't see the rename history of User A.
:idea: Please read the FAQ and How to Request Help.
icone
Donor
Posts: 19
Joined: 13 Dec 2015, 11:36

Re: History

Post by icone »

Unfortunately history.xml only contains the results of the regular transmission_postprocess.sh action, triggered by transmission, which is:

Code: Select all

filebot -script fn:amc --output "$OUTPUT_DIR" --action duplicate --conflict skip -non-strict --log-file /home/icone/logs/filebot.log --lang $LANGUE --def excludeList=$EXCLUDE_LIST unsorted=y music=y  "ut_dir=$TR_TORRENT_DIR/$TR_TORRENT_NAME" "ut_kind=multi" "ut_title=$TR_TORRENT_NAME"
The content of history is correct regarding that. But there is nothing else than that.
Has the initial rename been overwritten?

Is there another file where I could look for that info? Even if it is raw, it would help me.

(extracting language metadata with mediainfo is not working well as many files don't have the language field)

I did the massive rename under my username.
The transmission action is under transmission user.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: History

Post by rednoah »

You will find a user-specific history.xml for each user. If you run the amc script as User A, then you need to call the history script as User A to see that users history.
:idea: Please read the FAQ and How to Request Help.
icone
Donor
Posts: 19
Joined: 13 Dec 2015, 11:36

Re: History

Post by icone »

I did the massive rename under my username.
I called fn:history under my username.

So I think the problem is: on my system filebot always write in /.filebot (at the root) and not in the user directory. So my past actions (written in /.filebot/history.xml) were overwritten by transmission, also writing in /.filebot/history.xml.

I am afraid that's game over for me.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: History

Post by rednoah »

Did you set /.filebot on purpose? That's definitely not default behaviour. If it is, that's a grave issue.

How did you install FileBot? What does filebot.sh say?

If there already is a history.xml then FileBot will update it. But if the file is owned by your transmission user, then your user may not have write permission, and fail to history.xml, and print an error message. Permission conflicts between users should lead to all kinds of issues error messages, caching, temporary files, etc
:idea: Please read the FAQ and How to Request Help.
icone
Donor
Posts: 19
Joined: 13 Dec 2015, 11:36

Re: History

Post by icone »

No I didn't do that on purpose. It was the default behaviour after installation, although $HOME is set properly.

It was not working so I made the .filebot directory and gave myself and transmission rights to write in it. Then everything worked.

I did the install with:

Code: Select all

sudo dpkg --force-depends -i filebot-*.deb

filebot.sh:

Code: Select all

java -Dunixfs=false -DuseGVFS=false -DuseExtendedFileAttributes=true -DuseCreationDate=false -Djava.net.useSystemProxies=false -Dsun.net.client.defaultConnectTimeout=10000 -Dsun.net.client.defaultReadTimeout=60000 -Djna.nosys=true -Dapplication.deployment=deb -Dapplication.dir=$HOME/.filebot -Djava.io.tmpdir=$HOME/.filebot/temp -Djna.library.path=/usr/share/filebot -Djava.library.path=/usr/share/filebot -Dnet.filebot.AcoustID.fpcalc=/usr/share/filebot/fpcalc -jar /usr/share/filebot/FileBot.jar "$@"
icone
Donor
Posts: 19
Joined: 13 Dec 2015, 11:36

Re: History

Post by icone »

Wait a minute, there is a .filebot directory in my home but there is no history.xml file in it.

cache and temp directories have been written today though.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: History

Post by rednoah »

1.
If -Dapplication.dir=$HOME/.filebot is /.filebot then $HOME is not set. This is a configuration issue on your system.

2.
Why is your filebot.sh launcher different from the latest version? You're not using the latest release of FileBot, and I have no time or interested to provide support for old versions.
:idea: Please read the FAQ and How to Request Help.
icone
Donor
Posts: 19
Joined: 13 Dec 2015, 11:36

Re: History

Post by icone »

Code: Select all

...
MAIL=/var/mail/icone
PATH=/home/icone/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
QT_QPA_PLATFORMTHEME=appmenu-qt5
PWD=/.filebot
LANG=fr_FR.UTF-8
SHLVL=1
HOME=/home/icone
...

Sorry I did the install a few days ago: I didnt know there is already a new version available.
icone
Donor
Posts: 19
Joined: 13 Dec 2015, 11:36

Re: History

Post by icone »

Thank you anyway. I'll try to find a way around it.

The fact that -Dapplication.dir=$HOME/.filebot is /.filebot and not /home/icone/.filebot

as shown by printenv

is beyound me.

Cheers,
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: History

Post by rednoah »

btw, if xattr is enabled and supported, then files should have xattr metadata including original filename:
viewtopic.php?f=4&t=5#p5394
:idea: Please read the FAQ and How to Request Help.
icone
Donor
Posts: 19
Joined: 13 Dec 2015, 11:36

Re: History

Post by icone »

Well what can I say?

I was about to take out my old HDDs to find the orignal names... and you posted.

I didn' think about that.
I love you rednoah! You are THE BEST ;)

That made my day, no, my WEEK.

Going right now to Paypal!

Thank you!
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: History

Post by rednoah »

In which case you can also do a reverse rename:

Code: Select all

filebot -rename --db xattr --format "{original}" /path/to/file
:idea: Please read the FAQ and How to Request Help.
icone
Donor
Posts: 19
Joined: 13 Dec 2015, 11:36

Re: History

Post by icone »

Thanks but I prefer to go forward.


Not directly related to my history question but :

What is Filebot's behaviour when 2 files exist for the same movie but one is in french and the other is in english? (same .avi extension)

The script is called with "move" and no "lang" specification...
icone
Donor
Posts: 19
Joined: 13 Dec 2015, 11:36

Re: History

Post by icone »

I should add that the tiltes for both are in english, except one has the word FRENCH in it...
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: History

Post by rednoah »

Both files will probably be detect as the same movie, and the --format evaluates to the same destination path, then you'll only get one of the files. With --conflict skip the second will be skipped. With --conflict override the second will override the first.

If you want both, then the --format should somehow come up with different paths for different files.
:idea: Please read the FAQ and How to Request Help.
icone
Donor
Posts: 19
Joined: 13 Dec 2015, 11:36

Re: History

Post by icone »

Yep... It is probably what happened on some files.
Luckily some wer for example
The Matrix (1999).avi
The Matrix (1999).mkv

and then Filebot nicely put both files in the same folder.
héhé ;)

But I lost I think some files, like The Lord of the Rings in french... replaced by the vo. :evil:

I wrote a small script. So it won't happen to the french out there reading this thread. Basically it is "parsing" the files looking for the keyword 'french' or 'truefrench' or '.fr.' and changing the destination folder for filebot + changing --lang to fr. Nothing complicated and I guess it could easily be ported to other languages.

I was too happy to find Filebot and used its power too fast!

So, at the end and for my initial concern, I used xattr to get all the original filenames, and mv all the corresponding files to the french folder. I guess my loss is less than 5% of the original french files.

In conclusion: don't use Filebot too fast: with great power comes great responsability.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: History

Post by rednoah »

It's --conflict skip by default, so shouldn't be too bad. ;) For mkv/mp4 files you can probably use {audio.language} and such.
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: History

Post by rednoah »

:idea: Please read the FAQ and How to Request Help.
Post Reply