Running FileBot from the console, Groovy scripting, shell scripts, etc
rafasilv
Posts: 13 Joined: 17 Oct 2014, 22:22
Post
by rafasilv » 17 Oct 2014, 22:35
I use sabnzbd (usenet client) post-script to rename my downloads:
#!/bin/bash
# SABnzbd Post Processing Script -
www.Filebot.net "AMC" Script
FILE_PATH=$1
FILE_NAME=$3
filebot -script \
fn:amc \
--output "/media/DADOS/Media" \
--log-file amc.log \
--action move \
--conflict override -non-strict \
--def music=n \
--def xbmc=127.0.0.1 \
--def plex=127.0.0.1 \
--def pushover= \
--def artwork=y \
--def subtitles=pb \
--def clean=y \
--def "exts=jpg|nfo|srv|srr|nzb|sfv|idx|sub|txt|part01|part02|par1|par2" \
--def "terms=sample|trailer|etc" \
--def "ut_dir=$FILE_PATH" \
--def "ut_kind=multi" \
--def "ut_title=$FILE_NAME"
Sometimes I cannot find the subtitle and I have to revert to the original name of the file ( filebot -script fn:revert --action rename /path/to/files) to search for the subtitle in another site (like
www.legendas.tv )
Is it possible to add something at sabnzbd post-script to automatic revert the file to the original name when the subtitle is missed?
Thanks
rednoah
The Source
Posts: 23947 Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:
Post
by rednoah » 18 Oct 2014, 05:52
No, there is no support for this. Though, FileBot stores the original filename as xattr so you could write a script for that yourself quite easily.
rafasilv
Posts: 13 Joined: 17 Oct 2014, 22:22
Post
by rafasilv » 18 Oct 2014, 15:33
How can i make a script to get the original back when the subtitle is missed?
Please help me out
rednoah
The Source
Posts: 23947 Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:
Post
by rednoah » 18 Oct 2014, 16:18
Pseudo code:
Code: Select all
Find all media files that don't have subtitles
for each file
check xattr for the original name
rename file to the original name
You understand that this will require a certain level of coding, right? Feel free to check the scripts section for examples.
rafasilv
Posts: 13 Joined: 17 Oct 2014, 22:22
Post
by rafasilv » 18 Oct 2014, 17:14
At this script i already use, is it possible to keep the original name of the file?
What matters to me is trhe folder in organized structure.
rednoah
The Source
Posts: 23947 Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:
Post
by rednoah » 18 Oct 2014, 17:32
Yes. Just pass in your own format expression.
rafasilv
Posts: 13 Joined: 17 Oct 2014, 22:22
Post
by rafasilv » 18 Oct 2014, 23:15
what if cut the last line of the script, it will keep the original name of the file?