[UPDATE]FilmAffinity (+CaratulaDVD) (ES) (15/07/2014).ifs

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
morfius
Posts: 26
Joined: 2011-11-10 13:01:06

[UPDATE]FilmAffinity (+CaratulaDVD) (ES) (15/07/2014).ifs

Post by morfius »

EDIT
dont work
At this time the function UTF8Decode don't work, at least for me.
Sorry for this inconvenience.

Hi, script for fix and add new options.
Hola. Se añaden opciones nuevas y corrigen varios errores.
This script is intended for mass import/export to/from an external SQL database (automatic, no user interaction). I suggest a previous scan with the conflictive titles (and add url instead of just title).
El otro script (oficial) quizás sea más adecuado para la introducción "a mano".
El foro no permite enlaces correctos a MEGA (desconozco como incluirlos), ya que incluyen el carácter #(sostenido, almohadilla), por lo que para descargar, se debe seleccionar el siguiente enlace y abrir en una ventana nueva.
I don't know how to enter the hash(#) character in MEGA url

Code: Select all

https://mega.co.nz/#!PAlnjQLS!uvhawGKvLyMxntN3iHfNfmn3ZStchd9NA__hX0La354
// 15/07/2014 Encode en UTF8
// 22/05/2014 corregido cambios en el diseño Web
// 20/11/2013 Actors := StringReplace(Actors , #9, '');
// 20/11/2013 Actors := StringReplace(Actors , 'Documentary', '');
// 20/11/2013 DeleteTags
// 24/04/2013 Nuevos cambios en el diseño de la web
// 27/04/2012 'R.U.' por 'Gran bretaña' en País
// 27/04/2012 'Estados Unidos' por 'EE.UU.' en País
// 19/04/2012 'Serie de TV' por 'SerieTV' en Categoría
// 19/04/2012 ''<br />' por '' en Descripción
// 15/04/2012 añadido se muestra el ID en PickTree
// 05/12/2011 corregido director (sin dobles espacios)
// 28/11/2011 Posibilidad de mostrar sólo el primer género
// 25/11/2011 TODO buscar un buen site de Carátulas DVD ¿ideas?
// 25/11/2011 TODO reemplazar TextBetweenOLD
// 25/11/2011 añadido Option SeparadorReparto (saltos de línea o comas) para intérpretes
// 25/11/2011 cambio uses StringUtils1
// 25/11/2011 corregido cambios en el diseño Web
// 25/11/2011 añadido se muestra el año en PickTree
// 15/11/2011 corregido género (ahora entre comas sin espacios)
// 15/11/2011 añadido selección (se muestra un arbol en cuya raíz está(n) la(s) palabra(s) en mayúsculas)
// 15/11/2011 corregido director (ahora entre comas sin espacios, Creator, ...)
// 15/11/2011 corregido Título Original y Traducido (ahora sin (Serie de TV) (TV Series))
// Basado en todos los Scripts anteriores

Saludos!!
Last edited by morfius on 2014-07-17 21:23:15, edited 1 time in total.
antp
Site Admin
Posts: 9651
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

Thanks, it seems that the previous version of this script was rather old (2011) and not included in AMC anymore, I guess we missed some of the updates in the meantime.
I'll re-include it then.
morfius
Posts: 26
Joined: 2011-11-10 13:01:06

Post by morfius »

The function UTF8Decode return sometimes a null string.

example:
try "duque negro" (works fine)
and "braveheart" (don't work) UTF8Decode, return null string (or zero string)

This is the help provides for AMC.
function UTF8Decode(Value: string): string;
Converts a standard string to UTF8 (unicode) and the other way round. The unicode is not really supported (using "string" rather than "WideString"), so the function will only keep the characters that are available in current charset.
Any idea?
antp
Site Admin
Posts: 9651
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

It returns an empty string if the given string isn't valid UTF8
So it may be better to decode strings individually when processing them (e.g. when calling SetField) rather than decoding the whole page in one time, in case there is an invalid character somewhere in the page.
Post Reply