Compare commits

..

No commits in common. "master" and "develop" have entirely different histories.

30 changed files with 4961 additions and 5654 deletions

8
Jenkinsfile vendored
View File

@ -10,10 +10,10 @@ pipeline {
sh 'php composer.phar install --ignore-platform-reqs' sh 'php composer.phar install --ignore-platform-reqs'
} }
} }
stage('PHP 8.2') { stage('PHP 8.1') {
agent { agent {
docker { docker {
image 'php:8.2-cli-alpine' image 'php:8.1-cli-alpine'
args '-u root --privileged' args '-u root --privileged'
} }
} }
@ -23,10 +23,10 @@ pipeline {
sh 'php ./vendor/bin/phpunit --colors=never' sh 'php ./vendor/bin/phpunit --colors=never'
} }
} }
stage('PHP 8.3') { stage('PHP 8.2') {
agent { agent {
docker { docker {
image 'php:8.3-cli-alpine' image 'php:8.2-cli-alpine'
args '-u root --privileged' args '-u root --privileged'
} }
} }

View File

@ -10,6 +10,7 @@
</div> </div>
</div> </div>
</section> </section>
<script nomodule="nomodule" src="https://polyfill.io/v3/polyfill.min.js?features=es5%2CObject.assign"></script>
<script async="async" defer="defer" src="<?= $_->assetUrl('js/scripts.min.js') ?>"></script> <script async="async" defer="defer" src="<?= $_->assetUrl('js/scripts.min.js') ?>"></script>
</body> </body>
</html> </html>

View File

@ -5,7 +5,7 @@ use Aviat\AnimeClient\Kitsu;
<h2 class="toph"> <h2 class="toph">
About About
<?= $_->h->a( <?= $_->h->a(
"https://kitsu.app/users/{$data['slug']}", "https://kitsu.io/users/{$data['slug']}",
$data['name'], [ $data['name'], [
'title' => 'View profile on Kitsu' 'title' => 'View profile on Kitsu'
]) ])
@ -107,4 +107,4 @@ use Aviat\AnimeClient\Kitsu;
<?php endif ?> <?php endif ?>
</article> </article>
</section> </section>
</main> </main>

View File

@ -33,7 +33,7 @@
"amphp/http-client": "^v5.0.0", "amphp/http-client": "^v5.0.0",
"aura/html": "^2.5.0", "aura/html": "^2.5.0",
"aura/router": "^3.3.0", "aura/router": "^3.3.0",
"aura/session": "^4.0", "aura/session": "^2.1.0",
"aviat/banker": "^4.1.2", "aviat/banker": "^4.1.2",
"aviat/query": "^4.1.0", "aviat/query": "^4.1.0",
"ext-dom": "*", "ext-dom": "*",
@ -48,14 +48,13 @@
"monolog/monolog": "^3.0.0", "monolog/monolog": "^3.0.0",
"php": ">= 8.2.0", "php": ">= 8.2.0",
"psr/http-message": "^1.0.1 || ^2.0.0", "psr/http-message": "^1.0.1 || ^2.0.0",
"symfony/polyfill-mbstring": "^1.0.0",
"symfony/polyfill-util": "^1.0.0",
"tracy/tracy": "^2.8.0", "tracy/tracy": "^2.8.0",
"yosymfony/toml": "^1.0.4" "yosymfony/toml": "^1.0.4"
}, },
"replace": {
"symfony/polyfill-mbstring": "*"
},
"require-dev": { "require-dev": {
"phpstan/phpstan": "^2.0.1", "phpstan/phpstan": "^1.2.0",
"phpunit/phpunit": "^10.0.0", "phpunit/phpunit": "^10.0.0",
"roave/security-advisories": "dev-master", "roave/security-advisories": "dev-master",
"spatie/phpunit-snapshot-assertions": "^5.0.1" "spatie/phpunit-snapshot-assertions": "^5.0.1"

View File

@ -9,13 +9,13 @@
"watch": "concurrently \"npm:watch:css\" \"npm:watch:js\" --kill-others" "watch": "concurrently \"npm:watch:css\" \"npm:watch:js\" --kill-others"
}, },
"devDependencies": { "devDependencies": {
"@swc/cli": "^0.3.9", "@swc/cli": "^0.1.39",
"@swc/core": "^1.4.1", "@swc/core": "^1.2.54",
"concurrently": "^8.2.2", "concurrently": "^8.2.0",
"cssnano": "^6.0.3", "cssnano": "^6.0.1",
"postcss": "^8.4.35", "postcss": "^8.2.6",
"postcss-import": "^16.0.1", "postcss-import": "^15.0.0",
"postcss-preset-env": "^9.3.0", "postcss-preset-env": "^8.0.1",
"watch": "^1.0.2" "watch": "^1.0.2"
} }
} }

View File

@ -14,22 +14,11 @@ module.exports = config({
syntax: "ecmascript", syntax: "ecmascript",
jsx: false, jsx: false,
}, },
target: 'es2018', target: 'es2016',
loose: false, loose: false,
// keepClassNames: true,
// preserveAllComments: true,
minify: {
compress: {
unused: true,
},
mangle: true,
format: {
comments: false,
}
}
}, },
minify: true, minify: true,
sourceMaps: true, sourceMaps: false,
isModule: true, isModule: true,
} }
}); });

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
(()=>{let e=null,t=null,s="",r=e=>e.cells.item(t).textContent.toLowerCase(),n=(t,s)=>{let n=r(t),a=r(s);if(console.log("Comparing "+n+" and "+a),e.classList.contains("numeric")){let e=n.replace("episodes: ","").replace("-",0).split("/"),t=a.replace("episodes: ","").replace("-",0).split("/");e.length>1?(n=parseInt(e[0],10)/parseInt(e[1],10),a=parseInt(t[0],10)/parseInt(t[1],10)):(n=parseInt(e[0],10),a=parseInt(t[0],10))}else parseInt(n,10)&&(n=parseInt(n,10),a=parseInt(a,10));return n>a?1:n<a?-1:0},a=()=>{let t="sorting-asc"!==s?"sorting-asc":"sorting-desc";return e.className=(e.className.replace(s,"")+" "+t).trim(),s=t},l=()=>(e.classList.remove("sorting-asc","sorting-desc"),e.classList.add("sorting"),s=""),i=r=>{if(e&&t!==r.target.cellIndex&&l(),"th"===(e=r.target).nodeName.toLowerCase()){t=e.cellIndex;let r=e.offsetParent.getElementsByTagName("tbody")[0],l=Array.from(r.rows);l&&(l.sort(n),"sorting-asc"===s&&l.reverse(),a(),r.innerHtml="",l.forEach(e=>{r.appendChild(e)}))}};return{init:()=>{let e=document.getElementsByTagName("th"),t=[];for(let s=0,r=e.length;s<r;s++){let r=e[s];r.classList.add("sorting"),r.classList.add("testing"),t.push(r.onclick=i)}return t}}})().init(); const LightTableSorter=(()=>{let th=null;let cellIndex=null;let order="";const text=row=>row.cells.item(cellIndex).textContent.toLowerCase();const sort=(a,b)=>{let textA=text(a);let textB=text(b);console.log("Comparing "+textA+" and "+textB);if(th.classList.contains("numeric")){let arrayA=textA.replace("episodes: ","").replace("-",0).split("/");let arrayB=textB.replace("episodes: ","").replace("-",0).split("/");if(arrayA.length>1){textA=parseInt(arrayA[0],10)/parseInt(arrayA[1],10);textB=parseInt(arrayB[0],10)/parseInt(arrayB[1],10)}else{textA=parseInt(arrayA[0],10);textB=parseInt(arrayB[0],10)}}else if(parseInt(textA,10)){textA=parseInt(textA,10);textB=parseInt(textB,10)}if(textA>textB)return 1;if(textA<textB)return -1;return 0};const toggle=()=>{const c=order!=="sorting-asc"?"sorting-asc":"sorting-desc";th.className=(th.className.replace(order,"")+" "+c).trim();return order=c};const reset=()=>{th.classList.remove("sorting-asc","sorting-desc");th.classList.add("sorting");return order=""};const onClickEvent=e=>{if(th&&cellIndex!==e.target.cellIndex)reset();th=e.target;if(th.nodeName.toLowerCase()==="th"){cellIndex=th.cellIndex;const tbody=th.offsetParent.getElementsByTagName("tbody")[0];let rows=Array.from(tbody.rows);if(rows){rows.sort(sort);if(order==="sorting-asc")rows.reverse();toggle();tbody.innerHtml="";rows.forEach(row=>{tbody.appendChild(row)})}}};return{init:()=>{let ths=document.getElementsByTagName("th");let results=[];for(let i=0,len=ths.length;i<len;i++){let th=ths[i];th.classList.add("sorting");th.classList.add("testing");results.push(th.onclick=onClickEvent)}return results}}})();LightTableSorter.init();

View File

@ -1 +1 @@
{"version":3,"sources":["/var/www/htdocs/github.timshomepage.net/animeclient/frontEndSrc/js/base/sort-tables.js"],"sourcesContent":["const LightTableSorter = (() => {\n\tlet th = null;\n\tlet cellIndex = null;\n\tlet order = '';\n\tconst text = (row) => row.cells.item(cellIndex).textContent.toLowerCase();\n\tconst sort = (a, b) => {\n\t\tlet textA = text(a);\n\t\tlet textB = text(b);\n\t\tconsole.log(\"Comparing \" + textA + \" and \" + textB)\n\n\t\tif(th.classList.contains(\"numeric\")){\n\t\t\tlet arrayA = textA.replace('episodes: ','').replace('-',0).split(\"/\");\n\t\t\tlet arrayB = textB.replace('episodes: ','').replace('-',0).split(\"/\");\n\t\t\tif(arrayA.length > 1) {\n\t\t\t\ttextA = parseInt(arrayA[0],10) / parseInt(arrayA[1],10);\n\t\t\t\ttextB = parseInt(arrayB[0],10) / parseInt(arrayB[1],10);\n\t\t\t}\n\t\t\telse{\n\t\t\t\ttextA = parseInt(arrayA[0],10);\n\t\t\t\ttextB = parseInt(arrayB[0],10);\n\t\t\t}\n\t\t}\n\t\telse if (parseInt(textA, 10)) {\n\t\t\ttextA = parseInt(textA, 10);\n\t\t\ttextB = parseInt(textB, 10);\n\t\t}\n\t\tif (textA > textB) {\n\t\t\treturn 1;\n\t\t}\n\t\tif (textA < textB) {\n\t\t\treturn -1;\n\t\t}\n\t\treturn 0;\n\t};\n\tconst toggle = () => {\n\t\tconst c = order !== 'sorting-asc' ? 'sorting-asc' : 'sorting-desc';\n\t\tth.className = (th.className.replace(order, '') + ' ' + c).trim();\n\t\treturn order = c;\n\t};\n\tconst reset = () => {\n\t\tth.classList.remove('sorting-asc', 'sorting-desc');\n\t\tth.classList.add('sorting');\n\t\treturn order = '';\n\t};\n\tconst onClickEvent = (e) => {\n\t\tif (th && (cellIndex !== e.target.cellIndex)) {\n\t\t\treset();\n\t\t}\n\t\tth = e.target;\n\t\tif (th.nodeName.toLowerCase() === 'th') {\n\t\t\tcellIndex = th.cellIndex;\n\t\t\tconst tbody = th.offsetParent.getElementsByTagName('tbody')[0];\n\t\t\tlet rows = Array.from(tbody.rows);\n\t\t\tif (rows) {\n\t\t\t\trows.sort(sort);\n\t\t\t\tif (order === 'sorting-asc') {\n\t\t\t\t\trows.reverse();\n\t\t\t\t}\n\t\t\t\ttoggle();\n\t\t\t\ttbody.innerHtml = '';\n\n\t\t\t\trows.forEach(row => {\n\t\t\t\t\ttbody.appendChild(row);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t};\n\treturn {\n\t\tinit: () => {\n\t\t\tlet ths = document.getElementsByTagName('th');\n\t\t\tlet results = [];\n\t\t\tfor (let i = 0, len = ths.length; i < len; i++) {\n\t\t\t\tlet th = ths[i];\n\t\t\t\tth.classList.add('sorting');\n\t\t\t\tth.classList.add('testing');\n\t\t\t\tresults.push(th.onclick = onClickEvent);\n\t\t\t}\n\t\t\treturn results;\n\t\t}\n\t};\n})();\n\nLightTableSorter.init();"],"names":[],"mappings":"AAAyB,CAAC,KACzB,IAAI,EAAK,KACL,EAAY,KACZ,EAAQ,GACN,EAAO,AAAC,GAAQ,EAAI,KAAK,CAAC,IAAI,CAAC,GAAW,WAAW,CAAC,WAAW,GACjE,EAAO,CAAC,EAAG,KAChB,IAAI,EAAQ,EAAK,GACb,EAAQ,EAAK,GAGjB,GAFA,QAAQ,GAAG,CAAC,aAAe,EAAQ,QAAU,GAE1C,EAAG,SAAS,CAAC,QAAQ,CAAC,WAAW,CACnC,IAAI,EAAS,EAAM,OAAO,CAAC,cAAc,IAAI,OAAO,CAAC,IAAI,GAAG,KAAK,CAAC,KAC9D,EAAS,EAAM,OAAO,CAAC,cAAc,IAAI,OAAO,CAAC,IAAI,GAAG,KAAK,CAAC,IAC/D,CAAA,EAAO,MAAM,CAAG,GAClB,EAAQ,SAAS,CAAM,CAAC,EAAE,CAAC,IAAM,SAAS,CAAM,CAAC,EAAE,CAAC,IACpD,EAAQ,SAAS,CAAM,CAAC,EAAE,CAAC,IAAM,SAAS,CAAM,CAAC,EAAE,CAAC,MAGpD,EAAQ,SAAS,CAAM,CAAC,EAAE,CAAC,IAC3B,EAAQ,SAAS,CAAM,CAAC,EAAE,CAAC,IAE7B,MACS,SAAS,EAAO,MACxB,EAAQ,SAAS,EAAO,IACxB,EAAQ,SAAS,EAAO,YAEzB,AAAI,EAAQ,EACJ,EAEJ,EAAQ,EACJ,GAED,CACR,EACM,EAAS,KACd,IAAM,EAAI,AAAU,gBAAV,EAA0B,cAAgB,eAEpD,OADA,EAAG,SAAS,CAAG,CAAC,EAAG,SAAS,CAAC,OAAO,CAAC,EAAO,IAAM,IAAM,CAAC,EAAE,IAAI,GACxD,EAAQ,CAChB,EACM,EAAQ,KACb,EAAG,SAAS,CAAC,MAAM,CAAC,cAAe,gBACnC,EAAG,SAAS,CAAC,GAAG,CAAC,WACV,EAAQ,IAEV,EAAe,AAAC,IAKrB,GAJI,GAAO,IAAc,EAAE,MAAM,CAAC,SAAS,EAC1C,IAGG,AAA8B,OAA9B,AADJ,CAAA,EAAK,EAAE,MAAM,AAAD,EACL,QAAQ,CAAC,WAAW,GAAa,CACvC,EAAY,EAAG,SAAS,CACxB,IAAM,EAAQ,EAAG,YAAY,CAAC,oBAAoB,CAAC,QAAQ,CAAC,EAAE,CAC1D,EAAO,MAAM,IAAI,CAAC,EAAM,IAAI,EAC5B,IACH,EAAK,IAAI,CAAC,GACI,gBAAV,GACH,EAAK,OAAO,GAEb,IACA,EAAM,SAAS,CAAG,GAElB,EAAK,OAAO,CAAC,IACZ,EAAM,WAAW,CAAC,EACnB,GAEF,CACD,EACA,MAAO,CACN,KAAM,KACL,IAAI,EAAM,SAAS,oBAAoB,CAAC,MACpC,EAAU,EAAE,CAChB,IAAK,IAAI,EAAI,EAAG,EAAM,EAAI,MAAM,CAAE,EAAI,EAAK,IAAK,CAC/C,IAAI,EAAK,CAAG,CAAC,EAAE,CACf,EAAG,SAAS,CAAC,GAAG,CAAC,WACjB,EAAG,SAAS,CAAC,GAAG,CAAC,WACjB,EAAQ,IAAI,CAAC,EAAG,OAAO,CAAG,EAC3B,CACA,OAAO,CACR,CACD,CACD,CAAC,IAEgB,IAAI"} {"version":3,"sources":["/var/www/htdocs/github.timshomepage.net/animeclient/frontEndSrc/js/base/sort-tables.js"],"sourcesContent":["const LightTableSorter = (() => {\n\tlet th = null;\n\tlet cellIndex = null;\n\tlet order = '';\n\tconst text = (row) => row.cells.item(cellIndex).textContent.toLowerCase();\n\tconst sort = (a, b) => {\n\t\tlet textA = text(a);\n\t\tlet textB = text(b);\n\t\tconsole.log(\"Comparing \" + textA + \" and \" + textB)\n\n\t\tif(th.classList.contains(\"numeric\")){\n\t\t\tlet arrayA = textA.replace('episodes: ','').replace('-',0).split(\"/\");\n\t\t\tlet arrayB = textB.replace('episodes: ','').replace('-',0).split(\"/\");\n\t\t\tif(arrayA.length > 1) {\n\t\t\t\ttextA = parseInt(arrayA[0],10) / parseInt(arrayA[1],10);\n\t\t\t\ttextB = parseInt(arrayB[0],10) / parseInt(arrayB[1],10);\n\t\t\t}\n\t\t\telse{\n\t\t\t\ttextA = parseInt(arrayA[0],10);\n\t\t\t\ttextB = parseInt(arrayB[0],10);\n\t\t\t}\n\t\t}\n\t\telse if (parseInt(textA, 10)) {\n\t\t\ttextA = parseInt(textA, 10);\n\t\t\ttextB = parseInt(textB, 10);\n\t\t}\n\t\tif (textA > textB) {\n\t\t\treturn 1;\n\t\t}\n\t\tif (textA < textB) {\n\t\t\treturn -1;\n\t\t}\n\t\treturn 0;\n\t};\n\tconst toggle = () => {\n\t\tconst c = order !== 'sorting-asc' ? 'sorting-asc' : 'sorting-desc';\n\t\tth.className = (th.className.replace(order, '') + ' ' + c).trim();\n\t\treturn order = c;\n\t};\n\tconst reset = () => {\n\t\tth.classList.remove('sorting-asc', 'sorting-desc');\n\t\tth.classList.add('sorting');\n\t\treturn order = '';\n\t};\n\tconst onClickEvent = (e) => {\n\t\tif (th && (cellIndex !== e.target.cellIndex)) {\n\t\t\treset();\n\t\t}\n\t\tth = e.target;\n\t\tif (th.nodeName.toLowerCase() === 'th') {\n\t\t\tcellIndex = th.cellIndex;\n\t\t\tconst tbody = th.offsetParent.getElementsByTagName('tbody')[0];\n\t\t\tlet rows = Array.from(tbody.rows);\n\t\t\tif (rows) {\n\t\t\t\trows.sort(sort);\n\t\t\t\tif (order === 'sorting-asc') {\n\t\t\t\t\trows.reverse();\n\t\t\t\t}\n\t\t\t\ttoggle();\n\t\t\t\ttbody.innerHtml = '';\n\n\t\t\t\trows.forEach(row => {\n\t\t\t\t\ttbody.appendChild(row);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t};\n\treturn {\n\t\tinit: () => {\n\t\t\tlet ths = document.getElementsByTagName('th');\n\t\t\tlet results = [];\n\t\t\tfor (let i = 0, len = ths.length; i < len; i++) {\n\t\t\t\tlet th = ths[i];\n\t\t\t\tth.classList.add('sorting');\n\t\t\t\tth.classList.add('testing');\n\t\t\t\tresults.push(th.onclick = onClickEvent);\n\t\t\t}\n\t\t\treturn results;\n\t\t}\n\t};\n})();\n\nLightTableSorter.init();"],"names":[],"mappings":"AAAA,MAAM,iBAAmB,AAAC,CAAA,KACzB,IAAI,GAAK,KACT,IAAI,UAAY,KAChB,IAAI,MAAQ,GACZ,MAAM,KAAO,AAAC,KAAQ,IAAI,KAAK,CAAC,IAAI,CAAC,WAAW,WAAW,CAAC,WAAW,GACvE,MAAM,KAAO,CAAC,EAAG,KAChB,IAAI,MAAQ,KAAK,GACjB,IAAI,MAAQ,KAAK,GACjB,QAAQ,GAAG,CAAC,aAAe,MAAQ,QAAU,OAE7C,GAAG,GAAG,SAAS,CAAC,QAAQ,CAAC,WAAW,CACnC,IAAI,OAAS,MAAM,OAAO,CAAC,cAAc,IAAI,OAAO,CAAC,IAAI,GAAG,KAAK,CAAC,KAClE,IAAI,OAAS,MAAM,OAAO,CAAC,cAAc,IAAI,OAAO,CAAC,IAAI,GAAG,KAAK,CAAC,KAClE,GAAG,OAAO,MAAM,CAAG,EAAG,CACrB,MAAQ,SAAS,MAAM,CAAC,EAAE,CAAC,IAAM,SAAS,MAAM,CAAC,EAAE,CAAC,IACpD,MAAQ,SAAS,MAAM,CAAC,EAAE,CAAC,IAAM,SAAS,MAAM,CAAC,EAAE,CAAC,GACrD,KACI,CACH,MAAQ,SAAS,MAAM,CAAC,EAAE,CAAC,IAC3B,MAAQ,SAAS,MAAM,CAAC,EAAE,CAAC,GAC5B,CACD,MACK,GAAI,SAAS,MAAO,IAAK,CAC7B,MAAQ,SAAS,MAAO,IACxB,MAAQ,SAAS,MAAO,GACzB,CACA,GAAI,MAAQ,MACX,OAAO,EAER,GAAI,MAAQ,MACX,OAAO,GAER,OAAO,CACR,EACA,MAAM,OAAS,KACd,MAAM,EAAI,QAAU,cAAgB,cAAgB,cACpD,CAAA,GAAG,SAAS,CAAG,AAAC,CAAA,GAAG,SAAS,CAAC,OAAO,CAAC,MAAO,IAAM,IAAM,CAAA,EAAG,IAAI,GAC/D,OAAO,MAAQ,CAChB,EACA,MAAM,MAAQ,KACb,GAAG,SAAS,CAAC,MAAM,CAAC,cAAe,gBACnC,GAAG,SAAS,CAAC,GAAG,CAAC,WACjB,OAAO,MAAQ,EAChB,EACA,MAAM,aAAe,AAAC,IACrB,GAAI,IAAO,YAAc,EAAE,MAAM,CAAC,SAAS,CAC1C,QAED,GAAK,EAAE,MAAM,CACb,GAAI,GAAG,QAAQ,CAAC,WAAW,KAAO,KAAM,CACvC,UAAY,GAAG,SAAS,CACxB,MAAM,MAAQ,GAAG,YAAY,CAAC,oBAAoB,CAAC,QAAQ,CAAC,EAAE,CAC9D,IAAI,KAAO,MAAM,IAAI,CAAC,MAAM,IAAI,EAChC,GAAI,KAAM,CACT,KAAK,IAAI,CAAC,MACV,GAAI,QAAU,cACb,KAAK,OAAO,GAEb,QACA,CAAA,MAAM,SAAS,CAAG,GAElB,KAAK,OAAO,CAAC,MACZ,MAAM,WAAW,CAAC,IACnB,EACD,CACD,CACD,EACA,MAAO,CACN,KAAM,KACL,IAAI,IAAM,SAAS,oBAAoB,CAAC,MACxC,IAAI,QAAU,EAAE,CAChB,IAAK,IAAI,EAAI,EAAG,IAAM,IAAI,MAAM,CAAE,EAAI,IAAK,IAAK,CAC/C,IAAI,GAAK,GAAG,CAAC,EAAE,CACf,GAAG,SAAS,CAAC,GAAG,CAAC,WACjB,GAAG,SAAS,CAAC,GAAG,CAAC,WACjB,QAAQ,IAAI,CAAC,GAAG,OAAO,CAAG,aAC3B,CACA,OAAO,OACR,CACD,CACD,CAAA,IAEA,iBAAiB,IAAI"}

View File

@ -105,7 +105,7 @@ final class Model
public function createListItem(array $data, string $type = 'anime'): ?Request public function createListItem(array $data, string $type = 'anime'): ?Request
{ {
$mediaId = $this->getMediaId($data, $type); $mediaId = $this->getMediaId($data, $type);
if (empty($mediaId)) if ($mediaId === NULL || $mediaId === "undefined")
{ {
return NULL; return NULL;
} }

File diff suppressed because it is too large Load Diff

View File

@ -113,7 +113,7 @@ final class AnimeTransformer extends AbstractTransformer
if ((is_countable($base['mappings']['nodes']) ? count($base['mappings']['nodes']) : 0) > 0) if ((is_countable($base['mappings']['nodes']) ? count($base['mappings']['nodes']) : 0) > 0)
{ {
$links = Kitsu::mappingsToUrls($base['mappings']['nodes'], "https://kitsu.app/anime/{$base['slug']}"); $links = Kitsu::mappingsToUrls($base['mappings']['nodes'], "https://kitsu.io/anime/{$base['slug']}");
} }
return AnimePage::from([ return AnimePage::from([
@ -138,7 +138,7 @@ final class AnimeTransformer extends AbstractTransformer
'titles_more' => $titles_more, 'titles_more' => $titles_more,
'total_length' => $base['totalLength'], 'total_length' => $base['totalLength'],
'trailer_id' => $base['youtubeTrailerVideoId'], 'trailer_id' => $base['youtubeTrailerVideoId'],
'url' => "https://kitsu.app/anime/{$base['slug']}", 'url' => "https://kitsu.io/anime/{$base['slug']}",
]); ]);
} }
} }

View File

@ -182,7 +182,7 @@ final class LibraryEntryTransformer extends AbstractTransformer
'title' => $title, 'title' => $title,
'titles' => $titles, 'titles' => $titles,
'type' => (string) StringType::from($manga['subtype'])->upperCaseFirst(), 'type' => (string) StringType::from($manga['subtype'])->upperCaseFirst(),
'url' => 'https://kitsu.app/manga/' . $manga['slug'], 'url' => 'https://kitsu.io/manga/' . $manga['slug'],
]), ]),
'reading_status' => strtolower($item['status']), 'reading_status' => strtolower($item['status']),
'notes' => $item['notes'], 'notes' => $item['notes'],

View File

@ -94,7 +94,7 @@ final class MangaListTransformer extends AbstractTransformer
'title' => $title, 'title' => $title,
'titles' => $titles, 'titles' => $titles,
'type' => (string) StringType::from($manga['subtype'])->toLowerCase()->upperCaseFirst(), 'type' => (string) StringType::from($manga['subtype'])->toLowerCase()->upperCaseFirst(),
'url' => 'https://kitsu.app/manga/' . $manga['slug'], 'url' => 'https://kitsu.io/manga/' . $manga['slug'],
]), ]),
'reading_status' => strtolower($item['status']), 'reading_status' => strtolower($item['status']),
'notes' => $item['notes'], 'notes' => $item['notes'],

View File

@ -114,7 +114,7 @@ final class MangaTransformer extends AbstractTransformer
if ((is_countable($base['mappings']['nodes']) ? count($base['mappings']['nodes']) : 0) > 0) if ((is_countable($base['mappings']['nodes']) ? count($base['mappings']['nodes']) : 0) > 0)
{ {
$links = Kitsu::mappingsToUrls($base['mappings']['nodes'], "https://kitsu.app/manga/{$base['slug']}"); $links = Kitsu::mappingsToUrls($base['mappings']['nodes'], "https://kitsu.io/manga/{$base['slug']}");
} }
$data = [ $data = [
@ -134,7 +134,7 @@ final class MangaTransformer extends AbstractTransformer
'title' => $title, 'title' => $title,
'titles' => $titles, 'titles' => $titles,
'titles_more' => $titles_more, 'titles_more' => $titles_more,
'url' => "https://kitsu.app/manga/{$base['slug']}", 'url' => "https://kitsu.io/manga/{$base['slug']}",
]; ];
return MangaPage::from($data); return MangaPage::from($data);

View File

@ -2,7 +2,7 @@ schema: schema.graphql
extensions: extensions:
endpoints: endpoints:
Kitsu: Kitsu:
url: https://kitsu.app/api/graphql url: https://kitsu.io/api/graphql
headers: headers:
user-agent: JS GraphQL user-agent: JS GraphQL
introspect: true introspect: true

File diff suppressed because it is too large Load Diff

View File

@ -227,9 +227,9 @@ class Controller
protected function renderFullPage(HtmlView $view, string $template, array $data): HtmlView protected function renderFullPage(HtmlView $view, string $template, array $data): HtmlView
{ {
$csp = [ $csp = [
"default-src 'self' media.kitsu.app kitsu-production-media.s3.us-west-002.backblazeb2.com", "default-src 'self' media.kitsu.io kitsu-production-media.s3.us-west-002.backblazeb2.com",
"object-src 'none'", "object-src 'none'",
"child-src 'self' *.youtube.com", "child-src 'self' *.youtube.com polyfill.io",
]; ];
$data = array_merge($this->baseData ?? [], $data); $data = array_merge($this->baseData ?? [], $data);

View File

@ -40,7 +40,7 @@ final class Images extends BaseController
{ {
$currentUrl = (string) $this->request->getUri(); $currentUrl = (string) $this->request->getUri();
$kitsuUrl = 'https://media.kitsu.app/'; $kitsuUrl = 'https://media.kitsu.io/';
$fileName = str_replace('-original', '', $file); $fileName = str_replace('-original', '', $file);
[$id, $ext] = explode('.', basename($fileName)); [$id, $ext] = explode('.', basename($fileName));

View File

@ -23,14 +23,14 @@ use const PHP_URL_HOST;
*/ */
final class Kitsu final class Kitsu
{ {
public const AUTH_URL = 'https://kitsu.app/api/oauth/token'; public const AUTH_URL = 'https://kitsu.io/api/oauth/token';
public const AUTH_USER_ID_KEY = 'kitsu-auth-userid'; public const AUTH_USER_ID_KEY = 'kitsu-auth-userid';
public const AUTH_TOKEN_CACHE_KEY = 'kitsu-auth-token'; public const AUTH_TOKEN_CACHE_KEY = 'kitsu-auth-token';
public const AUTH_TOKEN_EXP_CACHE_KEY = 'kitsu-auth-token-expires'; public const AUTH_TOKEN_EXP_CACHE_KEY = 'kitsu-auth-token-expires';
public const AUTH_TOKEN_REFRESH_CACHE_KEY = 'kitsu-auth-token-refresh'; public const AUTH_TOKEN_REFRESH_CACHE_KEY = 'kitsu-auth-token-refresh';
public const ANIME_HISTORY_LIST_CACHE_KEY = 'kitsu-anime-history-list'; public const ANIME_HISTORY_LIST_CACHE_KEY = 'kitsu-anime-history-list';
public const MANGA_HISTORY_LIST_CACHE_KEY = 'kitsu-manga-history-list'; public const MANGA_HISTORY_LIST_CACHE_KEY = 'kitsu-manga-history-list';
public const GRAPHQL_ENDPOINT = 'https://kitsu.app/api/graphql'; public const GRAPHQL_ENDPOINT = 'https://kitsu.io/api/graphql';
/** /**
* Determine whether an anime is airing, finished airing, or has not yet aired * Determine whether an anime is airing, finished airing, or has not yet aired

View File

@ -4,7 +4,7 @@
mal_id: '28091' mal_id: '28091'
chapters: { read: 94, total: '-' } chapters: { read: 94, total: '-' }
volumes: { read: '-', total: '-' } volumes: { read: '-', total: '-' }
manga: { empty: false, genres: { }, id: '21733', image: 'https://media.kitsu.io/manga/poster_images/21733/small.jpg', slug: tonari-no-seki-kun, title: 'Tonari no Seki-kun', titles: ['My Neighbour Seki', となりの関くん], type: Manga, url: 'https://kitsu.app/manga/tonari-no-seki-kun' } manga: { empty: false, genres: { }, id: '21733', image: 'https://media.kitsu.io/manga/poster_images/21733/small.jpg', slug: tonari-no-seki-kun, title: 'Tonari no Seki-kun', titles: ['My Neighbour Seki', となりの関くん], type: Manga, url: 'https://kitsu.io/manga/tonari-no-seki-kun' }
reading_status: current reading_status: current
notes: '' notes: ''
rereading: false rereading: false
@ -16,7 +16,7 @@
mal_id: '60815' mal_id: '60815'
chapters: { read: 87, total: '-' } chapters: { read: 87, total: '-' }
volumes: { read: '-', total: '-' } volumes: { read: '-', total: '-' }
manga: { empty: false, genres: { }, id: '25491', image: 'https://media.kitsu.io/manga/poster_images/25491/small.jpg', slug: joshikausei, title: Joshikausei, titles: [女子かう生], type: Manga, url: 'https://kitsu.app/manga/joshikausei' } manga: { empty: false, genres: { }, id: '25491', image: 'https://media.kitsu.io/manga/poster_images/25491/small.jpg', slug: joshikausei, title: Joshikausei, titles: [女子かう生], type: Manga, url: 'https://kitsu.io/manga/joshikausei' }
reading_status: current reading_status: current
notes: 'Wordless, and it works.' notes: 'Wordless, and it works.'
rereading: false rereading: false

View File

@ -11,7 +11,7 @@ genres:
- 'Slice of Life' - 'Slice of Life'
links: links:
Anilist: 'https://anilist.co/anime/56769/' Anilist: 'https://anilist.co/anime/56769/'
Kitsu: 'https://kitsu.app/manga/bokura-wa-minna-kawaisou' Kitsu: 'https://kitsu.io/manga/bokura-wa-minna-kawaisou'
MyAnimeList: 'https://myanimelist.net/manga/26769' MyAnimeList: 'https://myanimelist.net/manga/26769'
id: '20286' id: '20286'
manga_type: MANGA manga_type: MANGA
@ -26,5 +26,5 @@ titles:
titles_more: titles_more:
- 'The Kawai Complex Guide to Manors and Hostel' - 'The Kawai Complex Guide to Manors and Hostel'
- 僕らはみんな河合荘 - 僕らはみんな河合荘
url: 'https://kitsu.app/manga/bokura-wa-minna-kawaisou' url: 'https://kitsu.io/manga/bokura-wa-minna-kawaisou'
volume_count: 10 volume_count: 10

View File

@ -1,7 +1,7 @@
empty: false empty: false
about: 'Web Developer, Anime Fan, Reader of VNs, and web comics.' about: 'Web Developer, Anime Fan, Reader of VNs, and web comics.'
avatar: 'https://media.kitsu.io/users/avatars/2644/original.gif' avatar: 'https://media.kitsu.io/users/avatars/2644/original.gif'
birthday: 'March 09, 1990 (34 years)' birthday: 'March 09, 1990 (33 years)'
joinDate: '' joinDate: ''
gender: male gender: male
favorites: favorites:

View File

@ -1,6 +1,6 @@
{ {
"require": { "require": {
"friendsofphp/php-cs-fixer": "^3.52.1", "friendsofphp/php-cs-fixer": "^3.6",
"rector/rector": "^1.0.3" "rector/rector": "^0.16.0"
} }
} }