1 /* This file is part of Cinaest.
3 * Copyright (C) 2009 Philipp Zabel
5 * Cinaest is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
10 * Cinaest is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with Cinaest. If not, see <http://www.gnu.org/licenses/>.
21 class IMDbPlugin : Plugin {
22 public override void hello (Gtk.Window window) {
23 string filename = Path.build_filename (Environment.get_user_cache_dir(),
24 "cinaest", "imdb.db", null);
25 stdout.printf ("IMDb Plugin Loaded. Cache Db: %s\n", filename);
27 if (!FileUtils.test (filename, FileTest.EXISTS)) {
28 var note = new Note.confirmation (window, "There is no local copy of the Internet Movie Database (IMDb). Download it now?\n\nThis can be started later from the Settings dialog.");
35 public override void get_movies (string filter, Plugin.ReceiveMovieFunction callback, int limit) {
38 public override void add_movie (Movie movie) {
43 public Type register_plugin () {
44 // types are registered automatically
45 return typeof (IMDbPlugin);