Personal Video Database

English => Development => Topic started by: meriator on December 16, 2008, 09:30:28 am

Title: scripting-engine callback function
Post by: meriator on December 16, 2008, 09:30:28 am
hi nostra
the script i currently working on should
import/update title and description (in german) for movie-episodes only
(may be later the cover-images too)
the movie has to be allready in the db
I imported my test-movies from IMDb
(its very boring job, to update a lot of episodes manualy)

the source-page for the new script is http://www.fernsehserien.de (http://www.fernsehserien.de)
this page is a kind of a german episode-guide

while writing this script
I have a problem
I need the MID for giving the orginal title of the episode from the db
because the season- and episode-numbers do not match
to IMDb but the orignalTitle does
so my question is.
Is it posible to implement a callback-function to the scripting-engine
which gives back the MID of an episode (of the current selected Movie),
in exchange
like
getEpisodeMID(orignalTitle of Movie-Episode)
may be we need
getMovieMID(current selected Movie) too
to do it this way
getEpisodeMID(currentMovieMID, orignalTitle of Movie-Episode)

and a function which will change movie-episode fields
like updateMovieField (MID, field-name, field-value)
this would be very great

thanks meriator

ps:I know you might be very busy, sorry
Title: Re: scripting-engine callback function
Post by: nostra on December 16, 2008, 04:03:30 pm
There is a callback function to retrieve fields: GetFieldValue(AField : Integer);
Field number 0 is MID.

There is only one problem: you need to start the script having episodes selected, not the main movie record to make the script retrieve mid for each episode.

I'll try to improve this functionality in future.
Title: Re: scripting-engine callback function
Post by: meriator on December 17, 2008, 01:44:44 am
so I wait for the future
cause I cant find the episode by sendeing its org.title
I have to use the org.title of the main-movie to get to the right page

thanks meriator