Page 1 of 1

store folder path from filebot

Posted: 17 Jan 2018, 07:11
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?

Re: store folder path from filebot

Posted: 17 Jan 2018, 14:30
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.

Re: store folder path from filebot

Posted: 17 Jan 2018, 23:41
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.