Page 1 of 1

Preserve part of a filename

Posted: 29 May 2020, 09:36
by ircome
the numbering of a tvshow is kind of strange and not matching my episode filenames.

the actual filename is: "Lamù, la ragazza dello spazio - S01E47 - Episodio 47.mkv"

I can find this tvshow with filbot, but I want to keep "Lamù, la ragazza dello spazio - S01E47 - " and change only the part "Episodio 47" with the name of the episode.

is it possible to change only a part of the filename and preserve the rest?

Re: Preserve part of a filename

Posted: 29 May 2020, 11:01
by rednoah
Well, if you just wanna add Episodio 47 we first need to identify the file and look up the complete episode information, including series title, episode numbers, etc so throwing all of that away at this point would be kinda wasteful.


If you really just want Episodio 47 (and not the actual episode title) then you could use Plain File Mode and just generate a new file name based on the current file name.

e.g.

Code: Select all

{n} - Episodio {n.match(/E([0-9]+)/)}

Code: Select all

Lamù, la ragazza dello spazio - S01E47 => Lamù, la ragazza dello spazio - S01E47 - Episodio 47

Re: Preserve part of a filename

Posted: 30 May 2020, 06:13
by ircome
hi rednoah, thank you very much for reply. But I guess I didn't explain good what's my problem.

Image

from the original file I want to keep the part "Lamù, la ragazza dello spazio - S01E47 - " and from the fetched data only the episode name "I paraorecchi magici" without changing the numbering of my files.

This because the first 23 episodes of the original show are double: there is E01a and E01b, then E02a and E02b (two episodes in one file) and so on till episode 23. Starting at episode 24 the numbering changes to normal, only one episode in one file. Splitting them means that episode 24 is episode 47! That's why the numbering does not match.

Image

But I want them separated, so my question to retain only the "episode name" from the fetched data.

I hope I could explain now.

Thank you for help

Re: Preserve part of a filename

Posted: 30 May 2020, 06:20
by rednoah
If your files have misleading SxE numbers, then you'll want to manually match files with their corresponding episode data:
https://www.filebot.net/getting-started/

Image

Image

Image

:idea: You can select multiple episodes if the given file matches multiple episodes.

Re: Preserve part of a filename

Posted: 30 May 2020, 15:25
by kim
You will not have an easy time with this show
1. looks like your files use the absolute order
2. you use italiano

Re: Preserve part of a filename

Posted: 30 May 2020, 20:09
by kim
I only tested with ep 47, but try this:

Code: Select all

{n}{' - S01E' + absolute}{' - ' + episodelist.findAll{(absolute-23) == it.absolute }.title.join()}
or

Code: Select all

{n}{' - S01E' + absolute}{' - ' + episodelist.findAll{(fn.match(/S01E(\d+)/).toInteger())-23 == it.absolute }.title.join()}
or

Code: Select all

{n}{' - S01E' + absolute}{' - ' + episodelist.findAll{ (fn.match(/Episodio(\s\d+)/).toInteger())-23 == it.absolute }.title.join()}
use absolute order


else remove the -23

Code: Select all

{n}{' - S01E' + absolute}{' - ' + episodelist.findAll{absolute == it.absolute }.title.join()}
=

Code: Select all

{n}{' - S01E' + absolute}{' - ' + t}