remove only the primaryTitle year

Support for Windows 10 users and the Microsoft Store package
Post Reply
InMemoriam
Posts: 8
Joined: 12 Jun 2021, 10:17

remove only the primaryTitle year

Post by InMemoriam »

already I searched for the forum and I didn't find it.
I just wanted to remove the year from primaryTitle.
currently the one I use
.../{primaryTitle} ({y}) {primaryTitle == n ?' ': [n]}/{episode.special ? 'Specials' : 'Season '+s.pad(2)}/{primaryTitle} - {episode.special ? 'S00E'+special.pad(2) : s00e00}
and so rich to rename :

..../Boku no Hero Academia (2021) (2016) [My Hero Academia]/Season 05/Boku no Hero Academia (2021) - S05E11

I would like to get this result :

..../Boku no Hero Academia (2016) [My Hero Academia]/Season 05/Boku no Hero Academia - S05E11

the primaryTitle is looking for the season date, and would like to remove that....

I appreciate any help in advance.
User avatar
rednoah
The Source
Posts: 19920
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: remove only the primaryTitle year

Post by rednoah »

e.g.

Code: Select all

{ primaryTitle.replaceTrailingBrackets() }
:idea: Please read the FAQ and How to Request Help.
InMemoriam
Posts: 8
Joined: 12 Jun 2021, 10:17

Re: remove only the primaryTitle year

Post by InMemoriam »

THANK YOU!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
User avatar
rednoah
The Source
Posts: 19920
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: remove only the primaryTitle year

Post by rednoah »

FileBot r8635 will apply replaceTrailingBrackets() implicitly for the {primaryTitle} binding.
:idea: Please read the FAQ and How to Request Help.
InMemoriam
Posts: 8
Joined: 12 Jun 2021, 10:17

Re: remove only the primaryTitle year

Post by InMemoriam »

I came across a complicated situation, usually the primarytitle gets the data in English, but here in this situation no, is there a way to configure it to pull in English only?
I'm doing dual name... the first one was getting in English as I wanted, but in this situation these 'special' characters were left, I think I'll convert it with the .ascii() parameter if I can't configure the primarytitle to English.
.../劇場版 美少女戦士セーラームーンEternal 前編 - Part 2 (2021) - [Pretty Guardian Sailor Moon Eternal: O Filme - Parte 2]/劇場版.美少女戦士セーラームーンEternal.前編.-.Part.2.2021 [TMDBID=784500]
User avatar
rednoah
The Source
Posts: 19920
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: remove only the primaryTitle year

Post by rednoah »

{primaryTitle} for TheMovieDB / Movie objects will give you the Original Title field, which is typically in the original language, which may or may not be English:
https://www.themoviedb.org/movie/618851 ... on-eternal


{primaryTitle} for TheTVDB / Episode objects will give you (A) the AniDB x-jat title, where TheTVDB <=> AniDB mappings are available or (B) the English title, in absence of Original Title information.




:!: {primaryTitle} is not your friend if you want English titles, especially not in combination with TheMovieDB.


:idea: If you want different components of your file path in different languages, then the {localize} dynamic localization binding is your friend.
:idea: Please read the FAQ and How to Request Help.
InMemoriam
Posts: 8
Joined: 12 Jun 2021, 10:17

Re: remove only the primaryTitle year

Post by InMemoriam »

the vestment

Code: Select all

String.transliterate(identifier)
I tried to use it but I'm not able to, little knowledge in programming.
wouldn't that be the solution? I put the .ascii but it is still some characters complicated to understand.
InMemoriam
Posts: 8
Joined: 12 Jun 2021, 10:17

Re: remove only the primaryTitle year

Post by InMemoriam »

rename my media with two names, the first would be english and the second in pt_br, if the first is equal to the second, do not insert the second. Many titles are doing well with the primarytitle, however when titles like Chinese, Japanese and others are these characters of their nationalities, I tried the .ascii() but I'm not getting much success.
User avatar
rednoah
The Source
Posts: 19920
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: remove only the primaryTitle year

Post by rednoah »

e.g. English Name - Brazilian Name or just English Name

Code: Select all

{ [n, localize.Brazilian.n].unique().join(' - ') }
:idea: Using default English language preferences, so n is in English.
:idea: Please read the FAQ and How to Request Help.
InMemoriam
Posts: 8
Joined: 12 Jun 2021, 10:17

Re: remove only the primaryTitle year

Post by InMemoriam »

YOU IS MY HERO!!!!
InMemoriam
Posts: 8
Joined: 12 Jun 2021, 10:17

Re: remove only the primaryTitle year

Post by InMemoriam »

rednoah wrote: 14 Jun 2021, 15:15 e.g. English Name - Brazilian Name or just English Name

Code: Select all

{ [n, localize.Brazilian.n].unique().join(' - ') }
:idea: Using default English language preferences, so n is in English.

this command does not have the same tv show effect when searching thetvdb, only tv show themoviedb, is there any special condition in question?! when searching thetvdb it returns Pt - Portugal themoviedb returns Pt - Brazil.
User avatar
rednoah
The Source
Posts: 19920
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: remove only the primaryTitle year

Post by rednoah »

Does TheTVDB have separate episode listings for Portuguese and Brazilian Portuguese?


EDIT:

Looks like TheTVDB API fundamentally doesn't differentiate these two languages:
https://forums.thetvdb.com/viewtopic.php?f=17&t=60522

:arrow: Best to stick to TheMovieDB if you need fine-grained localization. TheMovieDB had support for language / country localization from the very beginning, so it works better now.
:idea: Please read the FAQ and How to Request Help.
InMemoriam
Posts: 8
Joined: 12 Jun 2021, 10:17

Re: remove only the primaryTitle year

Post by InMemoriam »

rednoah wrote: 15 Jun 2021, 19:13 Does TheTVDB have separate episode listings for Portuguese and Brazilian Portuguese?
Some titles have both languages, I'll send you images...

Original Title...

Image

Portugues Portugal

Image

Portugues Brazil

Image

this code always pulls the portuguese portugal from thetvdb, but themoviedb comes correctly from portuguese brazil

Code: Select all

{ [n, localize.Brazilian.n].unique().join(' - ') }
User avatar
rednoah
The Source
Posts: 19920
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: remove only the primaryTitle year

Post by rednoah »

Unfortunately, the TheTVDB API only recognizes "pt" so FileBot can't request anything other than that, so there's nothing we can do to make it work at this point in time:
https://forums.thetvdb.com/viewtopic.php?f=17&t=60522
:idea: Please read the FAQ and How to Request Help.
Post Reply