Skip to content
This repository was archived by the owner on Nov 26, 2023. It is now read-only.

Commit d4d976c

Browse files
committed
Force the identifier to be correct
1 parent 167dccd commit d4d976c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/dunctebot/sourcemanagers/pornhub/PornHubAudioSourceManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,8 @@ private AudioItem loadItemOnce(AudioReference reference) throws IOException {
138138
final String title = videoInfo.get("video_title").safeText();
139139
final String author = modelInfo.get("username").safeText();
140140
final int duration = Integer.parseInt(videoInfo.get("video_duration").safeText()) * 1000; // PornHub returns seconds
141-
// final Matcher matcher = VIDEO_REGEX.matcher(reference.identifier);
142-
final String identifier = /*matcher.matches() ? matcher.group(1) :*/ reference.identifier;
141+
final Matcher matcher = VIDEO_REGEX.matcher(reference.identifier);
142+
final String identifier = matcher.matches() ? "https://www.pornhub.com/view_video.php?viewkey=" + matcher.group(matcher.groupCount()) : reference.identifier;
143143
final String uri = reference.identifier;
144144
final String imageUrl = videoInfo.get("image_url").safeText();
145145

0 commit comments

Comments
 (0)