Fixes https://bugs.maemo.org/show_bug.cgi?id=8250.
expect_tag ("span"); // class=info
string[] runtime_and_fsk = {};
double rating = 0.0;
expect_tag ("span"); // class=info
string[] runtime_and_fsk = {};
double rating = 0.0;
- if (parse_tag () == "nobr") {
+ var tag = parse_tag ();
+ if (tag == "a") {
+ // Trailer
+ expect_tag ("/a");
+ tag = parse_tag ();
+ }
+ if (tag == "a") {
+ // IMDb
+ expect_tag ("/a");
+ tag = parse_tag ();
+ }
+ if (tag == "nobr") {
expect_tag ("nobr");
string rating_string = parse_tag_attribute ("img", "alt").offset (6); // "Rated " ->"0.0 out of 5.0"
rating = rating_string.to_double ();
expect_tag ("nobr");
string rating_string = parse_tag_attribute ("img", "alt").offset (6); // "Rated " ->"0.0 out of 5.0"
rating = rating_string.to_double ();
expect_tag ("/nobr");
expect_tag ("/nobr");
runtime_and_fsk = parse_text ().replace ("‎", "").offset (3).split (" - ");
expect_tag ("/nobr");
expect_tag ("/nobr");
runtime_and_fsk = parse_text ().replace ("‎", "").offset (3).split (" - ");
+ if (parse_tag () == "a") {
+ // Trailer
+ expect_tag ("/a");
+ if (parse_tag () == "a") {
+ // IMDb link
+ expect_tag ("/a");
+ expect_tag ("/span");
+ }
+ }
}
expect_tag ("div"); // class=times
var showtimes = parse_text ().replace (" ", ",");
}
expect_tag ("div"); // class=times
var showtimes = parse_text ().replace (" ", ",");
- expect_tag ("/div");
- expect_tag ("/div");
+ while (parse_tag () == "a") {
+ showtimes += parse_text () + ",";
+ expect_tag ("/a");
+ }
if (pattern == null) {
if (!title.has_prefix (_filter.title))
if (pattern == null) {
if (!title.has_prefix (_filter.title))