}
}
+class IMDbMovie : Movie {
+ public override string get_plot () {
+ var sqlite = new IMDbSqlite (Path.build_filename (Environment.get_user_cache_dir (),
+ "cinaest", "imdb.db", null));
+ print ("IMDb get_plot(\"%s (%d)\")\n", title, year);
+ return sqlite.get_plot ("%s (%d)".printf (title, year));
+ }
+}
+
class IMDBSource : MovieSource {
public override bool active { get; set construct; }
}
private void receive_movie (string title, string? aka, int year, int rating, int genres) {
- Movie movie = new Movie ();
+ var movie = new IMDbMovie ();
movie.title = title;
movie.year = year;
movie.rating = rating;
}
[ModuleInit]
-public Type register_plugin () {
+public Type register_plugin (TypeModule module) {
// types are registered automatically
return typeof (IMDbPlugin);
}