Reusing parts of the {plex} binding

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

Reusing parts of the {plex} binding

Post by mrbucket101 » 16 May 2017, 15:58

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: 12011
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Plex Naming Schemes

Post by rednoah » 16 May 2017, 16:51

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

e.g.

Code: Select all

TV/{plex.tail}
My (very excellent) support depends on Windows Store and Mac App Store sales and PayPal donations. Paying users, donors and everyone who contributes to FileBot in one way or another will get the very best support.

Image

Please read the FAQ and How to Request Help. Donate if you'd like some extra developer love. :ugeek:

User avatar
mrbucket101
Power User
Posts: 30
Joined: 02 Jul 2014, 00:25

Re: Plex Naming Schemes

Post by mrbucket101 » 16 May 2017, 19:01

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: 12011
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Plex Naming Schemes

Post by rednoah » 16 May 2017, 19:18

Please run filebot -script fn:sysinfo and post the output.
My (very excellent) support depends on Windows Store and Mac App Store sales and PayPal donations. Paying users, donors and everyone who contributes to FileBot in one way or another will get the very best support.

Image

Please read the FAQ and How to Request Help. Donate if you'd like some extra developer love. :ugeek:

User avatar
mrbucket101
Power User
Posts: 30
Joined: 02 Jul 2014, 00:25

Re: Plex Naming Schemes

Post by mrbucket101 » 16 May 2017, 19:37

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: 12011
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Reusing parts of the {plex} binding

Post by rednoah » 17 May 2017, 02:59

{plex.tail} requires the latest version of FileBot I suppose.
My (very excellent) support depends on Windows Store and Mac App Store sales and PayPal donations. Paying users, donors and everyone who contributes to FileBot in one way or another will get the very best support.

Image

Please read the FAQ and How to Request Help. Donate if you'd like some extra developer love. :ugeek:

User avatar
mrbucket101
Power User
Posts: 30
Joined: 02 Jul 2014, 00:25

Re: Reusing parts of the {plex} binding

Post by mrbucket101 » 17 May 2017, 15:21

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

Who is online

Users browsing this forum: No registered users and 1 guest