Author Topic: scripting-engine callback function  (Read 7834 times)

0 Members and 1 Guest are viewing this topic.

Offline meriator

  • User
  • ***
  • Posts: 52
    • View Profile
scripting-engine callback function
« 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
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
while 1000 thanks crawling after one....they may never reach...the journey is the reward

Offline nostra

  • Administrator
  • *****
  • Posts: 2852
    • View Profile
    • Personal Video Database
Re: scripting-engine callback function
« Reply #1 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.
Gentlemen, you can’t fight in here! This is the War Room!

Offline meriator

  • User
  • ***
  • Posts: 52
    • View Profile
Re: scripting-engine callback function
« Reply #2 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
while 1000 thanks crawling after one....they may never reach...the journey is the reward

 

anything