store folder path from filebot

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
saitoh183
Posts: 112
Joined: 02 Oct 2012, 16:59

store folder path from filebot

Post by saitoh183 »

Hi,

so i have a script that calls filebot against the a file path that is store in a python variable

newpath = src_path.rsplit(".",1)[0] +".mp4" #The path that is its referring to /home28/saitoh183/Videos/French Movies/Icebreaker (2016)/The Icebreaker (2016) WEBDL-1080p.mp4
#################### FileBot ##################
logger.info('Filebot Processing Started...')
shell_call('filebot -rename {} --format {} --log-file {} --log=ALL --db TMDB --lang fr -non-strict',newpath,format_,log_file)
logger.info('Filebot Processing Finished...')
#################### FileBot ##################

Filebot Log:

Code: Select all

INFO: Created user preferences directory.
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/home28/saitoh183/Videos/French Movies/Icebreaker (2016)/The Icebreaker (2016).mp4]
[MOVE] Rename [/home28/saitoh183/Videos/French Movies/Icebreaker (2016)/The Icebreaker (2016).mp4] to [/home28/saitoh183/Videos/French Movies/The Icebreaker (2016)/The Icebreaker (2016).mp4]
Processed 1 files
i would want to store the new path /home28/saitoh183/Videos/French Movies/The Icebreaker (2016)/The Icebreaker (2016).mp4 in newpath so i can use it in the rest of my script.

Is this possible?
User avatar
rednoah
The Source
Posts: 22975
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: store folder path from filebot

Post by rednoah »

Yes, but you'll have to parse the filebot console output in your python script (kinda like parsing a text file) and then assign variables in your python script accordingly.
:idea: Please read the FAQ and How to Request Help.
saitoh183
Posts: 112
Joined: 02 Oct 2012, 16:59

Re: store folder path from filebot

Post by saitoh183 »

What i decided to do is open the logfile and extra the portion i need into a variable because i was unsure on how to parse the filebot output.
Post Reply