Use of Formated title in scripts

If you made a script you can offer it to the others here, or ask help to improve it. You can also report here bugs & problems with existing scripts.
Post Reply
XPect
Posts: 6
Joined: 2008-02-06 16:22:28

Use of Formated title in scripts

Post by XPect »

While the formated title is a virtual field, is there a way to use it in scripts ?
I've tried getfield(fieldFormattedTitle) but this doesn't work.

Is there a way to use it or not ?

Regards
bad4u
Posts: 1148
Joined: 2006-12-11 22:54:46

Post by bad4u »

Where did you find field "FormattedTitle" ? As far as I know there is no field with that name ;)

Maybe you are talking about a variable from within a script ? Please let me know which script..
XPect
Posts: 6
Joined: 2008-02-06 16:22:28

Post by XPect »

In fact I'm trying to use the formatted title to structure the file name of the movie.
To do this, I store the name in the media field.
The structure i want is: translated title (Original Title) [Year]
and for translated title I need to automatically format the title according to the formatted title i.e. for The fantastics => Fantastics, The.
I've done this manually with several if... Then when I realised that the variable/virtual field TranslattedTitle exist.
But don't know if I can use this in scripts

If someone could help
antp
Site Admin
Posts: 9629
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

I may have forgot to include the "fieldFormattedTitle" constant in script engine (I will add it), but in version 3.5.1 you should be able to reach it by using GetField(10)
(in other versions the number may be different...)
XPect
Posts: 6
Joined: 2008-02-06 16:22:28

Post by XPect »

Works fine

Thanks a lot
freesty
Posts: 3
Joined: 2008-09-14 19:46:47
Location: Germany

Use of Formated title in scripts

Post by freesty »

Hello antp,

I want to use

SetField(fieldFormattedTitle,(GetField(fieldTranslatedTitle)));
or
SetField(10,(GetField(fieldTranslatedTitle)));

to copy the Translated Title to the Formatted Title but it doesnt work.
I have already installed the newest version of your great software (3.5.1.1)

best regards,
Freesty
antp
Site Admin
Posts: 9629
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

FormattedTitle is not a real field. It is just a title that the program creates from original & translated titles depending on settings chosen in preferences.
So you can read it but not write it, as there is no place to store it.
freesty
Posts: 3
Joined: 2008-09-14 19:46:47
Location: Germany

Post by freesty »

sorry :innocent:

I use the German skin where the field "Media" is labeled "Formatierter Titel" in HTML-Export. So this was a mistake from me. :zzz:
I changed it to:
SetField(fieldMedia,(GetField(fieldTranslatedTitle))); and seems to work fine!

Thank you for your Help :stupid:

best regards,
freesty
bad4u
Posts: 1148
Joined: 2006-12-11 22:54:46

Post by bad4u »

I use the German skin where the field "Media" is labeled "Formatierter Titel" in HTML-Export. So this was a mistake from me.
Are you sure ? On german language file HTML export tags use "Formatierter Titel" for $$ITEM_FORMATTEDTITLE and "Datenträgerbeschriftung" for $$ITEM_MEDIA - and both seem correct this way.

Maybe you mixed up something and have set "Formatted Title" (=Formatierter Titlel) to "Media Label" (=Datenträgerbezeichnung) on the preferences ? Variable "fieldFormattedTitle" then contains same as "fieldMedia" I guess. You could check this on "Tools -> Einstellungen -> Film-Liste -> Titel-Formatierung" where you can change the appearance of FormattedTitle, which is mainly used for the look of your movie list ("Formatted Title" nennt sich dort allerdings "Angezeigter Titel")
freesty
Posts: 3
Joined: 2008-09-14 19:46:47
Location: Germany

Post by freesty »

you are right, it's like you said. :shaking:

I think i need some sleep :zzz: :D
antp
Site Admin
Posts: 9629
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

Good night then ;)
Post Reply