Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New source: Aniplay #136

Merged
merged 8 commits into from
Jan 15, 2025
Prev Previous commit
Next Next commit
extension(aniplay): misc
  • Loading branch information
Swakshan committed Jan 14, 2025
commit 6ae0c65e68a8fc6f94359dd06f97b37daee1e113
13 changes: 10 additions & 3 deletions javascript/anime/src/en/aniplay.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const mangayomiSources = [{
"iconUrl": "https://www.google.com/s2/favicons?sz=128&domain=https://aniplaynow.live/",
"typeSource": "single",
"itemType": 1,
"version": "0.0.6",
"version": "1.0.0",
"dateFormat": "",
"dateFormatLocale": "",
"pkgPath": "anime/src/en/aniplay.js"
Expand Down Expand Up @@ -142,6 +142,7 @@ class DefaultExtension extends MProvider {
name
}
}
format
countryOfOrigin
isAdult
}
Expand Down Expand Up @@ -191,6 +192,7 @@ class DefaultExtension extends MProvider {
anime.genre = [...new Set([...tagsList, ...genresList])].sort();
const studiosList = media?.studios?.nodes?.map(node => node.name).filter(Boolean) || [];
anime.author = studiosList.sort().join(", ");
anime.format = media.format
return anime;
}

Expand Down Expand Up @@ -335,8 +337,9 @@ class DefaultExtension extends MProvider {
var title = ep.title
var num = ep.number
var isFiller = ep.isFiller
var name = `E${num}: ${title}`
name = isFiller && user_mark_filler_ep === true ? `E${num}: ${title} (F)` : name

var name = isFiller && user_mark_filler_ep ? `E${num}:(F) ${title}` : `E${num}: ${title}`

var dateUpload = "createdAt" in ep ? new Date(ep.createdAt) : new Date().now()
dateUpload = dateUpload.valueOf().toString();
delete ep.img
Expand All @@ -346,6 +349,10 @@ class DefaultExtension extends MProvider {
var epUrl = `${anilistId}||${JSON.stringify(ep)}||${choice.providerId}`
chapters.push({ name, url: epUrl, dateUpload })
}

var format = animeData.format
if(format === "MOVIE") chapters[0].name = "Movie"

animeData.link = `${this.source.baseUrl}anime/${slug}`
animeData.chapters = chapters.reverse()
return animeData
Expand Down