do {
rc = stmt.step ();
if (rc == Sqlite.ROW) {
- return stmt.column_text (0);
+ return stmt.column_text (0).replace (""", "\"");
}
} while (rc == Sqlite.ROW);
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)))) {
return n;
}
- private string movie_aka (string title, string match) {
+ private string? movie_aka (string title, string match) {
string sql = "SELECT Aka FROM Akas WHERE (TitleID = (SELECT rowid FROM Movies WHERE Title = \"%s\") AND Aka %s) LIMIT 1;".printf (title, match);
Statement stmt;
int rc;