Skip to content

Commit

Permalink
Fail if one of the required fields wasn't scraped
Browse files Browse the repository at this point in the history
  • Loading branch information
Hedon-dev committed Jan 6, 2025
1 parent a80f547 commit 7dd72d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions lib/plugins/official_plugins/pornhub.dart
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,8 @@ class PornhubPlugin extends PluginBase implements PluginInterface {
// pornhub only offers up to 1080p

UniversalVideoPreview uniResult = UniversalVideoPreview(
videoID: iD ?? "-",
title: title ?? "-",
videoID: iD!,
title: title!,
plugin: this,
thumbnail: thumbnail,
previewVideo:
Expand Down Expand Up @@ -444,7 +444,7 @@ class PornhubPlugin extends PluginBase implements PluginInterface {
UniversalVideoMetadata metadata = UniversalVideoMetadata(
videoID: videoId,
m3u8Uris: m3u8Map,
title: jscriptMap["video_title"] ?? "-",
title: jscriptMap["video_title"]!,
plugin: this,
author: authorString,
authorID: authorId,
Expand Down
4 changes: 2 additions & 2 deletions lib/plugins/official_plugins/xhamster.dart
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,8 @@ class XHamsterPlugin extends PluginBase implements PluginInterface {
}

UniversalVideoPreview uniResult = UniversalVideoPreview(
videoID: iD ?? "-",
title: title ?? "-",
videoID: iD!,
title: title!,
plugin: this,
thumbnail: thumbnail,
previewVideo: videoPreview != null ? Uri.parse(videoPreview) : null,
Expand Down

0 comments on commit 7dd72d3

Please sign in to comment.