diff --git a/components/Settings/Crunchyroll.vue b/components/Settings/Crunchyroll.vue
index 8271da6..6c349ec 100644
--- a/components/Settings/Crunchyroll.vue
+++ b/components/Settings/Crunchyroll.vue
@@ -26,13 +26,13 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
Fallback to non-drm stream if no widevine key provided
diff --git a/components/Settings/Main.vue b/components/Settings/Main.vue
index 5ba6781..d848b62 100644
--- a/components/Settings/Main.vue
+++ b/components/Settings/Main.vue
@@ -113,7 +113,8 @@ const locales = ref>([
{ locale: 'th-TH', name: 'TH' },
{ locale: 'vi-VN', name: 'VI' },
{ locale: 'id-ID', name: 'ID' },
- { locale: 'ko-KR', name: 'KO' }
+ { locale: 'ko-KR', name: 'KO' },
+ { locale: 'zh-CN', name: 'CN' },
])
const selectedVideoQuality = ref()
diff --git a/pages/addanime.vue b/pages/addanime.vue
index 94df0f7..7c9f297 100644
--- a/pages/addanime.vue
+++ b/pages/addanime.vue
@@ -387,7 +387,8 @@ const locales = ref>([
{ locale: 'th-TH', name: 'TH' },
{ locale: 'vi-VN', name: 'VI' },
{ locale: 'id-ID', name: 'ID' },
- { locale: 'ko-KR', name: 'KO' }
+ { locale: 'ko-KR', name: 'KO' },
+ { locale: 'zh-CN', name: 'CN' },
])
const isProduction = process.env.NODE_ENV !== 'development'
diff --git a/src/api/routes/crunchyroll/crunchyroll.service.ts b/src/api/routes/crunchyroll/crunchyroll.service.ts
index ede9bcd..87b4d41 100644
--- a/src/api/routes/crunchyroll/crunchyroll.service.ts
+++ b/src/api/routes/crunchyroll/crunchyroll.service.ts
@@ -372,38 +372,38 @@ export async function crunchyGetPlaylist(q: string, geo: string | undefined) {
name: 'Edge',
url: `/web/edge/play`
},
+ // {
+ // id: 7,
+ // name: 'Safari',
+ // url: `/web/safari/play`
+ // },
{
id: 7,
- name: 'Safari',
- url: `/web/safari/play`
- },
- {
- id: 8,
name: 'Chrome',
url: `/web/chrome/play`
},
{
- id: 9,
+ id: 8,
name: 'Web Fallback',
url: `/web/fallback/play`
},
+ // {
+ // id: 10,
+ // name: 'Iphone',
+ // url: `/ios/iphone/play`
+ // },
+ // {
+ // id: 11,
+ // name: 'Ipad',
+ // url: `/ios/ipad/play`
+ // },
{
- id: 10,
- name: 'Iphone',
- url: `/ios/iphone/play`
- },
- {
- id: 11,
- name: 'Ipad',
- url: `/ios/ipad/play`
- },
- {
- id: 12,
+ id: 9,
name: 'Android',
url: `/android/phone/play`
},
{
- id: 13,
+ id: 10,
name: 'Samsung TV',
url: `/tv/samsung/play`
}
diff --git a/src/api/routes/service/service.service.ts b/src/api/routes/service/service.service.ts
index 00d84ed..77d7345 100644
--- a/src/api/routes/service/service.service.ts
+++ b/src/api/routes/service/service.service.ts
@@ -636,36 +636,43 @@ export async function downloadCrunchyrollPlaylist(
}
if (!subPlaylist) {
- await updatePlaylistByID(downloadID, 'failed')
- console.log('Subtitle Playlist not found')
- messageBox('error', ['Cancel'], 2, 'Subtitle Playlist not found', 'Subtitle Playlist not found', 'Subtitle Playlist not found')
+ console.log(`Subtitle Playlist for ${s} not found, skipping`)
+ messageBox(
+ 'warning',
+ ['Cancel'],
+ 2,
+ `Subtitle Playlist for ${s} not found`,
+ `Subtitle Playlist for ${s} not found`,
+ `Sub Playlist for ${s} not found, skipping download`
+ )
server.logger.log({
level: 'error',
- message: 'Subtitle Playlist not found',
+ message: `Subtitle Playlist for ${s} not found, skipping`,
timestamp: new Date().toISOString(),
- section: 'crunchyrollDownloadProcess'
+ section: 'crunchyrollSubtitleDownloadProcess'
})
- return
}
- const found = subPlaylist.data.subtitles.find((sub) => sub.language === s)
- if (found) {
- subDownloadList.push({ ...found, isDub: false })
- console.log(`Subtitle ${s}.ass found, adding to download`)
- server.logger.log({
- level: 'info',
- message: `Subtitle ${s}.ass found in Download ${downloadID}, adding to download`,
- timestamp: new Date().toISOString(),
- section: 'crunchyrollDownloadProcessSubtitles'
- })
- } else {
- console.warn(`Subtitle ${s}.ass not found, skipping`)
- server.logger.log({
- level: 'warn',
- message: `Subtitle ${s}.ass not found in Download ${downloadID}, skipping`,
- timestamp: new Date().toISOString(),
- section: 'crunchyrollDownloadProcessSubtitles'
- })
+ if (subPlaylist) {
+ const found = subPlaylist.data.subtitles.find((sub) => sub.language === s)
+ if (found) {
+ subDownloadList.push({ ...found, isDub: false })
+ console.log(`Subtitle ${s}.ass found, adding to download`)
+ server.logger.log({
+ level: 'info',
+ message: `Subtitle ${s}.ass found in Download ${downloadID}, adding to download`,
+ timestamp: new Date().toISOString(),
+ section: 'crunchyrollDownloadProcessSubtitles'
+ })
+ } else {
+ console.warn(`Subtitle ${s}.ass not found, skipping`)
+ server.logger.log({
+ level: 'warn',
+ message: `Subtitle ${s}.ass not found in Download ${downloadID}, skipping`,
+ timestamp: new Date().toISOString(),
+ section: 'crunchyrollDownloadProcessSubtitles'
+ })
+ }
}
}
diff --git a/src/api/services/chapter.ts b/src/api/services/chapter.ts
index f97ac70..8dacd63 100644
--- a/src/api/services/chapter.ts
+++ b/src/api/services/chapter.ts
@@ -40,8 +40,6 @@ export async function createChapterFile(rawchapters: VideoMetadata, dir: string,
var chapters: string[] = []
chapters.push(';FFMETADATA1')
- chapters.push(`title=${mediaid}`)
- chapters.push(`artist=Crunchyroll`)
chapters.push(``)
if (rawchapters.intro && rawchapters.intro.type && rawchapters.intro.start && rawchapters.intro.end) {
diff --git a/src/api/services/subs.ts b/src/api/services/subs.ts
index 92428e4..f141bb6 100644
--- a/src/api/services/subs.ts
+++ b/src/api/services/subs.ts
@@ -134,7 +134,7 @@ function resamplePOSSubtitle(subtitle: string, ox: number, oy: number, nx: numbe
}
if (line.includes('\\fs')) {
- let posMatches = line.matchAll(/\\fs(-?\d+(?:\.\d+)?)/g)
+ let posMatches = line.matchAll(/\\fs(\d+(?:\.\d+)?)/g)
for (let posMatch of posMatches) {
let font = parseInt(posMatch[1])
let newFontSize = Math.round((font / oy) * ny)
@@ -154,6 +154,22 @@ function resamplePOSSubtitle(subtitle: string, ox: number, oy: number, nx: numbe
}
lines[i] = line
}
+
+ if (line.match(/m\s|l\s/)) {
+ let posMatches = line.matchAll(/([ml])\s*(-?\d+(?:\.\d+)?)\s*(-?\d+(?:\.\d+)?)/g)
+ for (let posMatch of posMatches) {
+ let command = posMatch[1]
+ let oldX = parseFloat(posMatch[2])
+ let oldY = parseFloat(posMatch[3])
+
+ let newX = Math.round((oldX / ox) * nx)
+ let newY = Math.round((oldY / oy) * ny)
+
+ let newCommand = `${command} ${newX} ${newY}`
+ line = line.replace(posMatch[0], newCommand)
+ }
+ lines[i] = line
+ }
}
return lines.join('\n')