IMDb downloader: optimize SQLlite database for the common case
[cinaest] / src / imdb / imdb-plaintext-downloader.vala
index e3df558..821c9a2 100644 (file)
@@ -79,8 +79,6 @@ class IMDbDownloadServer : Object, IMDbDownloader {
                        if (MOVIES in flags) {
                                description_changed ("Downloading movie list ...");
                                downloader.download (url + "movies.list.gz", movie_parser);
-                               description_changed ("Creating title index ...");
-                               sqlite.create_title_index ();
                        }
                        percent_finished = 33;
                        if (GENRES in flags) {
@@ -100,7 +98,8 @@ class IMDbDownloadServer : Object, IMDbDownloader {
                }
 
                description_changed ("Creating indices ...");
-               sqlite.create_votes_index ();
+               if (MOVIES in flags)
+                       sqlite.create_votes_index ();
 
                if (!cancellable.is_cancelled ()) {
                        stdout.printf ("Download complete.\n");