How can I infer custom series naming and numbering from The Bullwinkle Show episode titles?

All about user-defined episode / movie / file name format expressions
Post Reply
User avatar
rednoah
The Source
Posts: 22854
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

How can I infer custom series naming and numbering from The Bullwinkle Show episode titles?

Post by rednoah »

Input:

Console Output: Select all

$ filebot -list --db TheMovieDB::TV --q "The Bullwinkle Show" --filter "t =~ /Fairy Tales/"
The Bullwinkle Show - 1x02 - Fractured Fairy Tales - Rapunzel
The Bullwinkle Show - 1x07 - Fractured Fairy Tales - Puss and Boots (aka Puss in Boots)
The Bullwinkle Show - 1x12 - Fractured Fairy Tales - The Enchanted Fish
The Bullwinkle Show - 1x17 - Fractured Fairy Tales - Goldilocks (aka Goldilocks and the Three Bears)
The Bullwinkle Show - 1x22 - Fractured Fairy Tales - Jack and the Beanstalk (Fe-Fi-Fo-Fum)
The Bullwinkle Show - 1x27 - Fractured Fairy Tales - Beauty and the Beast
...


Format:

Format: Select all

{
	t.before('-')
}
 - S01E
{
	def g = t.before('-')
	def groups = model.groupBy{ it.t.before('-') }
	groups[g].episode.indexOf(episode).plus(1).pad(2)
}
 - 
{
	t.after('-')
}


Output:

Console Output: Select all

$ filebot -list --db TheMovieDB::TV --q "The Bullwinkle Show" -rename . --format "{ t.before('-') } - S01E{ def g = t.before('-'); def groups = model.groupBy{ it.t.before('-') }; groups[g].episode.indexOf(episode).plus(1).pad(2) } - { t.after('-') }" --action TEST --log INFO
[TEST] from [1.mkv] to [Rocky & Bullwinkle - S01E01 - Jet Fuel (1) - Jet Fuel Formula.mkv]
[TEST] from [2.mkv] to [Fractured Fairy Tales - S01E01 - Rapunzel.mkv]
[TEST] from [3.mkv] to [Bullwinkle's Corner - S01E01 - The Swing.mkv]
[TEST] from [4.mkv] to [Peabody's Improbable History - S01E01 - Ben Franklin.mkv]
[TEST] from [5.mkv] to [Rocky & Bullwinkle - S01E02 - Jet Fuel (2) - Bullwinkle's Ride or Goodbye, Dollink.mkv]
[TEST] from [6.mkv] to [Rocky & Bullwinkle - S01E03 - Jet Fuel (3) - Bullseye Bullwinkle or Destination Moose.mkv]
[TEST] from [7.mkv] to [Fractured Fairy Tales - S01E02 - Puss and Boots (aka Puss in Boots).mkv]
[TEST] from [8.mkv] to [Bullwinkle's Corner - S01E02 - Little Miss Muffet.mkv]
[TEST] from [9.mkv] to [Peabody's Improbable History - S01E02 - Napoleon.mkv]
:idea: Please read the FAQ and How to Request Help.
Post Reply