From d43d59ed7ef0dfb10cd3066551abf4fde6003ffa Mon Sep 17 00:00:00 2001 From: DariusIII Date: Thu, 22 Jun 2017 11:44:49 +0200 Subject: [PATCH 1/9] Fixed fetching information from PopPorn, updated the logo --- Changelog | 2 + nntmux/processing/adult/Popporn.php | 90 ++++++++++++--------- www/themes/shared/images/icons/popporn.png | Bin 834 -> 1333 bytes 3 files changed, 55 insertions(+), 37 deletions(-) diff --git a/Changelog b/Changelog index 1cb029120..b3fd87a1c 100755 --- a/Changelog +++ b/Changelog @@ -1,3 +1,5 @@ +2017-06-22 DariusIII + * Fix: Fixed fetching information from PopPorn, updated the logo 2017-06-21 DariusIII * Chg: Adjust all the themes XXX pages for new source icons display * Chg: Update adm, ade, aebn and hotmovies logos diff --git a/nntmux/processing/adult/Popporn.php b/nntmux/processing/adult/Popporn.php index 2dfc34a98..96138ccf6 100755 --- a/nntmux/processing/adult/Popporn.php +++ b/nntmux/processing/adult/Popporn.php @@ -1,19 +1,20 @@ _html->find('div[id=product-info] ,h3[class=highlight]', 1)) { if ($ret->next_sibling()->plaintext) { - if (!stristr(trim($ret->next_sibling()->plaintext), "POPPORN EXCLUSIVE")) { + if (stripos(trim($ret->next_sibling()->plaintext), 'POPPORN EXCLUSIVE') === false) { $this->_res['synopsis'] = trim($ret->next_sibling()->plaintext); } else { if ($ret->next_sibling()->next_sibling()) { @@ -121,6 +126,7 @@ class Popporn extends AdultMovies /** * Gets trailer video + * * @return array|bool */ public function trailers() @@ -130,13 +136,11 @@ class Popporn extends AdultMovies $ret->value = str_replace('..', '', $ret->value); $tmprsp = $this->_response; $this->_trailUrl = $ret->value; - $this->getRawHtml(); if (preg_match_all('/productID="\+(?[0-9]+),/', $this->_response, $matches)) { $productid = $matches['id'][0]; - $random = ((float)rand() / (float)getrandmax()) * 5400000000000000; + $random = ((float)mt_rand() / (float)mt_getrandmax()) * 5400000000000000; $this->_trailUrl = '/com/tlavideo/vod/FlvAjaxSupportService.cfc?random=' . $random; $this->_postParams = 'method=pipeStreamLoc&productID=' . $productid; - $this->getRawHtml(true); $ret = json_decode(json_decode($this->_response, true), true); $this->_res['trailers']['baseurl'] = self::POPURL . '/flashmediaserver/trailerPlayer.swf'; $this->_res['trailers']['flashvars'] = 'subscribe=false&image=&file=' . self::POPURL . '/' . $ret['LOC'] . '&autostart=false'; @@ -161,14 +165,12 @@ class Popporn extends AdultMovies if ($ret = $this->_html->find('div#lside', 0)) { foreach ($ret->find("text") as $e) { $e = trim($e->innertext); - $e = str_replace(',', '', $e); - $e = str_replace('...', '', $e); - $e = str_replace(' ', '', $e); - if (stristr($e, 'Country:')) { + $e = str_replace([', ', '...', ' '], '', $e); + if (stripos($e, 'Country:') !== false) { $country = true; } if ($country === true) { - if (!stristr($e, 'addthis_config')) { + if (stripos($e, 'addthis_config') === false) { if (!empty($e)) { $this->_res['productinfo'][] = $e; } @@ -187,7 +189,7 @@ class Popporn extends AdultMovies foreach ($this->_html->find('ul.stock-information') as $ul) { foreach ($ul->find('li') as $e) { $e = trim($e->plaintext); - if ($e == 'Features:') { + if ($e === 'Features:') { $features = true; $e = null; } @@ -206,6 +208,7 @@ class Popporn extends AdultMovies /** * Gets the cast members and director + * * @return array|bool */ public function cast() @@ -218,12 +221,12 @@ class Popporn extends AdultMovies $e = trim($e->innertext); $e = str_replace(',', '', $e); $e = str_replace(' ', '', $e); - if (stristr($e, 'Cast')) { + if (stripos($e, 'Cast') !== false) { $cast = true; } $e = str_replace('Cast:', '', $e); if ($cast === true) { - if (stristr($e, 'Director:')) { + if (stripos($e, 'Director:') !== false) { $director = true; $e = null; } @@ -235,7 +238,7 @@ class Popporn extends AdultMovies $e = null; } } - if (!stristr($e, 'Country:')) { + if (stripos($e, 'Country:') === false) { if (!empty($e)) { $er[] = $e; } @@ -244,14 +247,15 @@ class Popporn extends AdultMovies } } } - $this->_res['cast'] = & $er; } + $this->_res['cast'] = $er; return $this->_res; } /** * Gets categories + * * @return array */ public function genres() @@ -261,8 +265,8 @@ class Popporn extends AdultMovies foreach ($ret->find('a') as $e) { $genres[] = trim($e->plaintext); } - $this->_res['genres'] = & $genres; } + $this->_res['genres'] = $genres; return $this->_res; } @@ -277,57 +281,68 @@ class Popporn extends AdultMovies public function processSite($movie): bool { if (!empty($movie)) { - $this->_trailUrl = self::TRAILINGSEARCH . urlencode($movie); + $this->_trailUrl = self::TRAILINGSEARCH . $movie; $this->_response = getRawHtml(self::POPURL . $this->_trailUrl, $this->cookie); if ($this->_response !== false) { $this->_html->load($this->_response); if ($ret = $this->_html->find('div.product-info, div.title', 1)) { $this->_title = trim($ret->plaintext); - $title = preg_replace('/XXX/', '', $ret->plaintext); + $title = str_replace('XXX', '', $ret->plaintext); $title = preg_replace('/\(.*?\)|[-._]/i', ' ', $title); $title = trim($title); - if ($ret = $ret->find('a', 0)) { - $this->_trailUrl = trim($ret->href); - $this->_html->clear(); - unset($this->_response); - $this->_response = getRawHtml($this->_trailUrl, $this->cookie); - if ($this->_response !== false) { - $this->_html->load($this->_response); - if ($ret = $this->_html->find('#link-to-this', 0)) { - $this->_directUrl = trim($ret->href); - $this->_html->clear(); - unset($this->_response); - $this->_response = getRawHtml($this->_directUrl, $this->cookie); + similar_text(strtolower($movie), strtolower($title), $p); + if ($p >= 90) { + if ($ret = $ret->find('a', 0)) { + $this->_trailUrl = trim($ret->href); + $this->_html->clear(); + unset($this->_response); + $this->_response = getRawHtml(self::POPURL . $this->_trailUrl, $this->cookie); + if ($this->_response !== false) { $this->_html->load($this->_response); - } - similar_text(strtolower($movie), strtolower($title), $p); - if ($p >= 90) { - return true; + if ($ret = $this->_html->find('#link-to-this', 0)) { + $this->_directUrl = trim($ret->href); + $this->_html->clear(); + unset($this->_response); + $this->_response = getRawHtml($this->_directUrl, $this->cookie); + $this->_html->load($this->_response); + + return true; + } + + return false; } } + + return true; } } } else { - $this->_response = getRawHtml(self::IF18); + $this->_response = getRawHtml(self::IF18, $this->cookie); if ($this->_response !== false) { $this->_html->load($this->_response); + return true; } + return false; } + + return false; } + return false; } /** * Gets all information + * * @return array|bool */ protected function getAll() { $results = []; if (isset($this->_directUrl)) { - $results['title'] = $this->_title; + $results['title'] = $this->_title; $results['directurl'] = $this->_directUrl; } if (is_array($this->synopsis())) { @@ -351,6 +366,7 @@ class Popporn extends AdultMovies if (empty($results)) { return false; } + return $results; } } diff --git a/www/themes/shared/images/icons/popporn.png b/www/themes/shared/images/icons/popporn.png index 7e90684f9d85c48615e0e312caca5f79cb139892..bcbf8a0e8a502928ee86da474726ecb2df3ca999 100644 GIT binary patch literal 1333 zcmV-51+9>Ps;U4003jbBDy!uG|NS5yAH~DO`}_MPAtL+#_!O$&$>j9e+1UvI z0Ayrj7!?-3;_(-z6Tc#MLGq05TXBD74iZ5F6k2?*O6Eb-(j^%-yQj_vGsL z_5bJU`0K3M-j~ni8=c@@)NNyDBr}{x00009a7bBm000XU000XU0RWnu7ytkO2XskI zMF-&q76~dT$@cKC000AcNkl2EDKex~Wtu)_XRc${{cvQ@N!568 z+!RHObm-gK^rZo|#{v8Q-*-HUNxV8h;0}Az4>m-ePWQV{Q2;Gkv}nPz$W^Bb58QBZ}Lha&N>PW77B>qZ{cT?`T^bhm& zme%Vqcp#FPiB;G*8_t-hY4IoKJu!|E2_{My@!FIFQ=dpjf=0Z1!97Hhu{v`}TSg$% zrCF}E$Hy>nk(>*Xo};C)X`eZ_dGY|>*cuU1Yx(&j$c=*IlwS)ku|@lYQW>8NQ8#UMaSF&}GU@ zo}r68v08oGT}amiAgSs)rA`_d2@T^f@X|HIHzc{Rn=+?qHymLWq4p*TA-HQ-48nR% zp&0hpz~n=bI1=%DQ{LRqqJUEi6Y@Kf@^(OwBcS|KraUw8uYm3GEhJfn6RzC0I$2#H zPxh{Ya)f9i2~pT{Pr!s|(gI(GDZ(^CgEP0@BoUiiwq3kcvK!cU;!z}f--+?#PRV;- zJ<9bRBDtS7GlFpYs6BugzB&c|6&=Q4&uk%fs}{qy>WmLMNoPLkAmHVz!&9+XT&U}- z=;qfboAtA=!|46u_|tFk@+R7?1Jbh*yh&wpmQF^eofIa3=XqSk(H|=jKk+}8{?Tey zf0$;o{AP7L+bxo!Oy;a8f^qP)D2l)#Z<~UavkD*S#;* r?w?AJ@CD1$ep9w+(V|6*{{jC1Hl|9*rnr2K00000NkvXXu0mjf`3aG{ literal 834 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GXl47~2ATLR=qx{x#{!hbdP-PPzJF z+3io)-~aso|Np=L{|`RKa|KA@!fBpXb`|sbsN1lIET=6jZ(5s$H z?~T?!R#@@Sb=%Yb|NgDG^Eq_S3#aYR`zKAVuBuwJXwlQBPt{gGQd;@QX7f|Wtxr`} zKGIzEKw{a$(CrTtr6qvQW@l$#xNxEBsz++89!V{GD8Kxn5aHZn3Zv#_vm zadBO`bV+aBW3vs9owvV;+;k%#qextczpJ}DHYSFZm9?|8Q)20Z+1K9Z6_xO@u}DZt z9z1xkzP|qGi|@K?A1}N0As{H2g_Vt&nOR0ghLe+%iHT|J)~yGgeiK-9pKac~x!2wY zhJ?n%#60-)tLx(XzRMq4&%ZzS@@r6Vu(GnUot@qE>C^xG`4bWnA}J~P`t|F7|Ni~{ z_y70bf4_eJ2@4BjWMusEMXctjQhX%8@VJDF_uPulCqJ}-FZ6e^{v&vPj`u{YqS># zac*@zsya(=p@|IFl&Rq>riNZET5tV;|Js6U;_FuDXXG^LE!??u>)O4GH?N-k=4Gi+ ztziCthmwMh!))$usxDVHe(XHC^5x9PbA|VIZrsqZG<99VRJQ9!cI|q2?}*rT-)!}? zg77zQtNHi}T_&gW92Zbup8i~X$CAvb@ayJMEy3n}(VyPkn|3tkp_huB+{Yv7uUQLu z|96JZtZ44Fzwq(j$Dd#4*8FEzlhe=m9rw@@=zY}^*NBpo#FA92=AvlG%}>cptHiCrW%Ue2paup{S3j3^P6 Date: Thu, 22 Jun 2017 12:33:56 +0200 Subject: [PATCH 2/9] Increase varchar column sizes in xxxinfo table --- Changelog | 1 + build/nntmux.xml | 4 ++-- resources/db/patches/mysql/0313~xxxinfo.sql | 8 ++++++++ resources/db/schema/mysql-ddl.sql | 6 +++--- 4 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 resources/db/patches/mysql/0313~xxxinfo.sql diff --git a/Changelog b/Changelog index b3fd87a1c..fcfd825a0 100755 --- a/Changelog +++ b/Changelog @@ -1,4 +1,5 @@ 2017-06-22 DariusIII + * Chg: Increase varchar columns sizes in xxxinfo table * Fix: Fixed fetching information from PopPorn, updated the logo 2017-06-21 DariusIII * Chg: Adjust all the themes XXX pages for new source icons display diff --git a/build/nntmux.xml b/build/nntmux.xml index b8dafb212..bfc96be63 100755 --- a/build/nntmux.xml +++ b/build/nntmux.xml @@ -16,8 +16,8 @@ - 312 - 312 + 313 + 313 diff --git a/resources/db/patches/mysql/0313~xxxinfo.sql b/resources/db/patches/mysql/0313~xxxinfo.sql new file mode 100644 index 000000000..31ab5a622 --- /dev/null +++ b/resources/db/patches/mysql/0313~xxxinfo.sql @@ -0,0 +1,8 @@ +# Change director column in xxxinfo table +ALTER TABLE xxxinfo CHANGE director director VARCHAR(255) DEFAULT NULL; + +# Change genre column in xxxinfo table +ALTER TABLE xxxinfo CHANGE genre genre VARCHAR(255) NOT NULL; + +# Change title column in xxxinfo table +ALTER TABLE xxxinfo CHANGE title title VARCHAR(1024) NOT NULL; \ No newline at end of file diff --git a/resources/db/schema/mysql-ddl.sql b/resources/db/schema/mysql-ddl.sql index 2233534d2..cc1079702 100755 --- a/resources/db/schema/mysql-ddl.sql +++ b/resources/db/schema/mysql-ddl.sql @@ -1354,11 +1354,11 @@ CREATE TABLE videos_aliases ( DROP TABLE IF EXISTS xxxinfo; CREATE TABLE xxxinfo ( id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, - title VARCHAR(255) NOT NULL, + title VARCHAR(1024) NOT NULL, tagline VARCHAR(1024) NOT NULL, plot BLOB NULL DEFAULT NULL, - genre VARCHAR(64) NOT NULL, - director VARCHAR(64) DEFAULT NULL, + genre VARCHAR(255) NOT NULL, + director VARCHAR(255) DEFAULT NULL, actors VARCHAR(2500) NOT NULL, extras TEXT DEFAULT NULL, productinfo TEXT DEFAULT NULL, From 158fde2b394a41440d1e8ce34530fdad0bd1cccd Mon Sep 17 00:00:00 2001 From: DariusIII Date: Thu, 22 Jun 2017 12:40:24 +0200 Subject: [PATCH 3/9] Create all the tables in mysql-ddl.sql as InnoDB tables --- Changelog | 1 + resources/db/schema/mysql-ddl.sql | 116 +++++++++++++++--------------- 2 files changed, 59 insertions(+), 58 deletions(-) diff --git a/Changelog b/Changelog index fcfd825a0..8aba45ddb 100755 --- a/Changelog +++ b/Changelog @@ -1,4 +1,5 @@ 2017-06-22 DariusIII + * Chg: Create all the tables in mysql-ddl.sql as InnoDB tables * Chg: Increase varchar columns sizes in xxxinfo table * Fix: Fixed fetching information from PopPorn, updated the logo 2017-06-21 DariusIII diff --git a/resources/db/schema/mysql-ddl.sql b/resources/db/schema/mysql-ddl.sql index cc1079702..62c164d5a 100755 --- a/resources/db/schema/mysql-ddl.sql +++ b/resources/db/schema/mysql-ddl.sql @@ -8,7 +8,7 @@ CREATE TABLE allgroups ( PRIMARY KEY (id), INDEX ix_allgroups_name (name) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci AUTO_INCREMENT = 1; @@ -28,7 +28,7 @@ CREATE TABLE anidb_episodes ( airdate DATE NOT NULL, PRIMARY KEY (anidbid, episodeid) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET =utf8 COLLATE =utf8_unicode_ci; @@ -61,7 +61,7 @@ CREATE TABLE anidb_info ( PRIMARY KEY (anidbid), KEY ix_anidb_info_datetime (startdate, enddate, updated) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET =utf8 COLLATE =utf8_unicode_ci; @@ -79,7 +79,7 @@ CREATE TABLE anidb_titles ( COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (anidbid, type, lang, title) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci; @@ -101,7 +101,7 @@ CREATE TABLE audio_data ( PRIMARY KEY (id), UNIQUE INDEX ix_releaseaudio_releaseid_audioid (releases_id, audioid) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci AUTO_INCREMENT = 1; @@ -123,7 +123,7 @@ CREATE TABLE binaries ( INDEX ix_binaries_partcheck (partcheck), INDEX ix_binaries_collection (collections_id) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci AUTO_INCREMENT = 1; @@ -143,7 +143,7 @@ CREATE TABLE binaryblacklist ( INDEX ix_binaryblacklist_groupname (groupname), INDEX ix_binaryblacklist_status (status) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci AUTO_INCREMENT = 1000001; @@ -171,7 +171,7 @@ CREATE TABLE bookinfo ( FULLTEXT INDEX ix_bookinfo_author_title_ft (author, title), UNIQUE INDEX ix_bookinfo_asin (asin) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci AUTO_INCREMENT = 1; @@ -191,7 +191,7 @@ CREATE TABLE categories ( INDEX ix_categories_status (status), INDEX ix_categories_parentid (parentid) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci AUTO_INCREMENT = 1000001; @@ -212,7 +212,7 @@ CREATE TABLE category_regexes ( INDEX ix_category_regexes_ordinal (ordinal), INDEX ix_category_regexes_categories_id (categories_id) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci AUTO_INCREMENT = 100000; @@ -244,7 +244,7 @@ CREATE TABLE collections ( INDEX ix_collection_releaseid (releases_id), UNIQUE INDEX ix_collection_collectionhash (collectionhash) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci AUTO_INCREMENT = 1; @@ -263,7 +263,7 @@ CREATE TABLE collection_regexes ( INDEX ix_collection_regexes_status (status), INDEX ix_collection_regexes_ordinal (ordinal) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci AUTO_INCREMENT = 100000; @@ -289,7 +289,7 @@ CREATE TABLE consoleinfo ( FULLTEXT INDEX ix_consoleinfo_title_platform_ft (title, platform), UNIQUE INDEX ix_consoleinfo_asin (asin) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci AUTO_INCREMENT = 1; @@ -316,7 +316,7 @@ CREATE TABLE dnzb_failures ( failed INT UNSIGNED NOT NULL DEFAULT '0', PRIMARY KEY (release_id, userid) ) - ENGINE =MYISAM + ENGINE =InnoDB DEFAULT CHARSET =utf8 COLLATE =utf8_unicode_ci; @@ -339,7 +339,7 @@ CREATE TABLE forumpost ( KEY createddate (createddate), KEY updateddate (updateddate) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci AUTO_INCREMENT = 1; @@ -381,7 +381,7 @@ CREATE TABLE genres ( disabled TINYINT(1) NOT NULL DEFAULT '0', PRIMARY KEY (id) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci AUTO_INCREMENT = 1000001; @@ -406,7 +406,7 @@ CREATE TABLE groups ( KEY active (active), UNIQUE INDEX ix_groups_name (name) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci AUTO_INCREMENT = 1000001; @@ -420,7 +420,7 @@ CREATE TABLE invitations ( createddate DATETIME NOT NULL, PRIMARY KEY (id) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci AUTO_INCREMENT = 1; @@ -434,7 +434,7 @@ CREATE TABLE logging ( host VARCHAR(40) DEFAULT NULL, PRIMARY KEY (id) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci AUTO_INCREMENT = 1; @@ -453,7 +453,7 @@ CREATE TABLE menu ( PRIMARY KEY (id), INDEX ix_role_ordinal (role, ordinal) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci AUTO_INCREMENT = 1000001; @@ -471,7 +471,7 @@ CREATE TABLE missed_parts ( INDEX ix_missed_parts_numberid_groupsid_attempts (numberid, groups_id, attempts), UNIQUE INDEX ix_missed_parts_numberid_groupsid (numberid, groups_id) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci AUTO_INCREMENT = 1; @@ -501,7 +501,7 @@ CREATE TABLE movieinfo ( INDEX ix_movieinfo_title (title), UNIQUE INDEX ix_movieinfo_imdbid (imdbid) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci AUTO_INCREMENT = 1; @@ -528,7 +528,7 @@ CREATE TABLE musicinfo ( FULLTEXT INDEX ix_musicinfo_artist_title_ft (artist, title), UNIQUE INDEX ix_musicinfo_asin (asin) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci AUTO_INCREMENT = 1; @@ -559,7 +559,7 @@ CREATE TABLE multigroup_collections ( INDEX ix_collection_releaseid (releases_id), UNIQUE INDEX ix_collection_collectionhash (collectionhash) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci AUTO_INCREMENT = 1; @@ -571,7 +571,7 @@ CREATE TABLE multigroup_posters ( PRIMARY KEY (id) , UNIQUE KEY (poster) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci AUTO_INCREMENT = 1; @@ -592,7 +592,7 @@ CREATE TABLE content ( role INT NOT NULL DEFAULT '0', INDEX ix_showinmenu_status_contenttype_role (showinmenu, status, contenttype, role) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci AUTO_INCREMENT = 1000001; @@ -604,7 +604,7 @@ CREATE TABLE par_hashes ( hash VARCHAR(32) NOT NULL COMMENT 'hash_16k block of par2', PRIMARY KEY (releases_id, hash) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci; @@ -617,7 +617,7 @@ CREATE TABLE parts ( size MEDIUMINT UNSIGNED NOT NULL DEFAULT '0', PRIMARY KEY (binaries_id,number) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci AUTO_INCREMENT = 1; @@ -649,7 +649,7 @@ CREATE TABLE predb ( FULLTEXT INDEX ft_predb_filename (filename), INDEX ix_predb_searched (searched) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci AUTO_INCREMENT = 1; @@ -661,7 +661,7 @@ CREATE TABLE predb_hashes ( hash VARBINARY(20) NOT NULL DEFAULT '', PRIMARY KEY (hash) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci; @@ -694,7 +694,7 @@ CREATE TABLE predb_imports ( groupname VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL ) - ENGINE =MYISAM + ENGINE =InnoDB DEFAULT CHARSET =utf8 COLLATE =utf8_unicode_ci; @@ -776,7 +776,7 @@ processed', INDEX ix_releases_dehashstatus (dehashstatus,ishashed), INDEX ix_releases_reqidstatus (adddate,reqidstatus,isrequestid) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci AUTO_INCREMENT = 1 @@ -816,7 +816,7 @@ CREATE TABLE release_comments ( INDEX ix_releasecomment_releases_id (releases_id), INDEX ix_releasecomment_userid (users_id) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci AUTO_INCREMENT = 1; @@ -829,7 +829,7 @@ CREATE TABLE releases_groups ( COMMENT 'FK to groups.id', PRIMARY KEY (releases_id, groups_id) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci; @@ -840,7 +840,7 @@ CREATE TABLE release_regexes ( naming_regex_id INT(11) NOT NULL DEFAULT '0', PRIMARY KEY (releases_id, collection_regex_id, naming_regex_id) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci; @@ -862,7 +862,7 @@ CREATE TABLE releaseextrafull ( mediainfo TEXT NULL, PRIMARY KEY (releases_id) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci; @@ -878,7 +878,7 @@ CREATE TABLE release_files ( PRIMARY KEY (releases_id, name), KEY ix_releasefiles_ishashed (ishashed) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci; @@ -896,7 +896,7 @@ CREATE TABLE release_naming_regexes ( INDEX ix_release_naming_regexes_status (status), INDEX ix_release_naming_regexes_ordinal (ordinal) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci AUTO_INCREMENT = 100000; @@ -908,7 +908,7 @@ CREATE TABLE release_nfos ( nfo BLOB NULL DEFAULT NULL, PRIMARY KEY (releases_id) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci; @@ -928,7 +928,7 @@ CREATE TABLE release_search_data ( INDEX ix_releasesearch_releases_id (releases_id), INDEX ix_releasesearch_guid (guid) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci AUTO_INCREMENT = 1; @@ -943,7 +943,7 @@ CREATE TABLE release_subtitles ( PRIMARY KEY (id), UNIQUE INDEX ix_releasesubs_releases_id_subsid (releases_id, subsid) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci AUTO_INCREMENT = 1; @@ -960,7 +960,7 @@ CREATE TABLE settings ( PRIMARY KEY (section, subsection, name), UNIQUE KEY ui_settings_setting (setting) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci; @@ -982,7 +982,7 @@ CREATE TABLE sharing ( max_pull MEDIUMINT UNSIGNED NOT NULL DEFAULT '20000', PRIMARY KEY (site_guid) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci; @@ -998,7 +998,7 @@ CREATE TABLE sharing_sites ( comments MEDIUMINT UNSIGNED NOT NULL DEFAULT '0', PRIMARY KEY (id) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci AUTO_INCREMENT = 1; @@ -1014,7 +1014,7 @@ CREATE TABLE short_groups ( PRIMARY KEY (id), INDEX ix_shortgroups_name (name) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci AUTO_INCREMENT = 1; @@ -1047,7 +1047,7 @@ CREATE TABLE steam_apps ( PRIMARY KEY (appid, name), FULLTEXT INDEX ix_name_ft (name) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci; @@ -1060,7 +1060,7 @@ CREATE TABLE tmux ( PRIMARY KEY (id), UNIQUE INDEX ix_tmux_setting (setting) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci AUTO_INCREMENT = 1; @@ -1107,7 +1107,7 @@ CREATE TABLE upcoming_releases ( PRIMARY KEY (id), UNIQUE INDEX ix_upcoming_source (source, typeid) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci AUTO_INCREMENT = 1; @@ -1156,7 +1156,7 @@ CREATE TABLE users ( PRIMARY KEY (id), INDEX ix_role (role) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci AUTO_INCREMENT = 1; @@ -1171,7 +1171,7 @@ CREATE TABLE users_releases ( PRIMARY KEY (id), UNIQUE INDEX ix_usercart_userrelease (users_id, releases_id) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci AUTO_INCREMENT = 1; @@ -1188,7 +1188,7 @@ CREATE TABLE user_downloads ( KEY userid (users_id), KEY timestamp (timestamp) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci AUTO_INCREMENT = 1; @@ -1203,7 +1203,7 @@ CREATE TABLE user_excluded_categories ( PRIMARY KEY (id), UNIQUE INDEX ix_userexcat_usercat (users_id, categories_id) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci AUTO_INCREMENT = 1; @@ -1233,7 +1233,7 @@ CREATE TABLE user_movies ( PRIMARY KEY (id), INDEX ix_usermovies_userid (users_id, imdbid) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci AUTO_INCREMENT = 1; @@ -1250,7 +1250,7 @@ CREATE TABLE user_requests ( KEY userid (users_id), KEY timestamp (timestamp) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci AUTO_INCREMENT = 1; @@ -1268,7 +1268,7 @@ CREATE TABLE user_roles ( hideads TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', PRIMARY KEY (id) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci AUTO_INCREMENT = 4; @@ -1284,7 +1284,7 @@ CREATE TABLE user_series ( PRIMARY KEY (id), INDEX ix_userseries_videos_id (users_id, videos_id) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci AUTO_INCREMENT = 1; @@ -1305,7 +1305,7 @@ CREATE TABLE video_data ( videolibrary VARCHAR(50) DEFAULT NULL, PRIMARY KEY (releases_id) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci; @@ -1372,7 +1372,7 @@ CREATE TABLE xxxinfo ( PRIMARY KEY (id), UNIQUE INDEX ix_xxxinfo_title (title) ) - ENGINE = MYISAM + ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci AUTO_INCREMENT = 1; From ed2455dcb309dbe2bb58468ad158e43baef7d373 Mon Sep 17 00:00:00 2001 From: DariusIII Date: Thu, 22 Jun 2017 12:47:50 +0200 Subject: [PATCH 4/9] Update travis.yml Mysql with barracuda and large prefix support --- .travis.yml | 2 ++ Changelog | 1 + 2 files changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index ed106c2c2..1620fe6b1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,6 +39,8 @@ install: before_script: # Create mysql database and user. + - mysql -u root -e "SET GLOBAL innodb_file_format='Barracuda';" + - mysql -u root -e "SET GLOBAL innodb_large_prefix=1;" - mysql -u root -e "CREATE DATABASE TEST;" - mysql -u root -e "GRANT ALL ON TEST.* TO 'TEST'@'localhost' IDENTIFIED BY 'TEST';" - mysql -u root -e "GRANT FILE ON *.* TO 'TEST'@'localhost';" diff --git a/Changelog b/Changelog index 8aba45ddb..4e9ee92a3 100755 --- a/Changelog +++ b/Changelog @@ -1,4 +1,5 @@ 2017-06-22 DariusIII + * Chg: Update travis.yml Mysql with barracuda and large prefix support * Chg: Create all the tables in mysql-ddl.sql as InnoDB tables * Chg: Increase varchar columns sizes in xxxinfo table * Fix: Fixed fetching information from PopPorn, updated the logo From 0ec29c13796deabb3ad6e7e5e913794399ef523a Mon Sep 17 00:00:00 2001 From: DariusIII Date: Thu, 22 Jun 2017 12:48:52 +0200 Subject: [PATCH 5/9] Do the same for scrutinizer --- .scrutinizer.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.scrutinizer.yml b/.scrutinizer.yml index acc9f91f7..1de5521d4 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -5,6 +5,8 @@ build: - 'composer install --no-interaction --prefer-source --no-scripts --ignore-platform-reqs' before: - cp .env.scrutinizer .env + - mysql -u root -e "SET GLOBAL innodb_file_format='Barracuda';" + - mysql -u root -e "SET GLOBAL innodb_large_prefix=1;" - mysql -u root -e "CREATE DATABASE TEST;" - mysql -u root TEST < resources/db/schema/mysql-ddl.sql - mysql --local-infile=1 -u root -e "LOAD DATA LOCAL INFILE 'resources/db/schema/data/10-settings.tsv' IGNORE INTO TABLE TEST.settings FIELDS TERMINATED BY '\t' OPTIONALLY ENCLOSED BY '\'' LINES TERMINATED BY '\n' IGNORE 1 LINES (section,subsection,name,value,hint,setting);" From e9ee51a4f2437e64d1763c6b86a48a0cc1cc3625 Mon Sep 17 00:00:00 2001 From: DariusIII Date: Thu, 22 Jun 2017 12:52:54 +0200 Subject: [PATCH 6/9] Fix typos in travis and scrutinizer --- .scrutinizer.yml | 4 ++-- .travis.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.scrutinizer.yml b/.scrutinizer.yml index 1de5521d4..27219d931 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -5,8 +5,8 @@ build: - 'composer install --no-interaction --prefer-source --no-scripts --ignore-platform-reqs' before: - cp .env.scrutinizer .env - - mysql -u root -e "SET GLOBAL innodb_file_format='Barracuda';" - - mysql -u root -e "SET GLOBAL innodb_large_prefix=1;" + - mysql -u root -e "SET GLOBAL innodb_file_format = Barracuda;" + - mysql -u root -e "SET GLOBAL innodb_large_prefix = 1;" - mysql -u root -e "CREATE DATABASE TEST;" - mysql -u root TEST < resources/db/schema/mysql-ddl.sql - mysql --local-infile=1 -u root -e "LOAD DATA LOCAL INFILE 'resources/db/schema/data/10-settings.tsv' IGNORE INTO TABLE TEST.settings FIELDS TERMINATED BY '\t' OPTIONALLY ENCLOSED BY '\'' LINES TERMINATED BY '\n' IGNORE 1 LINES (section,subsection,name,value,hint,setting);" diff --git a/.travis.yml b/.travis.yml index 1620fe6b1..5970b3e01 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,7 +39,7 @@ install: before_script: # Create mysql database and user. - - mysql -u root -e "SET GLOBAL innodb_file_format='Barracuda';" + - mysql -u root -e "SET GLOBAL innodb_file_format=Barracuda;" - mysql -u root -e "SET GLOBAL innodb_large_prefix=1;" - mysql -u root -e "CREATE DATABASE TEST;" - mysql -u root -e "GRANT ALL ON TEST.* TO 'TEST'@'localhost' IDENTIFIED BY 'TEST';" From 773be874e0357761e1667f0f3a1d166926b8b190 Mon Sep 17 00:00:00 2001 From: DariusIII Date: Thu, 22 Jun 2017 13:07:46 +0200 Subject: [PATCH 7/9] Try again to fix scrutinizer/travis --- .scrutinizer.yml | 4 ++-- .travis.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.scrutinizer.yml b/.scrutinizer.yml index 27219d931..06499f0c4 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -5,8 +5,8 @@ build: - 'composer install --no-interaction --prefer-source --no-scripts --ignore-platform-reqs' before: - cp .env.scrutinizer .env - - mysql -u root -e "SET GLOBAL innodb_file_format = Barracuda;" - - mysql -u root -e "SET GLOBAL innodb_large_prefix = 1;" + - mysql -u root -e "SET GLOBAL innodb_file_format = 'barracuda';" + - mysql -u root -e "SET GLOBAL innodb_large_prefix = true;" - mysql -u root -e "CREATE DATABASE TEST;" - mysql -u root TEST < resources/db/schema/mysql-ddl.sql - mysql --local-infile=1 -u root -e "LOAD DATA LOCAL INFILE 'resources/db/schema/data/10-settings.tsv' IGNORE INTO TABLE TEST.settings FIELDS TERMINATED BY '\t' OPTIONALLY ENCLOSED BY '\'' LINES TERMINATED BY '\n' IGNORE 1 LINES (section,subsection,name,value,hint,setting);" diff --git a/.travis.yml b/.travis.yml index 5970b3e01..3a7bba17a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,8 +39,8 @@ install: before_script: # Create mysql database and user. - - mysql -u root -e "SET GLOBAL innodb_file_format=Barracuda;" - - mysql -u root -e "SET GLOBAL innodb_large_prefix=1;" + - mysql -u root -e "SET GLOBAL innodb_file_format = 'barracuda';" + - mysql -u root -e "SET GLOBAL innodb_large_prefix = true;" - mysql -u root -e "CREATE DATABASE TEST;" - mysql -u root -e "GRANT ALL ON TEST.* TO 'TEST'@'localhost' IDENTIFIED BY 'TEST';" - mysql -u root -e "GRANT FILE ON *.* TO 'TEST'@'localhost';" From f3e2efc4cccd2dffb8707ce33481520b63c1c789 Mon Sep 17 00:00:00 2001 From: DariusIII Date: Thu, 22 Jun 2017 13:21:42 +0200 Subject: [PATCH 8/9] Ince more --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3a7bba17a..b1a3fc21b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,7 +24,7 @@ php: - '7.1' addons: - mariadb: '10.1' + mariadb: '10.2' apt: packages: - curl @@ -39,8 +39,8 @@ install: before_script: # Create mysql database and user. - - mysql -u root -e "SET GLOBAL innodb_file_format = 'barracuda';" - - mysql -u root -e "SET GLOBAL innodb_large_prefix = true;" + - mysql -u root -e "SET GLOBAL innodb_file_format = BARRACUDA;" + - mysql -u root -e "SET GLOBAL innodb_large_prefix = 1;" - mysql -u root -e "CREATE DATABASE TEST;" - mysql -u root -e "GRANT ALL ON TEST.* TO 'TEST'@'localhost' IDENTIFIED BY 'TEST';" - mysql -u root -e "GRANT FILE ON *.* TO 'TEST'@'localhost';" From 78f1af746fe7a8d34aa4b1c6d5ecc01ee97186a4 Mon Sep 17 00:00:00 2001 From: DariusIII Date: Thu, 22 Jun 2017 13:26:24 +0200 Subject: [PATCH 9/9] Update travis and scrutinizer configs once more --- .scrutinizer.yml | 3 ++- .travis.yml | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.scrutinizer.yml b/.scrutinizer.yml index 06499f0c4..1bebf0324 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -5,8 +5,9 @@ build: - 'composer install --no-interaction --prefer-source --no-scripts --ignore-platform-reqs' before: - cp .env.scrutinizer .env + - mysql -u root -e "SET GLOBAL innodb_file_per_table = 1;" - mysql -u root -e "SET GLOBAL innodb_file_format = 'barracuda';" - - mysql -u root -e "SET GLOBAL innodb_large_prefix = true;" + - mysql -u root -e "SET GLOBAL innodb_large_prefix = 1;" - mysql -u root -e "CREATE DATABASE TEST;" - mysql -u root TEST < resources/db/schema/mysql-ddl.sql - mysql --local-infile=1 -u root -e "LOAD DATA LOCAL INFILE 'resources/db/schema/data/10-settings.tsv' IGNORE INTO TABLE TEST.settings FIELDS TERMINATED BY '\t' OPTIONALLY ENCLOSED BY '\'' LINES TERMINATED BY '\n' IGNORE 1 LINES (section,subsection,name,value,hint,setting);" diff --git a/.travis.yml b/.travis.yml index b1a3fc21b..5abc77eeb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,6 +39,7 @@ install: before_script: # Create mysql database and user. + - mysql -u root -e "SET GLOBAL innodb_file_per_table = 1;" - mysql -u root -e "SET GLOBAL innodb_file_format = BARRACUDA;" - mysql -u root -e "SET GLOBAL innodb_large_prefix = 1;" - mysql -u root -e "CREATE DATABASE TEST;"