Preventing Kodi being interrupted by download finishing

Support for Windows users
Post Reply
pietpara
Posts: 24
Joined: 29 Jan 2014, 20:51

Preventing Kodi being interrupted by download finishing

Post by pietpara »

Hello,
I was looking for anyone who might have a solution for the issue that when watching a movie using Kodi, while my utorrent is downloading, causes windows to switch to desktop when the movie has finished downloading and, I believe, utorrent spawns the cmd window..
I have read somewhere to use the /c on the cmd command as in

Code: Select all

cmd /c filebot.launcher -script fn:amc --output "M:\Organized Movies" --log-file amc.log --action copy --conflict override -non-strict --def music=y subtitles=es artwork=y "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D"
but that has not helped. I don´t see the cmd window anymore, but Kodi still bombs out.

Is there any solution to this?

Thanks in advance!

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

Re: Preventing Kodi being interrupted by download finishing

Post by rednoah »

If you use the filebot.launcher.exe (Win32 GUI executable) then it won't (and can't) show a CMD window. Since FileBot won't open any windows there's nothing that could steal the focus.

If you execute cmd.exe then it will definitely open a new CMD window that'll steal the focus.
:idea: Please read the FAQ and How to Request Help.
pietpara
Posts: 24
Joined: 29 Jan 2014, 20:51

Re: Preventing Kodi being interrupted by download finishing

Post by pietpara »

Hi rednoah,

I added the cmd /c part after having that problem before and having read somewhere that placing cmd/c in front wold stop the cmd window from showing, which it did. But maybe, I don't remember, I did not use filebot.launcher before, just filebot.
So, I will try out the following on the next download:

Code: Select all

filebot.launcher -script fn:amc --output "M:\Organized Movies" --log-file amc.log --action copy --conflict override -non-strict --def music=y subtitles=es artwork=y "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D"
I will let you know.

thanks
Pietpara
pietpara
Posts: 24
Joined: 29 Jan 2014, 20:51

Re: Preventing Kodi being interrupted by download finishing

Post by pietpara »

Yes, that seems to work.
pietpara
Posts: 24
Joined: 29 Jan 2014, 20:51

Re: Preventing Kodi being interrupted by download finishing

Post by pietpara »

Hello,
well, I was to quick in saying that it works. Yes, Kodi was not interrupted when I started a torrent and i finished.
But I found that it is because without the cmd /c part in front of the filebot.launcher command in utorrent "Run program when finished" the script does not execute. So it doen´t unpack anything.

How do I execute that script in utorrent without the cmd command, that causes the window interruption?

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

Re: Preventing Kodi being interrupted by download finishing

Post by rednoah »

Common Problems wrote:If you have PATH issues, and it almost always is PATH issues, try using the absolute path to the executable, e.g. "C:/Program Files/FileBot/filebot.exe" or /usr/local/bin/filebot
Have you tried this?
:idea: Please read the FAQ and How to Request Help.
pietpara
Posts: 24
Joined: 29 Jan 2014, 20:51

Re: Preventing Kodi being interrupted by download finishing

Post by pietpara »

Hello,

yes, I have, with no help..

This is my last tried cmd line in utorrent: and it does not result in an unpacked file in M:\Organiyed Movies.

Code: Select all

C:\Program Files\FileBot\filebot.launcher -script fn:amc --output "M:\Organized Movies" --log-file amc.log --action copy --conflict override -non-strict --def music=y subtitles=es artwork=y "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D"
So, maybe a question to which I could not find an answer here so far... should one use filebot.launcher or jut filebot in utorrent?

I believe I started using filebot.launcher with the cmd /c in front, because of an advice I read somewhere about preventing kodi losing focus, when utorrent finishes a download. the ´/c´ being the option for the cmd window not to spawn. But that has not helped. cmd window does not spawn, but kodi still looses focus.

What else can I try?

thanks for any help!

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

Re: Preventing Kodi being interrupted by download finishing

Post by rednoah »

I wrote this:

Code: Select all

"C:/Program Files/FileBot/filebot.exe"
How did you come up with this? It's wrong twice (no quotes and the path doesn't even exist).

Code: Select all

C:\Program Files\FileBot\filebot.launcher
Please learn some cmdline basics: viewtopic.php?f=4&t=1899


The filebot and filebot.launcher executables are both fine. The former will spawn a console window which might steal focus, the latter won't.
:idea: Please read the FAQ and How to Request Help.
pietpara
Posts: 24
Joined: 29 Jan 2014, 20:51

Re: Preventing Kodi being interrupted by download finishing

Post by pietpara »

Hi rednoah,

thank you for your comments.
I have now in utorrent the following:

Code: Select all

"C:/Program Files/FileBot/filebot.launcher.exe" -script fn:amc --output "M:\Organized Movies" --log-file amc.log --action copy --conflict override -non-strict --def music=y subtitles=es artwork=y "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D"
You mentioned the path does not exist, but it does in my case. Filebot is in "C:\Program Files".

So, let me see what happens on next torrent during Kodi.


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

Re: Preventing Kodi being interrupted by download finishing

Post by rednoah »

Yes.

This program exists:

Code: Select all

C:/Program Files/FileBot/filebot.launcher.exe
But you were calling this program, which doesn't:

Code: Select all

C:/Program
@see viewtopic.php?f=4&t=1899


Once you successfully call FileBot, it'll create logs, and if something is not working as expected, those logs will be the first thing you wanna have a look at.
:idea: Please read the FAQ and How to Request Help.
Post Reply