How do I add an ID to movies and shows?

All about user-defined episode / movie / file name format expressions
Post Reply
ghf
Posts: 1
Joined: 17 Feb 2024, 16:02

How do I add an ID to movies and shows?

Post by ghf »

I use filebot on the command line with the interactive option, which does a lookup and then asks me to confirm that the match is ok. That works for me as a good blend of automation plus my attention as check of the result. I currently use the default naming pattern. Here's my typical command that works for both shows and movies:

Code: Select all

filebot --mode interactive -rename -non-strict someVideo.mkv
What I'd like to do is use the default naming pattern plus the ID (tmdb or tvdb in curly brackets) of the match. I know filebot can do that. Each time I dive into figuring out how to configure that, however, I feel like I'm in the deep end of the pool and I give up. I'm sure it's possible and I bet it's easy.

Is there a config file where I can edit the default format for movies, and the format for shows? If not, I suppose I'll need to provide that format string on the command line and use different commands for movies and shows.

Thanks in advance!
User avatar
rednoah
The Source
Posts: 23001
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: How do I add an ID to movies and shows?

Post by rednoah »

You can use the {plex} format to generate nice file paths:

Format: Select all

{plex.id}

e.g. clone TV series episode files into a new {plex} file and folder structure:

Shell: Select all

filebot -rename -r "/input" --db TheMovieDB::TV -non-strict --action duplicate --output "/output" --format "{plex.id}"
:arrow: https://www.filebot.net/cli.html



:idea: Forcing Movie Mode via --db TheMovieDB or Episode Mode via --db TheMovieDB::TV is strongly recommended if you know in advance what kind of content you are processing. {plex.id} works for both Movie and Episode objects.


:idea: You may remove the --db option to let auto-detection take care of things if you cannot know in advance if you are processing movies or episodes.


:arrow: If you're using custom formats for the first time, then you'll want to get started with the Format Editor in the FileBot Desktop application:
https://www.filebot.net/naming.html



EDIT:

:?: First question you want to ask yourself when prototyping a new custom format for yourself: What do I want? How do you want to add the ID to the file path? Anything is possible. {plex.id} will add the {tmdb-12345} marker to the folder name. For movies, you can probably just add the ID marker to the file name at the end. For episodes, you might need to think about it a bit though, because just adding the series ID after the episode title is probably not what you want.
:idea: Please read the FAQ and How to Request Help.
Post Reply