Artwork Rename

All about user-defined episode / movie / file name format expressions
Post Reply
themusj
Posts: 15
Joined: 29 Dec 2017, 22:43

Artwork Rename

Post by themusj »

I know Filebot can rename TV episodes and .nfo files. Can it rename the artwork to match the episodes?

Specifically the thumbnails, posters and fanart?

I use Kodi and need to keep the dash in those filenames. Ie. Monk S01E01-poster.

Right now when TVDB updates a TV show, I get my mpg and .nfo renamed, but not artwork.
User avatar
rednoah
The Source
Posts: 23934
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Artwork Rename

Post by rednoah »

:?: How are your files currently named?


:arrow: Please post sample file paths as text.


:idea: Please read the Companion Files manual for general information on how to deal with extras and other kinds of companion files.
:idea: Please read the FAQ and How to Request Help.
themusj
Posts: 15
Joined: 29 Dec 2017, 22:43

Re: Artwork Rename

Post by themusj »

Please forgive me if I ask for clarification. I know this should be easy to grasp and comprehend.

Yesterday I had a movie needing the mpg file, nfo file and -thumb.jpg file needing to be renamed.

Filebot renamed all three files with the movie name as expected. But it dropped off the -thumb from the jpg file.

I imagine it would do the same with -poster.

I've read the posts several times now and shaking my head trying to see by the posts what I need to do. Something about {ny} but that just means name and year I believe.}

Can you just list the syntax? It would seem this would be an easy thing to do when I have seen much more complicated syntax.

Most grateful for any help.
User avatar
rednoah
The Source
Posts: 23934
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Artwork Rename

Post by rednoah »

:?: Does this look like the use case at hand?
rednoah wrote: 09 Oct 2020, 04:36 e.g. using a custom format that matches trailing patterns such as -poster from the current file name:

Format: Select all

{ ny }{ '.' + fn.match(/-([a-z]+)$/) }

Console Output: Select all

Avatar.mp4
Avatar.info.xml
Avatar.poster.jpg
Avatar.description.txt
Screenshot


themusj wrote: 04 Feb 2025, 12:53 Yesterday I had a movie needing the mpg file, nfo file and -thumb.jpg file needing to be renamed.
:arrow: Please post sample file paths as text.
:idea: Please read the FAQ and How to Request Help.
themusj
Posts: 15
Joined: 29 Dec 2017, 22:43

Re: Artwork Rename

Post by themusj »

Except in my case I need dash instead of a period for the jpeg file.

Avatar.mpg
Avatar.nfo
Avatar-thumb.jpg
Avatar-poster.jpg

Or take a TV show episode (made up)

Chuck S01E03 - Cat and mouse.mpg
Chuck S01E03 - Cat and mouse.nfo
Chuck S01E03 - Cat and mouse-thumb.jpg
Chuck S01E03 - Cat and mouse-poster.jpg

Needs to change due TVDB change (made up example)

Chuck S01E03 - Cat and mice.mpg
Chuck S01E03 - Cat and mouse.nfo
Chuck S01E03 - Cat and mouse-thumb.jpg
Chuck S01E03 - Cat and mouse-poster.jpg

I need Filebot not to truncate -poster and -thumb from the filenames.
themusj
Posts: 15
Joined: 29 Dec 2017, 22:43

Re: Artwork Rename

Post by themusj »

In the last example mouse should be mice.

Chuck S01E03 - Cat and mice.nfo
Chuck S01E03 - Cat and mice-thumb.jpg
Chuck S01E03 - Cat and mice-poster.jpg
User avatar
rednoah
The Source
Posts: 23934
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Artwork Rename

Post by rednoah »

:?: What is the format you currently have?

:?: What happens if you add this snippet (using - instead of . as separator) from the example above to your format?

Format: Select all

{ '-' + fn.match(/-([a-z]+)$/) }
NOTE: This code will copy & paste the -thumb bit from the current file path into the proposed target file path.
:idea: Please read the FAQ and How to Request Help.
themusj
Posts: 15
Joined: 29 Dec 2017, 22:43

Re: Artwork Rename

Post by themusj »

Both are set as the default settings.

Movies
{n.colon(' - ')} ({y}){' CD'+pi}{subt}

TV Show Episodes
{n} - {s00e00} - {t}
User avatar
rednoah
The Source
Posts: 23934
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Artwork Rename

Post by rednoah »

rednoah wrote: 04 Feb 2025, 16:26 :?: What happens if you add this snippet (using - instead of . as separator) from the example above to your format?

Format: Select all

{ '-' + fn.match(/-([a-z]+)$/) }
NOTE: This code will copy & paste the -thumb bit from the current file path into the proposed target file path.
If you want your format to add the -thumb bit, then you need to add the code that does that. It's just copy & paste from the Companion Files manual.


e.g. movie format

Format: Select all

{n.colon(' - ')} ({y}){' CD'+pi}{ '-' + fn.match(/-([a-z]+)$/) }{subt}
e.g. episode format

Format: Select all

{n} - {s00e00} - {t}{ '-' + fn.match(/-([a-z]+)$/) }
:idea: Please read the FAQ and How to Request Help.
themusj
Posts: 15
Joined: 29 Dec 2017, 22:43

Re: Artwork Rename

Post by themusj »

Thank you I'll give this a real try with my next recorded files coming up.
Post Reply