Author |
Topic |
|
rocman
Junior Member
Australia
117 Posts |
Posted - 27 Jan 2013 : 20:38:24
|
Hello there...
I wrote a new script for the API3 of themoviedb.org.
The script supports the following features: Languages (more are possible if needed): - English - German - Italian - French
Movie Search: All movie titles in the search list are english! Nevertheless your import will be localized in your choosen language! If you want localized movie titles in the search list you have to edit the script (change language=en to language=de or language=it or language=fr in #WEBQUERY# string)! Maybe Alessio or I can upload localized script versions, but this would result in a total of 8 new scripts (4 for movie imports, 4 for actor imports). I didn't find a way to use other variables in the #WEBQUERY# string than #MOVIE#! The script checks if there is a translated version of your searched movie on TMDb. If so it shows this in your search results or the script falls back to english import. In front of each search result you see what language will be imported. Furthermore you can see the movie release year.
Movie data: - MovieID - Movie title - Original movie title - Director/s - Actors (name, character in movie) - Actors extended data (picture [scaled or full size], birthday, deathday, biography, birthplace [town and country], filmography, webid) - Genre/s (seperately in XMM8) - TMDb rating - Plot - Tagline - Runtime - Production countries - Movie release year - Poster/s (scaled or full size) - Backdrop/s / Fanart (full size only) - Producer/s - Writer/s - Photographer/s - Composer/s - Production studio/s - MPAA (localized, with US fallback) - Official website - Budget -> in Custom 1 or Budget in XMM8 - Revenue -> in Custom 2 or Revenue in XMM8 - Release Date -> in Custom 3 - IMDB-Link -> in Custom 8 or IMDB Link in XMM8
Options: - Language (EN, DE, IT, FR) - Poster (none, only first one, all) - Postersize (scaled to width 500, full size) - Backdrop (none, only first one, all) - Detailed actors information (no, yes) - Overwrite existing detailed actors information (no, yes) -> speed up import if actor already exists in database - Actors picture (no, yes) - Actors picture size (scaled to width 185, full size)
An actor only import script is available, too!
You can download the scripts here: https://docs.google.com/folder/d/0Bx5mVBWjZDagNHdHRUJXVGxFelE/edit Click on script, then choose File -> Download!
I also mailed them to Alessio for uploading to server.
If you find any bugs, you can write it down here. I will have a look after it... |
Edited by - rocman on 27 Jan 2013 20:40:01 |
|
deafvader
New Member
United Kingdom
76 Posts |
Posted - 30 Jan 2013 : 18:28:37
|
When i change the default settings of the script it doesn't seem to work for me anymore.
I think a user config file is not being made when changes are done. |
Edited by - deafvader on 30 Jan 2013 18:33:10 |
|
|
rocman
Junior Member
Australia
117 Posts |
Posted - 31 Jan 2013 : 08:07:36
|
What option you are changing and what does not work then? I will have a look after it... Or do you mean that your settings are not saved? Check if the <scriptname>.txt file is not read only. |
|
|
deafvader
New Member
United Kingdom
76 Posts |
Posted - 01 Feb 2013 : 04:44:10
|
The options i changed are all fanart, overwrite actor's. Search doesn't find any film. If i reset them back search works again. Read only is not ticked.
I'm currently booted into Win7, so it could be a permissions thing. I'll see what it happens when i go back to XP. |
|
|
rocman
Junior Member
Australia
117 Posts |
Posted - 01 Feb 2013 : 18:29:05
|
Ah... yes, you're right. I found the error - there's a wrong jump point in the script, if you change a specific option. I will upload the new version, asap.
--- EDIT --- OK, update is online. Your search should work now with your settings. |
Edited by - rocman on 01 Feb 2013 20:13:10 |
|
|
rocman
Junior Member
Australia
117 Posts |
Posted - 04 Feb 2013 : 21:06:16
|
Version v1.5.1 of "THEMOVIEDB.ORG(API3)" and v1.2.1 of "THEMOVIEDB.ORG[Actors](API3)" is now online for both XMM7 and XMM8 (refer to the link in the first posting)!
Fixes: - movies without actor information (no actors) are now importing properly - actor biography with special characters is now fully imported - added some special character substitutions - some other optimizations which i don't remember :P |
|
|
RedAlan
Starting Member
7 Posts |
|
rocman
Junior Member
Australia
117 Posts |
Posted - 08 Feb 2013 : 18:14:30
|
Sounds that you are using the XMM7 version of the script with XMM8. Try to download the "THEMOVIEDB.ORG(API3)_for_Rel_8.txt" script or add the following line to the script:
#USEOLDENGINE#=TRUE (for example below the line with #SCRIPTGENERATION#) |
Edited by - rocman on 08 Feb 2013 18:15:01 |
|
|
RedAlan
Starting Member
7 Posts |
|
smuche55
Starting Member
France
10 Posts |
Posted - 15 Feb 2013 : 23:51:19
|
Hi !
I do this to put "collection name" in "custom4" : #CUSTOM4# #STARTREADWEB# #FINDLINE#="belongs_to_collection":{"id"#10# #ONERROR#=*OK* #IF# #10#==#00# #WRITEWARNING#= attention pb de site #GOTO#=NOCOLLECTION #ENDIF# #FIND#="belongs_to_collection"#11# #ONERROR#=*OK* #FIND#="name"#11# #ONERROR#=*OK* #FIND#=,#12# #ONERROR#=*OK* #COMPUTEVAR#=#11#+7 #COMPUTEVAR#=#12#-1 #TAKEWORD#=#13#,#11#,#12# #TAKECUSTOM4#=#13# :NOCOLLECTION #ENDCUSTOM4#
But i perfer to have the name of collection in english (not in french) How can i do this ? i test with open/loadwebslot and opennewweb, i think i dont use the good term. |
Sorry for my poor english :'( |
|
|
rocman
Junior Member
Australia
117 Posts |
Posted - 16 Feb 2013 : 11:09:15
|
I assume that you changed your script language to "fr". In this case you have to open a new website to get the english collection name. Try this: Exchange #STARTREADWEB# with the following code:
#STRING#=#07#=http://api.themoviedb.org/3/movie/#70#?api_key=#79#&language=en
#OPENNEWWEB#=#07# Then add #RESTOREWEB# after your :NOCOLLECTION
|
|
|
smuche55
Starting Member
France
10 Posts |
Posted - 16 Feb 2013 : 14:35:32
|
It doesn't work and return nothing In magic script editor, the script always go this way : #IF# #10#==#00# #WRITEWARNING#= attention pb de site #GOTO#=NOCOLLECTION
never find "belong_..."
|
Sorry for my poor english :'( |
|
|
rocman
Junior Member
Australia
117 Posts |
Posted - 16 Feb 2013 : 15:14:47
|
Ah... I see... there is a difference with #OPENNEWWEB# / #FINDLINE# and if there is only one websiteline returned... This should work for you:
#CUSTOM4#
#STRING#=#07#=http://api.themoviedb.org/3/movie/#70#?api_key=#79#&language=en
#OPENNEWWEB#=#07#
#STARTREADWEB#
#FIND#="belongs_to_collection":{"id"#11# #ONERROR#=*OK*
#IF# #11#==#00#
#WRITEWARNING#= attention pb de site
#GOTO#=NOCOLLECTION
#ENDIF#
#FIND#="name"#11# #ONERROR#=*OK*
#FIND#=,#12# #ONERROR#=*OK*
#COMPUTEVAR#=#11#+7
#COMPUTEVAR#=#12#-1
#TAKEWORD#=#13#,#11#,#12#
#TAKECUSTOM4#=#13#
:NOCOLLECTION
#RESTOREMAIN#
#ENDCUSTOM4# |
|
|
smuche55
Starting Member
France
10 Posts |
Posted - 16 Feb 2013 : 16:02:00
|
Thank
it work well. |
Sorry for my poor english :'( |
|
|
g40
Starting Member
Italy
3 Posts |
Posted - 18 Feb 2013 : 17:11:51
|
Hi rocman, thank you for your script, it's great! I'm using it with italian language, I choose number 3 in option and change language=en with language=it in editor. Script work well but sometimes it import english version of movies, I have search these movies on tmdb website and there are an italian version with italian title. so sometimes something goes wrong choosing languages..I have also try to deselect "take direct link if only one is found" in xmm option, so when I have to choose film in direct link script engine I read: [IT] with english film title. can you help me? thank you |
Edited by - g40 on 18 Feb 2013 17:15:19 |
|
|
rocman
Junior Member
Australia
117 Posts |
Posted - 19 Feb 2013 : 17:40:35
|
Do you have one or two movie examples? Then its easier for me to have a look after it. |
|
|
g40
Starting Member
Italy
3 Posts |
Posted - 19 Feb 2013 : 18:17:20
|
thank you for your answer, italian and english title are: Il signore degli anelli: le due torri -> The Lord of the Rings: The Two Towers le crociate -> Kingdom of Heaven
also plot doesn't appear... |
|
|
smuche55
Starting Member
France
10 Posts |
Posted - 19 Feb 2013 : 19:35:09
|
the script have the same problem then Imdb's script.
symbol with a " ^ " on the top are wrong " â ê î ô û Â" the script doing a thing like that "i'" with "'" on the top the "i" |
Sorry for my poor english :'( |
|
|
rocman
Junior Member
Australia
117 Posts |
Posted - 19 Feb 2013 : 21:49:14
|
@g40: There is a bug or maybe a "feature" in TMDb API that caches your queries somehow. In short this means you search the movie with language=it (which is correct) and then you use the movie link with language=IT (uppercase, which is not a correct country value for the API). Thats why you get empty plots and no title translations.
I fixed the script. Internally it should now use only lowercase county codes and it should work now. Don't forget to change the #WEBQUERY# for your needs again (language=it).
You can download the fixed script from my first posting or wait until Alessio has uploaded it to the server.
@smuche55: Can you give me some movie examples? Its easier for me to look after the wrong chars because I don't speak french (I'm limited to "je ne sais pas" or "je ne comprend pas" ). |
|
|
rocman
Junior Member
Australia
117 Posts |
Posted - 19 Feb 2013 : 22:00:36
|
v1.8.1 of "THEMOVIEDB.ORG(API3)_for_Rel_8" v1.2.3 of "THEMOVIEDB.ORG[Actors](API3)_for_Rel_8" is now online for XMM8 and
v1.5.3 of "THEMOVIEDB.ORG(API3)" v1.2.3 of "THEMOVIEDB.ORG[Actors](API3)" is now online for XMM7
Refer to the link in the first posting!
Fixes: - added import of up to 3 trailers (XMM8 script only) - added import of keywords (XMM8 script only) - added import of Web-IDs for all crew members (XMM8 script only), ATTENTION: these are different from IMDB Web-IDs! - added import of collections to CUSTOM4 = means "Matrix" belongs to "Matrix Collection" (XMM8 script only) -> thanks to smuche55 for the idea - workaround for cached api queries for better translation results (country code has to be lowercase) |
|
|
g40
Starting Member
Italy
3 Posts |
Posted - 20 Feb 2013 : 09:54:21
|
Thank you rocman, now it's perfect! |
|
|
Topic |
|
|