Different filename depending on the bitrate

Any questions? Need some help?
Post Reply
Mysterious
Posts: 2
Joined: 06 Aug 2019, 05:23

Different filename depending on the bitrate

Post by Mysterious »

Hi i need help renaming with my movies. (Mutiple Verions)
Example:

Alien (1979) - 2 Megabits per second - Recommended for 1080p quality (Can Play In Browser).mp4
Alien (1979) - 15 Megabits per second - Recommended for BluRay quality.mkv
Alien (1979) - 45 Megabits per second - Recommended for Remux quality
Alien (1979) - 60 Megabits per second - Recommended for Ultra HD quality.mkv

Here is my format:
{n} ({y})/{n} ({y}) - 2 Megabits per second - Recommended for 1080p quality (Can Play In Browser)

Im trying to put all the same movies into the same folder instead into its own seprate folders.
Is there way to put the same movies into its own folders?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filebot Renaming Help (Folders)

Post by rednoah »

1.
Since the folder part of your format is {n} ({y}), which is gonna be constant for all of these files, they will end up in the same folder/

I think the real question is about how to make sure each file ends up in the same folder, but with a unique file name, so that you can have multiple files with multiple different file names.

e.g. add {mbps} to the file name, to make each file name unique:

Code: Select all

{plex.derive{' '+[mbps]}}

Code: Select all

Alien (1979) [2.0 Mbps].mkv
Alien (1979) [3.2 Mbps].mkv
Alien (1979) [5.2 Mbps].mkv

2.
You can elaborate on the format, to create different names, and "Recommended for ..." tags, by adding a few if-then-else conditions to your format.

e.g.

Code: Select all

{plex.derive{
	" - " + (bitrate/1e6).round() + " megabits per second"
}{
	if (bitrate > 50e6)
		" - Recommended for Ultra HD quality"
	else if (bitrate > 25e6)
		" - Recommended for Remux quality"
	else if (bitrate > 10e6)
		" - Recommended for BluRay quality"
	else
		" - Recommended for 1080p quality (Can Play In Browser)"
}
}
:idea: Please read the FAQ and How to Request Help.
Mysterious
Posts: 2
Joined: 06 Aug 2019, 05:23

Re: Different filename depending on the bitrate

Post by Mysterious »

Thanks for the reply, i tried doing that, but taking a long time. Because evrything is stored on google drive. Is there a way just to look for the name instead the bitrate?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Different filename depending on the bitrate

Post by rednoah »

Sure. Perhaps you can just match that piece of information from the current filename?

e.g.

Code: Select all

{
	def mbits = fn.match(/(\d+).Megabits/) as int
	return mbits
}
:idea: Please read the FAQ and How to Request Help.
Post Reply