English > Feature Suggestions

TheMovieDB.org

<< < (8/12) > >>

Ivek23:

--- Quote from: GazonkFoo on August 30, 2012, 08:57:06 pm ---
--- Quote from: Ivek23 on August 30, 2012, 08:13:32 am ---I wonder how the MPAA, orating, rdate and Status
added in the custom field.
--- End quote ---
I don't quite understand what you mean.
I use the AddFieldValueXML function and the fields according to this: http://www.videodb.info/help/hlp_scripting.html#fields
So no custom fields - just the standard ones.
--- End quote ---

Yeah, I know that there is no custom fields. Would be nice to have them, since certain info data different than IMDB info data.

Examples for the MPAA or rdata, how can to is data info added in the custom field:

--- Code: ---procedure ParseMovie(HTML: string);
var
  Released, MPAA, Mstatus: string;
  Runtime: Integer;
  DateParts: TWideArray;
begin
  .
  .
  .
Released := HTMLValue(HTML, 0, 0, '<released>', '</released>');
  if Released <> '' then
  begin
    ExplodeString(Released, DateParts, '-');
    Released := DateParts[2] +'.'+ DateParts[1] +'.'+ DateParts[0];
    LogMessage('rdate: '+ Released);
    AddFieldValueXML('rdate', Released);
AddCustomFieldValueByName('Release Info', Released);
  end else
    LogMessage('rdate not found');


  MPAA := HTMLValue(HTML, 0, 0, '<certification>', '</certification>');
  if MPAA <> '' then
  begin
    MPAA := MPAA;
    LogMessage('mpaa: '+ MPAA);
    AddCustomFieldValueByName('MovieDB rate', MPAA);
  end else
    LogMessage('mpaa not found');
--- End code ---

I can not find any solution for it Status, I tried with this part code,
--- Code: ---  Mstatus := HTMLValue(HTML, 0, 0, '<status>', '</status>');
  if Mstatus <> '' then
  begin
    Mstatus := Mstatus;
    LogMessage('status: '+ Mstatus);
    AddCustomFieldValueByName('Status', Mstatus);
  end else
    LogMessage('status not found');
--- End code ---
but it does not work. Is there a solution to this problem.

BTW:
Other corrections are in order, properly transmit the data. However, in
aka data only one alternative address out there on the web site is usually a number of alternative titles. In Cast data not transmit data only for players, but also as Crew information for art, camera, etc.

dma:

--- Quote from: GazonkFoo on August 30, 2012, 08:56:25 pm ---Ivek23 asked me to create a plain delphi .psf script for TMDb - so here it is (attachment).
It basically does the same as the other script but should be easier to customize (no need to compile).

--- End quote ---
Nice, this could be cloned and turned into a poster script then (from another thread discussion), along with download all/first.
I saw TheMovieDB got posters associated with language, i would probably modify it to get the first poster but from the movie original country (if available).
It doesn't seem possible to add configuration options on scripts, is it?

Also i read in the script that "//note that loading more than one poster is broken in PVD 1.0.2.3 Beta". Is it still the case? (most probably yes, as 1.0.2.3 is actually the latest available version)

GazonkFoo:

--- Quote from: Ivek23 on August 31, 2012, 10:49:34 am ---I can not find any solution for it Status, I tried with this part code,

--- End quote ---
The script uses the API - see here: http://api.themoviedb.org/2.1/
It looks like the status is just not transmitted but i think theres not much usefull information in it anyway.
A release date in the future usually indicates "not released" :P


--- Quote from: Ivek23 on August 31, 2012, 10:49:34 am ---aka data only one alternative address out there on the web site is usually a number of alternative titles.

--- End quote ---
The aka title filled at the moment is the english alternative name - whereas the aka on the homepage are the translated names.


--- Quote from: Ivek23 on August 31, 2012, 10:49:34 am ---In Cast data not transmit data only for players, but also as Crew information for art, camera, etc.

--- End quote ---
This is a bit difficult. PVD supports the following person types: actor, director, writer, composer, producer
TMDb groups the crew into departments and jobs.
Departments are (the ones i found): Actors, Directing, Writing, Sound, Production, Art, Camera, Editing, Costume+Make-Up, Crew
The list of jobs is pretty large - i don't really want to deal with them :P
What the script does atm is putting the department actors into actor, directing into director, writing into writer, sound into composer (this is already an ugly match) and production into producer (not perfect because production contains stuff like casting etc).
The other departments aren't handled at all - i could add them to a custom field if you like.


--- Quote from: dma on August 31, 2012, 02:05:29 pm ---It doesn't seem possible to add configuration options on scripts, is it?

--- End quote ---
No only plugins are configurable :(


--- Quote from: dma on August 31, 2012, 02:05:29 pm ---Also i read in the script that "//note that loading more than one poster is broken in PVD 1.0.2.3 Beta". Is it still the case? (most probably yes, as 1.0.2.3 is actually the latest available version)

--- End quote ---
Have a look at this: http://www.videodb.info/forum_en/index.php/topic,3229.0.html
I haven't found another way to download multiple posters in a script :(

Also (as you may have noticed from the source) adding more than one url doesn't seem to work - neither on 0.9.9.21 nor on 1.0.2.3
Another issue i had is preventing PVD from downloading the webpage URL which i don't care about because i only use the API.

Ivek23:

--- Quote from: GazonkFoo on August 31, 2012, 06:52:59 pm ---
--- Quote from: Ivek23 on August 31, 2012, 10:49:34 am ---In Cast data not transmit data only for players, but also as Crew information for art, camera, etc.
--- End quote ---
This is a bit difficult. PVD supports the following person types: actor, director, writer, composer, producer
TMDb groups the crew into departments and jobs.
Departments are (the ones i found): Actors, Directing, Writing, Sound, Production, Art, Camera, Editing, Costume+Make-Up, Crew
The list of jobs is pretty large - i don't really want to deal with them :P
What the script does atm is putting the department actors into actor, directing into director, writing into writer, sound into composer (this is already an ugly match) and production into producer (not perfect because production contains stuff like casting etc).
The other departments aren't handled at all - i could add them to a custom field if you like.
--- End quote ---

Yes, please other info in a custom field,but for this type of script I can not write new pieces of code or  I do not know how writing a new script (I'm not a computer programmer, just an amateur self-taught, so I asked for help).

Thanks for the comprehensive explanation.

rick.ca:

--- Quote from: GazonkFoo on August 30, 2012, 08:56:25 pm ---Ivek23 asked me to create a plain delphi .psf script for TMDb - so here it is (attachment).
It basically does the same as the other script but should be easier to customize (no need to compile).

--- End quote ---

Thanks for taking this on. This might be a good way of lightening nostra's burden in keeping things up-to-date. I haven't yet had a chance to test your script thoroughly, but I thought I'd throw out a few comments anyway... [Oops. It ended up kinda long-winded. :-[ ]

I'm not sure there's any disadvantages to a script vs. a plugin. They seem to run just as well, and have the advantage of being easily user-modified. That's particularly helpful for things like enabling/disabling specific functions and saving data in custom fields (or even in different standard fields). These modifications are also easy for anyone to do to a well-documented script. It also allows those will a little understanding of the scripting language to do things like modify or format data before it's saved. Although a script doesn't allow runtime options, many 'options' that might be sought can be handled just by using different modifications of the same script. It's arguably easier just to run the script that's modified to do exactly what you want than it is to start a plugin then have to choose an option from a prompt.

The point of this observation is the idea such a script will be most useful to users generally if it gets whatever data is available and offers to save it somewhere—if not an obvious standard field, then an arbitrarily named custom field the user may modify as appropriate and add to their database. The most difficult part for us amateurs is figuring out how to get the data. If that's done, most of us can deal with what to do with it. And some of us will even customize it further to modify and combine the data before saving it—something simply not possible with a plugin. Using this approach also relieves the author of having to respond to inevitable requests to add whatever scrap of data is offered by the source.

I'm not even sure what you've done, so forgive me if the script already includes everything offered by the API (which, I suppose, isn't necessarily everything appearing at the website). But some of my comments apply to the question of what to do with 'people data'. The first consideration here should be that combining this data from that of a different source messes up the integrity of both. The logical choice for most of us is to rely on the IMDb as a primary source for people data. A secondary source should only be used in a 'do not overwrite' mode so it's only used as a secondary source. Even that runs the risk of being run first and thereby fouling the data that should have come from the primary source.

So the best way to handle this is to offer the option of adding the data that 'fits' the standard fields—primarily for those who want to use this as the primary source. And I think what you've done with what's offered by the API is the best you can do. For those already using IMDb as a primary source, the interest is likely in (1) confirmation our IMDb data is good, and (2) capturing any additional data available (e.g., production crew). That can be done by dumping it into one memo field with any role/job function data. The names can be put in links if that information is available. If the data is easily separated (e.g., into cast and crew), it can be put in different fields. If all this can be done, it offers a full range of choices to users: use the script as a primary source, as a secondary source used only where no data is available from the primary source, and/or as a supplementary source where all the data is added to separate fields.

One thing I did notice, but I'm still not sure about, is how it's determining which poster to get. Sometimes it seemed to be the default poster. In other cases, it seemed to be ignoring all posters classified by language (and the default, at least for English movies, is most often 'English') and choosing from those classified a 'other' (often a bad choice). Does the API offer a way to select the default poster, or one classified by the same language as the user language? (I have a simple self-interest in this one. All I want from TMDb is one good poster and it's 'Overview' which I appreciate as a short synopsis.)


--- Quote ---Another issue i had is preventing PVD from downloading the webpage URL which i don't care about because i only use the API.
--- End quote ---

The URL doesn't hurt, and can be used to get to the website, should the need arise. For me, that's usually to see what other posters are available.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version