|
@@ -7,7 +7,7 @@ if (empty($_GET['url'])) {
|
7
|
7
|
$url = $_GET['url'];
|
8
|
8
|
|
9
|
9
|
$matches = array();
|
10
|
|
-preg_match('/^https?:\/\/g\.e.hentai\.org\/g\/(\d+)\/([\w\d]+)\/?$/', $url, $matches);
|
|
10
|
+preg_match('/^https?:\/\/g?\.?e.hentai\.org\/g\/(\d+)\/([\w\d]+)\/?$/', $url, $matches);
|
11
|
11
|
|
12
|
12
|
$gid = $matches[1] ?? '';
|
13
|
13
|
$token = $matches[2] ?? '';
|
|
@@ -46,10 +46,10 @@ if ($Cache->get_value('doujin_json_'.$gid) && false) {
|
46
|
46
|
|
47
|
47
|
if ($namespace == "artist") {
|
48
|
48
|
array_push($artists, ucwords($tag));
|
49
|
|
- } else if ($namespace == "language" && empty($lang)) {
|
50
|
|
- $lang = ucfirst($tag);
|
51
|
|
- } else if ($namespace == "group" && empty($circle)) {
|
52
|
|
- $circle = ucfirst($tag);
|
|
49
|
+ } else if ($namespace == "language") {
|
|
50
|
+ $lang = empty($lang) ? ucfirst($tag) : $lang;
|
|
51
|
+ } else if ($namespace == "group") {
|
|
52
|
+ $circle = empty($circle) ? ucfirst($tag) : $circle;
|
53
|
53
|
} else {
|
54
|
54
|
if ($namespace) { $tag = $tag.':'.$namespace; }
|
55
|
55
|
array_push($tags, str_replace(' ', '.', $tag));
|