Reusing parts of the {plex} binding

All about user-defined episode / movie / file name format expressions
Post Reply
User avatar
mrbucket101
Power User
Posts: 36
Joined: 02 Jul 2014, 00:25

Reusing parts of the {plex} binding

Post by mrbucket101 »

How would I go about using this binding, but changing the parent directory name. For example. I keep all of my TV Shows in a folder named TV.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Plex Naming Schemes

Post by rednoah »

You can use bits and pieces of what {plex} gives you as shown in the examples.

e.g.

Code: Select all

TV/{plex.tail}
:idea: Please read the FAQ and How to Request Help.
User avatar
mrbucket101
Power User
Posts: 36
Joined: 02 Jul 2014, 00:25

Re: Plex Naming Schemes

Post by mrbucket101 »

rednoah wrote:You can use bits and pieces of what {plex} gives you as shown in the examples.

e.g.

Code: Select all

TV/{plex.tail}
Using {plex.tail} does not seem to be working for me. It looks like that isn't even recognized? not sure, filebot wants to rename my file .mkv

Filebot script I use

Code: Select all

#!/bin/bash
FILE_PATH=$1

	filebot -script fn:amc \
	--output "/home/****/Share" \
	--log-file amc.log \
	--action test \
	--conflict auto \
	-non-strict \
	"$FILE_PATH" \
	--filter "!readLines('''/home/****/.filebot_excludes.txt''').contains(n)" \
	--def @/home/****/.filebot_args.txt
@args file

Code: Select all

music=n
clean=y
plex=127.0.0.1:****
subtitles=en
musicFormat=Music/{n}/{album+'/'}{pi.pad(2)+' - '}{artist} - {t}
seriesFormat=TV/{plex.tail}
movieFormat={plex}
output of filebot being run

Code: Select all

Run script [fn:amc] at [Tue May 16 14:53:32 EDT 2017]
Parameter: music = n
Parameter: clean = y
Parameter: plex = *****
Parameter: subtitles = en
Parameter: musicFormat = Music/{n}/{album+'/'}{pi.pad(2)+' - '}{artist} - {t}
Parameter: seriesFormat = TV/{plex.tail}
Parameter: movieFormat = {plex}
Argument[0]: /home/****/Downloads/TV/The.Blacklist.S04E20.READ.NFO.720p.HDTV.x264-FLEET
Read archive [the.blacklist.s04e20.read.nfo.720p.hdtv.x264-fleet.rar] and extract to [/home/****/Downloads/TV/The.Blacklist.S04E20.READ.NFO.720p.HDTV.x264-FLEET/the.blacklist.s04e20.read.nfo.720p.hdtv.x264-fleet/The.Blacklist.S04E20.READ.NFO.720p.HDTV.x264-FLEET]
Skipped extracting files [/home/****/Downloads/TV/The.Blacklist.S04E20.READ.NFO.720p.HDTV.x264-FLEET/the.blacklist.s04e20.read.nfo.720p.hdtv.x264-fleet/The.Blacklist.S04E20.READ.NFO.720p.HDTV.x264-FLEET/The.Blacklist.S04E20.READ.NFO.720p.HDTV.x264-FLEET.mkv]
Input: /home/****/Downloads/TV/The.Blacklist.S04E20.READ.NFO.720p.HDTV.x264-FLEET/the.blacklist.s04e20.read.nfo.720p.hdtv.x264-fleet/The.Blacklist.S04E20.READ.NFO.720p.HDTV.x264-FLEET/The.Blacklist.S04E20.READ.NFO.720p.HDTV.x264-FLEET.eng.srt
Input: /home/****/Downloads/TV/The.Blacklist.S04E20.READ.NFO.720p.HDTV.x264-FLEET/the.blacklist.s04e20.read.nfo.720p.hdtv.x264-fleet/The.Blacklist.S04E20.READ.NFO.720p.HDTV.x264-FLEET/The.Blacklist.S04E20.READ.NFO.720p.HDTV.x264-FLEET.mkv
Group: [tvs:the blacklist] => [The.Blacklist.S04E20.READ.NFO.720p.HDTV.x264-FLEET.eng.srt, The.Blacklist.S04E20.READ.NFO.720p.HDTV.x264-FLEET.mkv]
No missing subtitles
Rename episodes using [TheTVDB]
Auto-detected query: [The Blacklist]
Fetching episode data for [The Blacklist]
Apply Filter: {!readLines('''/home/****/.filebot_excludes.txt''').contains(n)}
[TEST] Rename [/home/****/Downloads/TV/The.Blacklist.S04E20.READ.NFO.720p.HDTV.x264-FLEET/the.blacklist.s04e20.read.nfo.720p.hdtv.x264-fleet/The.Blacklist.S04E20.READ.NFO.720p.HDTV.x264-FLEET/The.Blacklist.S04E20.READ.NFO.720p.HDTV.x264-FLEET.eng.srt] to [/home/****/Share/TV/.srt]
[TEST] Rename [/home/****/Downloads/TV/The.Blacklist.S04E20.READ.NFO.720p.HDTV.x264-FLEET/the.blacklist.s04e20.read.nfo.720p.hdtv.x264-fleet/The.Blacklist.S04E20.READ.NFO.720p.HDTV.x264-FLEET/The.Blacklist.S04E20.READ.NFO.720p.HDTV.x264-FLEET.mkv] to [/home/****/Share/TV/.mkv]
Processed 2 files
Finished without processing any files
Failure (°_°)
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Plex Naming Schemes

Post by rednoah »

Please run filebot -script fn:sysinfo and post the output.
:idea: Please read the FAQ and How to Request Help.
User avatar
mrbucket101
Power User
Posts: 36
Joined: 02 Jul 2014, 00:25

Re: Plex Naming Schemes

Post by mrbucket101 »

rednoah wrote:Please run filebot -script fn:sysinfo and post the output.

Code: Select all

FileBot 4.7.7 (r4678)
JNA Native: 4.0.1
MediaInfo: 0.7.67
7-Zip-JBinding: 9.20
Chromaprint: 1.1.0
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2017-04-03 (r494)
Groovy: 2.4.7
JRE: Java(TM) SE Runtime Environment 1.8.0_131
JVM: 64-bit Java HotSpot(TM) 64-Bit Server VM
CPU/MEM: 4 Core / 3 GB Max Memory / 17 MB Used Memory
OS: Linux (amd64)
Package: DEB
Data: /home/****/.filebot
uname: Linux SERVER 3.13.0-117-generic #164-Ubuntu SMP Fri Apr 7 11:05:26 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

------------------- UPDATE AVAILABLE: FileBot 4.7.9 (r4984) --------------------

Done ヾ(@⌒ー⌒@)ノ
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Reusing parts of the {plex} binding

Post by rednoah »

{plex.tail} requires the latest version of FileBot I suppose.
:idea: Please read the FAQ and How to Request Help.
User avatar
mrbucket101
Power User
Posts: 36
Joined: 02 Jul 2014, 00:25

Re: Reusing parts of the {plex} binding

Post by mrbucket101 »

rednoah wrote:{plex.tail} requires the latest version of FileBot I suppose.
you are correct! Updating to 4.7.9 solved the problem

Code: Select all

Run script [fn:amc] at [Wed May 17 11:19:53 EDT 2017]
Parameter: music = n
Parameter: clean = y
Parameter: plex = *****
Parameter: subtitles = en
Parameter: musicFormat = Music/{n}/{album+'/'}{pi.pad(2)+' - '}{artist} - {t}
Parameter: seriesFormat = TV/{plex.tail}
Parameter: movieFormat = {plex}
Argument[0]: /home/****/Downloads/TV/The.Blacklist.S04E20.READ.NFO.720p.HDTV.x264-FLEET
Read archive [the.blacklist.s04e20.read.nfo.720p.hdtv.x264-fleet.rar] and extract to [/home/****/Downloads/TV/The.Blacklist.S04E20.READ.NFO.720p.HDTV.x264-FLEET/the.blacklist.s04e20.read.nfo.720p.hdtv.x264-fleet/The.Blacklist.S04E20.READ.NFO.720p.HDTV.x264-FLEET]
Skipped extracting files [/home/****/Downloads/TV/The.Blacklist.S04E20.READ.NFO.720p.HDTV.x264-FLEET/the.blacklist.s04e20.read.nfo.720p.hdtv.x264-fleet/The.Blacklist.S04E20.READ.NFO.720p.HDTV.x264-FLEET/The.Blacklist.S04E20.READ.NFO.720p.HDTV.x264-FLEET.mkv]
Input: /home/****/Downloads/TV/The.Blacklist.S04E20.READ.NFO.720p.HDTV.x264-FLEET/the.blacklist.s04e20.read.nfo.720p.hdtv.x264-fleet/The.Blacklist.S04E20.READ.NFO.720p.HDTV.x264-FLEET/The.Blacklist.S04E20.READ.NFO.720p.HDTV.x264-FLEET.eng.srt
Input: /home/****/Downloads/TV/The.Blacklist.S04E20.READ.NFO.720p.HDTV.x264-FLEET/the.blacklist.s04e20.read.nfo.720p.hdtv.x264-fleet/The.Blacklist.S04E20.READ.NFO.720p.HDTV.x264-FLEET/The.Blacklist.S04E20.READ.NFO.720p.HDTV.x264-FLEET.mkv
Group: [tvs:the blacklist] => [The.Blacklist.S04E20.READ.NFO.720p.HDTV.x264-FLEET.eng.srt, The.Blacklist.S04E20.READ.NFO.720p.HDTV.x264-FLEET.mkv]
No missing subtitles
Rename episodes using [TheTVDB]
Auto-detected query: [The Blacklist]
Fetching episode data for [The Blacklist]
Fetching episode data for [The Blacklist: Redemption]
Fetching episode data for [Black Box]
Apply filter [!readLines('''/home/****/.filebot_excludes.txt''').contains(n)] on [115] items
[TEST] From [/home/****/Downloads/TV/The.Blacklist.S04E20.READ.NFO.720p.HDTV.x264-FLEET/the.blacklist.s04e20.read.nfo.720p.hdtv.x264-fleet/The.Blacklist.S04E20.READ.NFO.720p.HDTV.x264-FLEET/The.Blacklist.S04E20.READ.NFO.720p.HDTV.x264-FLEET.eng.srt] to [/home/****/Share/TV/The Blacklist/Season 04/The Blacklist - S04E20 - The Debt Collector.eng.srt]
[TEST] From [/home/****/Downloads/TV/The.Blacklist.S04E20.READ.NFO.720p.HDTV.x264-FLEET/the.blacklist.s04e20.read.nfo.720p.hdtv.x264-fleet/The.Blacklist.S04E20.READ.NFO.720p.HDTV.x264-FLEET/The.Blacklist.S04E20.READ.NFO.720p.HDTV.x264-FLEET.mkv] to [/home/****/Share/TV/The Blacklist/Season 04/The Blacklist - S04E20 - The Debt Collector.mkv]
Processed 2 files
Finished without processing any files
Failure (°_°)
Post Reply