Skip to content

Commit

Permalink
Fix HDB
Browse files Browse the repository at this point in the history
  • Loading branch information
Morea committed Jan 1, 2024
1 parent 054d3a6 commit da0e32d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion Find Unique Titles/dist/find.unique.titles.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -1006,6 +1006,7 @@
if (isExclusive(element)) {
element.style.display = "none";
yield null;
continue;
}
const imdbId = (0, _utils_utils__WEBPACK_IMPORTED_MODULE_0__.parseImdbId)(element.querySelector("a[data-imdb-link]")?.getAttribute("data-imdb-link"));
const {title, year} = (0, _utils_utils__WEBPACK_IMPORTED_MODULE_0__.parseYearAndTitle)(element.children[2].querySelector("a")?.textContent);
Expand All @@ -1020,7 +1021,10 @@
} catch (e) {
console.trace(e);
common_logger__WEBPACK_IMPORTED_MODULE_2__.logger.info("[{0}] Error occurred while parsing torrent: " + e, this.name());
yield null;
yield {
torrents: [],
dom: [ element ]
};
}
}
name() {
Expand Down
6 changes: 5 additions & 1 deletion Find Unique Titles/src/trackers/HDB.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ export default class HDB implements tracker {
if (isExclusive(element)) {
element.style.display = "none";
yield null;
continue;
}
const imdbId = parseImdbId(
element
Expand All @@ -116,7 +117,10 @@ export default class HDB implements tracker {
"[{0}] Error occurred while parsing torrent: " + e,
this.name()
);
yield null;
yield {
torrents: [],
dom: [element as HTMLElement],
};
}
}
}
Expand Down

0 comments on commit da0e32d

Please sign in to comment.