When is history.xml file updated?

All your suggestions, requests and ideas for future development
Post Reply
bodiroga
Posts: 3
Joined: 23 Nov 2020, 18:33

When is history.xml file updated?

Post by bodiroga »

Hi rednoah!

First of all, let me congratulate you on the wonderful tool you have developed. A few months ago I decided to pay for it and I will renew the subscription as soon as it expires, since all your effort and work well deserves those dollars. Thank you very much!

In my current configuration I am using Filebot through the excellent Docker container developed by jlesage, but I have a question about the refresh time of the history.xml file. As I reported in this GitHub issue (https://github.com/jlesage/docker-filebot/issues/32), when I rename/copy any file through the container's web interface, the history.xml file is not updated until I restart the container, which affects my automation workflow. Is this true and how the program should work? Or is there any problem in the Docker container? Would it be possible change the way the program works so that it updates the file as soon as the user renames/moves/copies a file?

Thanks again for your attention and help and keep up with the great job!

Best regards,

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

Re: When is history.xml file updated?

Post by rednoah »

Are you using the GUI or the CLI? What exactly is your workflow?


:idea: FileBot will indeed flush the history to the file on exist. Neither GUI nor CLI are designed as service that runs in background. So the filebot process doesn't typically run forever, and is not designed to run forever.
:idea: Please read the FAQ and How to Request Help.
bodiroga
Posts: 3
Joined: 23 Nov 2020, 18:33

Re: When is history.xml file updated?

Post by bodiroga »

Hi rednoah!

Many thanks for your fast answer, I really appreciate it ;)

In my usual workflow the Docker container runs the AMC script every 10 minutes and I have written a script that checks the history.xml file to detect when any file is renamed, so that I can trigger some automation processes (I prefer to keep those processes outside the AMC script, that is why I have decoupled the whole workflow using the history.xml file as the glue between everything). The thing is that sometimes the AMC script is not able to detect the correct name of the movie/tv show and I need to use the GUI to rename/copy the file manually, but in that cases the history.xml file doesn't get updated until I restart the docker container. I know and realize that my use case is very specific, but it would be awesome if the history.xml file could be updated with each rename/copy action and not when the program is closed. If you don't want to implement it, it's totally fine.

Thank you very much for your support and best regards,

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

Re: When is history.xml file updated?

Post by rednoah »

I see. It's not a problem for the filebot command then. It's an unfortunately side-effect of how the jlesage/docker-filebot bundles the GUI, i.e running it at all times, instead of opening and closing it on demand when you connect via VNC.


:idea: FileBot r8222 will now flush the history to file after you click Rename in the GUI. The CLI will continue to flush the history on exit (since the amc script needs to differentiate between current-session-history and in-the-past-history for various post-processing tasks).
:idea: Please read the FAQ and How to Request Help.
bodiroga
Posts: 3
Joined: 23 Nov 2020, 18:33

Re: When is history.xml file updated?

Post by bodiroga »

Hi rednoah!

As I told you in the GitHub issue, many thanks for your help and support, that was amazingly fast!

Looking forward to a new Filebot release to test the new feature and best regards,

Aitor
DevXen
Power User
Posts: 164
Joined: 12 Oct 2014, 21:15

Re: When is history.xml file updated?

Post by DevXen »

My PC restarted yesterday shortly after renaming about 8,000 movies. - and there is no history of those so i can't go back and see or fix any issues i may have missed in that massive rename as i'm sure there were more than a few. so that sucks. (using windows 10)
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: When is history.xml file updated?

Post by rednoah »

DevXen wrote: 12 Dec 2020, 18:49 My PC restarted yesterday shortly after renaming about 8,000 movies. - and there is no history of those so i can't go back and see or fix any issues i may have missed in that massive rename as i'm sure there were more than a few. so that sucks. (using windows 10)
GUI or CLI?


:idea: If you shutdown your PC, then the GUI will receive a close signal, and in response save everything and exit as if you clicked the X button. But you or the OS kill the process, then that's that. No idea what happens when you try shutdown your PC while a move operation is in progress.


:idea: FileBot will store the original file name as xattr. But xattr may or may not have been written yet at whatever point in time the filebot process was killed. Please read Metadata and Extended Attributes for details.
:idea: Please read the FAQ and How to Request Help.
DevXen
Power User
Posts: 164
Joined: 12 Oct 2014, 21:15

Re: When is history.xml file updated?

Post by DevXen »

Gui, it was after the rename process maybe one an hour after I was checking files and their audio tracks. One had files that were too long for media player classic to load so I opened it in movies and TV. And it opened (usually they works if file names are too big for media player classic.) but that file it just started my whole pc.

Forgot about xattr as I've never really used that. The files are on an ntfs drive.

So is there a way to scan thy files and extract the xattr info intoban excel file or something so I could access and view that info as needed?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: When is history.xml file updated?

Post by rednoah »

DevXen wrote: 12 Dec 2020, 19:54 So is there a way to scan thy files and extract the xattr info intoban excel file or something so I could access and view that info as needed?
1. Select Filter and drop files
2. Select Attributes and CTRL+A / CTRL+C / CTRL+V into a new text file


:idea: In any case, FileBot r8222 and above will write the history after you click Rename every time, so this won't be an issue in upcoming releases.
:idea: Please read the FAQ and How to Request Help.
DevXen
Power User
Posts: 164
Joined: 12 Oct 2014, 21:15

Re: When is history.xml file updated?

Post by DevXen »

They worked perfectly. Thank you so much. I'm glad it as able to recover that info. Cause 8k is a lot to not be able to fix any mismatches. So thank you again for all your help.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: When is history.xml file updated?

Post by rednoah »

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