when renaming, file extention will be omitted when episode title coincidentally ends with file extention string

All your suggestions, requests and ideas for future development
Post Reply
ret
Posts: 1
Joined: 03 Mar 2024, 21:17

when renaming, file extention will be omitted when episode title coincidentally ends with file extention string

Post by ret »

Hello,
and sorry for the odd subject title. what i mean by that:
i have a "mkv"-file which is an episode from the series "Mrs. Pobot" and the episode title is "ebs1.2_d3pug.mkv" (series name and episode title are alienated ;)). i use the "fn:amc" script with the following settings:

Code: Select all

Parameter: minFileSize = 0
Parameter: minLengthMS = 0
Parameter: ignore = [.](idx|sub|rar|srt)$
Parameter: movieFormat = /files/m/{n.colon(' - ').lower()} ({y}) {'cd'+pi}
Parameter: seriesFormat = /files/s/{n.lower()}/{n.lower()} - {s00e00.lower()} - {t.lower()}
Parameter: animeFormat = /files/a/{n.lower()}/{n.lower()} - {s00e00.lower()} - {t.lower()}
Parameter: movieDB = TheMovieDB
Parameter: seriesDB = TheTVDB
Argument[0]: /unsorted/mrs. pobot/mrs. pobot - s01e03.mkv
so the new filepath should be:

Code: Select all

/files/s/mrs. pobot/mrs. pobot - s01e03 - ebs1.2_d3pug.mkv.mkv
but it gets renamed to:

Code: Select all

/files/s/mrs. pobot/mrs. pobot - s01e03 - ebs1.2_d3pug.mkv
im also not 100% sure if this is a bug or an user error.

thank you in advance and br

Code: Select all

$ filebot -script fn:sysinfo
FileBot 5.1.2 (r10125)
JNA Native: 6.1.6
MediaInfo: 23.10
7-Zip-JBinding: 16.02
Tools: fpcalc/1.5.0 mkvpropedit/65.0.0
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2024-02-27 (r954)
Groovy: 4.0.15
JRE: OpenJDK Runtime Environment 17.0.8
JVM: OpenJDK 64-Bit Server VM
CPU/MEM: 32 Core / 16 GB Max Memory / 66 MB Used Memory
OS: Linux (amd64)
HW: Linux nas 5.15.0-92-generic #102-Ubuntu SMP Wed Jan 10 09:33:48 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
CPU/MEM: : AMD Ryzen 9 7950X 16-Core Processor / MemTotal: 66 GB / MemFree: 65 GB / MemAvailable: 65 GB
STORAGE: zfs [/] @ 609 GB
UID/GID: uid=114(pyloadfetch) gid=65534(nogroup) groups=65534(nogroup)
DATA: /home/pyloadfetch/.filebot
Package: DEB
User avatar
rednoah
The Source
Posts: 23449
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: when renaming, file extention will be omitted when episode title coincidentally ends with file extention string

Post by rednoah »

Can you post real file paths? Please share the TMDB ID or TVDB ID at the very least. Otherwise I cannot run tests. I don't know which series has an episode where the title ends with .mkv so I can't run tests.




EDIT:

Looks like there is indeed some extension deduplication going on:

Console Output: Select all

$ filebot -list --db TheMovieDB::TV --q "mr robot"
...
Mr. Robot - 1x03 - eps1.2_d3bug.mkv
...
$ filebot -rename *.mkv --db TheMovieDB::TV --action TEST --log INFO
[TEST] from [mr robot s01e03.mkv] to [Mr. Robot - 1x03 - eps1.2_d3bug.mkv]
I guess it's a feature. You probably won't find a second series / episode for this specific corner case where this feature works out in a negative way. There is unfortunately no way to disable this behaviour. The FileBot Desktop application will notably allow .mkv.mkv so it's only the CLI that will try to fix accidental double extensions, in this case erroneously.



EDIT 2:

This feature was indeed introduced 2-3 years ago:

Code: Select all

24.10.2021 14:15
Automatically fix accidental double extension (e.g. Alias 1x01.mkv.mkv) caused by bad formats (e.g. f.path.replace)
I'm not too set on this behaviour. But fixing accidental double extension seems like a nice thing to do most of the time.
:idea: Please read the FAQ and How to Request Help.
Post Reply