Browse Source

Autofill (JAV): Assume cover url protocol when not given

spaghetti 7 years ago
parent
commit
10a038c6fa
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      sections/ajax/javfill.php

+ 4
- 1
sections/ajax/javfill.php View File

@@ -121,9 +121,12 @@ if (!$debug && $Cache->get_value('jav_json_'.$cn)) {
121 121
     if (!$year) {
122 122
        $year = substr($jdb->query("//div[@class='movieinfo']")[0]->childNodes[1]->childNodes[0]->nodeValue, strlen("Release Date: "), 4);
123 123
     }
124
-    if(!$image) {
124
+    if (!$image) {
125 125
       $image = $jdb->query('//*[@class="cover"]/a/img')->item(0)->getAttribute('src');
126 126
     }
127
+    if (substr($image, 0, 2) == '//') {
128
+      $image = 'https:'.$image;
129
+    }
127 130
     if (!$desc) {
128 131
       //Shit neither of the sites have descriptions
129 132
       $desc = '';

Loading…
Cancel
Save