IMDb plugin: implement get_cast method
authorPhilipp Zabel <philipp.zabel@gmail.com>
Sun, 15 Aug 2010 10:15:29 +0000 (12:15 +0200)
committerPhilipp Zabel <philipp.zabel@gmail.com>
Mon, 16 Aug 2010 13:11:07 +0000 (15:11 +0200)
src/plugins/imdb-plugin.vala

index b37e653..ee7f6af 100644 (file)
@@ -217,6 +217,13 @@ class IMDbMovie : Movie {
                print ("IMDb get_plot(\"%s (%d)\")\n", title, year);
                return sqlite.get_plot ("%s (%d)".printf (title, year));
        }
+
+       public override List<Role> get_cast () {
+               var sqlite = new IMDbSqlite (Path.build_filename (Environment.get_user_cache_dir (),
+                                            "cinaest", "imdb.db", null));
+               print ("IMDb get_cast(\"%s (%d)\")\n", title, year);
+               return sqlite.get_cast ("%s (%d)".printf (title, year));
+       }
 }
 
 class IMDBSource : MovieSource {