help renaming according to language

All about user-defined episode / movie / file name format expressions
Post Reply
macdalor
Posts: 33
Joined: 14 Apr 2016, 17:14

help renaming according to language

Post by macdalor »

HI, I have been searching for this but haven't found anything suitable so requesting help here.

I download movies, series and animes in english (mainly) but also french and Spanish.
Once these are downloaded I want to rename them, in the french title if an original french movie, in the Spanish title for a Spanish movie and in English for any others even if the original title isn't English (it could be a Japanese, German etc).
Once all renamed, they should be moved to specific folders according to type and language ("Films" folder for french movies, "Movies" for English movies etc..)

I found most of the French movies are located in IMDB so trying to rename from this DB but with English translated Titles so when I try renaming all these files (as they come / being downloaded in this single folder), the French movies aren't being found/renamed.

I think (tell me if I'm wrong) I would need to localise the movie/serie/anime country of origin in order to identify French or Spanish ones and to rename from the "original title" from the IMDB.

I have tried to adapt quite a few scripts to my needs but getting stuck as I am getting lost in all the scripting so help would be highly appreciated.

Thank you!
User avatar
rednoah
The Source
Posts: 22992
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: help renaming according to language

Post by rednoah »

1. Get spoken language
2. Get localized title for spoken language


e.g.

Code: Select all

{localize[languages.first()].name}
:!: EDIT: THIS SNIPPET IS OUTDATED (see viewtopic.php?f=5&t=3761)

This approach assume that "Spoken Languages" is defined in the database. You can come up with other rules (e.g. if path contains XYZ then English otherwise French).
:idea: Please read the FAQ and How to Request Help.
macdalor
Posts: 33
Joined: 14 Apr 2016, 17:14

Re: help renaming according to language

Post by macdalor »

rednoah wrote:1. Get spoken language
2. Get localized title for spoken language


e.g.

Code: Select all

{localize[languages.first()].name}

This approach assume that "Spoken Languages" is defined in the database. You can come up with other rules (e.g. if path contains XYZ then English otherwise French).
it still doesn't pick up the french titles on my tests.

I have 2 movies on test:
http://www.imdb.com/title/tt0046688/
&
http://www.imdb.com/title/tt0077563/?ref_=fn_al_tt_1
User avatar
rednoah
The Source
Posts: 22992
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: help renaming according to language

Post by rednoah »

0.
If you want the "original name" then you don't need to localize anything at all:

Code: Select all

{primaryTitle}

1.
Use TheMovieDB. Never use IMDb, not even for links. If not using TheMovieDB, then many optional features and bindings won't work.


2.
This approach assume that "Spoken Languages" is defined in the database
I guess {languages} is not known for these movies.

Popular movies will work just fine:
https://www.themoviedb.org/movie/1417-e ... -del-fauno


3.
If {languages} is not defined, then you can go to TheMovieDB and add the missing information.


4.
e.g. if path contains XYZ then English otherwise French
i.e.

Code: Select all

{file =~ /Films/ ? 'French' : 'English'}
:idea: Please read the FAQ and How to Request Help.
Post Reply