|
@@ -78,15 +78,27 @@ if ($Cache->get_value('manga_fill_json_'.$gid)) {
|
78
|
78
|
}
|
79
|
79
|
|
80
|
80
|
$title = html_entity_decode($json['title'], ENT_QUOTES);
|
81
|
|
- $title = preg_replace("/\(([^()]*+|(?R))*\)/","", $title);
|
82
|
|
- $title = trim(preg_replace("/\[([^\[\]]*+|(?R))*\]/","", $title));
|
|
81
|
+ $title = preg_replace("/^((?: ?\(.*?\) ?| ?\[.*?\] ?)*)?(.*?)((?: ?\(.*?\)| ?\[.*?\]).*)?$/", "$2", $title);
|
|
82
|
+ $title = trim(str_replace("’", "'", $title), " ");
|
|
83
|
+ $title_rj = "";
|
83
|
84
|
$title_jp = html_entity_decode($json['title_jpn'], ENT_QUOTES);
|
84
|
|
- $title_jp = preg_replace("/\(([^()]*+|(?R))*\)/","", $title_jp);
|
85
|
|
- $title_jp = trim(preg_replace("/\[([^\[\]]*+|(?R))*\]/","", $title_jp));
|
|
85
|
+ $title_jp = preg_replace("/^((?: ?\(.*?\) ?| ?\[.*?\] ?)*)?(.*?)((?: ?\(.*?\)| ?\[.*?\]).*)?$/", "$2", $title_jp);
|
|
86
|
+ $title_jp = trim($titljp, " ");
|
|
87
|
+
|
|
88
|
+ if(strpos($title, "|") !== false) {
|
|
89
|
+ $titles = explode("|", $title);
|
|
90
|
+ $title_rj = trim($titles[0], " ");
|
|
91
|
+ $title = trim($titles[1], " ");
|
|
92
|
+ }
|
|
93
|
+ if($title_rj == "" && trim(preg_replace("/xxx|sex|circle|dol|[bghkmnprjcl]{1,2}([auoei]|y[auo])|[sz]{1,2}[auoe]|[dft]{1,2}[aeo]|[vw]{1,2}[ao]|([fv]{1,2}|ts|t)u|(j{1,2}|[cs]h)(i|y[auo])|y{1,2}[auo]|[auoien]|cc|s[ht]|ssh/i", "", str_replace("vol", "", preg_replace("/[^A-Za-z]/", "", strtolower($title))))) == "") {
|
|
94
|
+ $title_rj = $title;
|
|
95
|
+ $title = "";
|
|
96
|
+ }
|
86
|
97
|
|
87
|
98
|
$json_str = [
|
88
|
99
|
'id' => $gid,
|
89
|
100
|
'title' => $title,
|
|
101
|
+ 'title_rj' => $title_rj,
|
90
|
102
|
'title_jp' => $title_jp,
|
91
|
103
|
'artists' => $artists,
|
92
|
104
|
'circle' => $circle,
|