--q manual lookup

How-to guides, frequently asked questions, not-so-obvious features, etc
Post Reply
User avatar
rednoah
The Source
Posts: 22967
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

--q manual lookup

Post by rednoah »

1.
Force lookup by search query:

Shell: Select all

--q "buffy the vampire slayer"

2.
Force lookup by numeric ID:

Shell: Select all

--q 70327

3.
Force lookup via custom query expression:

e.g. Match ID12345 pattern from the filename and then use it as query:

Shell: Select all

--q "{ fn.match(/ID([0-9]{5,11})/) }"
e.g. Use the parent folder name as query:

Shell: Select all

--q "{ folder.name }"
e.g. Use the part of the filename that is before the S01E01 pattern:

Shell: Select all

--q "{ fn.before(/S[0-9]+E[0-9]+/).space(/ /) }"
e.g. Implement custom query auto-detection via an external script:

Shell: Select all

--q /path/to/query.groovy


Examples

e.g. extract and sanitize movie name.year pattern from the folder name (e.g. Avatar.2009.1080p ➔ Avatar 2009)

Format: Select all

{ folder.name.match(/^.+?\d{4}/).space(/ /) }
:idea: Please read the FAQ and How to Request Help.
Post Reply