projects
/
cinaest
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
823f663
)
IMDb SQLite class: set rating to -1 to indicate a NULL value in the database
author
Philipp Zabel
<philipp.zabel@gmail.com>
Fri, 16 Jul 2010 17:02:16 +0000
(19:02 +0200)
committer
Philipp Zabel
<philipp.zabel@gmail.com>
Thu, 5 Aug 2010 19:05:00 +0000
(21:05 +0200)
src/imdb/imdb-sqlite.vala
patch
|
blob
|
history
diff --git
a/src/imdb/imdb-sqlite.vala
b/src/imdb/imdb-sqlite.vala
index
81e0672
..
10065c0
100644
(file)
--- a/
src/imdb/imdb-sqlite.vala
+++ b/
src/imdb/imdb-sqlite.vala
@@
-342,7
+342,11
@@
class IMDbSqlite : Object {
if (rc == Sqlite.ROW) {
int year = stmt.column_int (1);
string title = stmt.column_text (0);
- int rating = stmt.column_int (2);
+ int rating;
+ if (stmt.column_type (2) != Sqlite.NULL)
+ rating = stmt.column_int (2);
+ else
+ rating = -1;
int genres = stmt.column_int (3);
string aka = null;
if (match != null && !(filter.matches_title (strip_year (title, year)))) {