commit
90cae4ad71
@ -26,13 +26,13 @@
|
|||||||
<option :value="4">XBOX One (DRM PROTECTED)</option>
|
<option :value="4">XBOX One (DRM PROTECTED)</option>
|
||||||
<option :value="5">Firefox (DRM PROTECTED)</option>
|
<option :value="5">Firefox (DRM PROTECTED)</option>
|
||||||
<option :value="6">Edge (DRM PROTECTED)</option>
|
<option :value="6">Edge (DRM PROTECTED)</option>
|
||||||
<option :value="7">Safari (DRM PROTECTED)</option>
|
<!-- <option :value="7">Safari (DRM PROTECTED)</option> -->
|
||||||
<option :value="8">Chrome (DRM PROTECTED)</option>
|
<option :value="7">Chrome (DRM PROTECTED)</option>
|
||||||
<option :value="9">Web Fallback (DRM PROTECTED)</option>
|
<option :value="8">Web Fallback (DRM PROTECTED)</option>
|
||||||
<option :value="10">Iphone (DRM PROTECTED)</option>
|
<!-- <option :value="10">Iphone (DRM PROTECTED)</option>
|
||||||
<option :value="11">Ipad (DRM PROTECTED)</option>
|
<option :value="11">Ipad (DRM PROTECTED)</option> -->
|
||||||
<option :value="12">Android (DRM PROTECTED)</option>
|
<option :value="9">Android (DRM PROTECTED)</option>
|
||||||
<option :value="13">Samsung TV (DRM PROTECTED)</option>
|
<option :value="10">Samsung TV (DRM PROTECTED)</option>
|
||||||
</select>
|
</select>
|
||||||
<div class="text-xs mt-2"> Fallback to non-drm stream if no widevine key provided </div>
|
<div class="text-xs mt-2"> Fallback to non-drm stream if no widevine key provided </div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -113,7 +113,8 @@ const locales = ref<Array<{ locale: string; name: string }>>([
|
|||||||
{ locale: 'th-TH', name: 'TH' },
|
{ locale: 'th-TH', name: 'TH' },
|
||||||
{ locale: 'vi-VN', name: 'VI' },
|
{ locale: 'vi-VN', name: 'VI' },
|
||||||
{ locale: 'id-ID', name: 'ID' },
|
{ locale: 'id-ID', name: 'ID' },
|
||||||
{ locale: 'ko-KR', name: 'KO' }
|
{ locale: 'ko-KR', name: 'KO' },
|
||||||
|
{ locale: 'zh-CN', name: 'CN' },
|
||||||
])
|
])
|
||||||
|
|
||||||
const selectedVideoQuality = ref<number>()
|
const selectedVideoQuality = ref<number>()
|
||||||
|
@ -387,7 +387,8 @@ const locales = ref<Array<{ locale: string; name: string }>>([
|
|||||||
{ locale: 'th-TH', name: 'TH' },
|
{ locale: 'th-TH', name: 'TH' },
|
||||||
{ locale: 'vi-VN', name: 'VI' },
|
{ locale: 'vi-VN', name: 'VI' },
|
||||||
{ locale: 'id-ID', name: 'ID' },
|
{ 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'
|
const isProduction = process.env.NODE_ENV !== 'development'
|
||||||
|
@ -372,38 +372,38 @@ export async function crunchyGetPlaylist(q: string, geo: string | undefined) {
|
|||||||
name: 'Edge',
|
name: 'Edge',
|
||||||
url: `/web/edge/play`
|
url: `/web/edge/play`
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// id: 7,
|
||||||
|
// name: 'Safari',
|
||||||
|
// url: `/web/safari/play`
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
id: 7,
|
id: 7,
|
||||||
name: 'Safari',
|
|
||||||
url: `/web/safari/play`
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 8,
|
|
||||||
name: 'Chrome',
|
name: 'Chrome',
|
||||||
url: `/web/chrome/play`
|
url: `/web/chrome/play`
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 9,
|
id: 8,
|
||||||
name: 'Web Fallback',
|
name: 'Web Fallback',
|
||||||
url: `/web/fallback/play`
|
url: `/web/fallback/play`
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// id: 10,
|
||||||
|
// name: 'Iphone',
|
||||||
|
// url: `/ios/iphone/play`
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// id: 11,
|
||||||
|
// name: 'Ipad',
|
||||||
|
// url: `/ios/ipad/play`
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
id: 10,
|
id: 9,
|
||||||
name: 'Iphone',
|
|
||||||
url: `/ios/iphone/play`
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 11,
|
|
||||||
name: 'Ipad',
|
|
||||||
url: `/ios/ipad/play`
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 12,
|
|
||||||
name: 'Android',
|
name: 'Android',
|
||||||
url: `/android/phone/play`
|
url: `/android/phone/play`
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 13,
|
id: 10,
|
||||||
name: 'Samsung TV',
|
name: 'Samsung TV',
|
||||||
url: `/tv/samsung/play`
|
url: `/tv/samsung/play`
|
||||||
}
|
}
|
||||||
|
@ -636,36 +636,43 @@ export async function downloadCrunchyrollPlaylist(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!subPlaylist) {
|
if (!subPlaylist) {
|
||||||
await updatePlaylistByID(downloadID, 'failed')
|
console.log(`Subtitle Playlist for ${s} not found, skipping`)
|
||||||
console.log('Subtitle Playlist not found')
|
messageBox(
|
||||||
messageBox('error', ['Cancel'], 2, 'Subtitle Playlist not found', 'Subtitle Playlist not found', 'Subtitle Playlist not found')
|
'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({
|
server.logger.log({
|
||||||
level: 'error',
|
level: 'error',
|
||||||
message: 'Subtitle Playlist not found',
|
message: `Subtitle Playlist for ${s} not found, skipping`,
|
||||||
timestamp: new Date().toISOString(),
|
timestamp: new Date().toISOString(),
|
||||||
section: 'crunchyrollDownloadProcess'
|
section: 'crunchyrollSubtitleDownloadProcess'
|
||||||
})
|
})
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const found = subPlaylist.data.subtitles.find((sub) => sub.language === s)
|
if (subPlaylist) {
|
||||||
if (found) {
|
const found = subPlaylist.data.subtitles.find((sub) => sub.language === s)
|
||||||
subDownloadList.push({ ...found, isDub: false })
|
if (found) {
|
||||||
console.log(`Subtitle ${s}.ass found, adding to download`)
|
subDownloadList.push({ ...found, isDub: false })
|
||||||
server.logger.log({
|
console.log(`Subtitle ${s}.ass found, adding to download`)
|
||||||
level: 'info',
|
server.logger.log({
|
||||||
message: `Subtitle ${s}.ass found in Download ${downloadID}, adding to download`,
|
level: 'info',
|
||||||
timestamp: new Date().toISOString(),
|
message: `Subtitle ${s}.ass found in Download ${downloadID}, adding to download`,
|
||||||
section: 'crunchyrollDownloadProcessSubtitles'
|
timestamp: new Date().toISOString(),
|
||||||
})
|
section: 'crunchyrollDownloadProcessSubtitles'
|
||||||
} else {
|
})
|
||||||
console.warn(`Subtitle ${s}.ass not found, skipping`)
|
} else {
|
||||||
server.logger.log({
|
console.warn(`Subtitle ${s}.ass not found, skipping`)
|
||||||
level: 'warn',
|
server.logger.log({
|
||||||
message: `Subtitle ${s}.ass not found in Download ${downloadID}, skipping`,
|
level: 'warn',
|
||||||
timestamp: new Date().toISOString(),
|
message: `Subtitle ${s}.ass not found in Download ${downloadID}, skipping`,
|
||||||
section: 'crunchyrollDownloadProcessSubtitles'
|
timestamp: new Date().toISOString(),
|
||||||
})
|
section: 'crunchyrollDownloadProcessSubtitles'
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,8 +40,6 @@ export async function createChapterFile(rawchapters: VideoMetadata, dir: string,
|
|||||||
var chapters: string[] = []
|
var chapters: string[] = []
|
||||||
|
|
||||||
chapters.push(';FFMETADATA1')
|
chapters.push(';FFMETADATA1')
|
||||||
chapters.push(`title=${mediaid}`)
|
|
||||||
chapters.push(`artist=Crunchyroll`)
|
|
||||||
chapters.push(``)
|
chapters.push(``)
|
||||||
|
|
||||||
if (rawchapters.intro && rawchapters.intro.type && rawchapters.intro.start && rawchapters.intro.end) {
|
if (rawchapters.intro && rawchapters.intro.type && rawchapters.intro.start && rawchapters.intro.end) {
|
||||||
|
@ -134,7 +134,7 @@ function resamplePOSSubtitle(subtitle: string, ox: number, oy: number, nx: numbe
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (line.includes('\\fs')) {
|
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) {
|
for (let posMatch of posMatches) {
|
||||||
let font = parseInt(posMatch[1])
|
let font = parseInt(posMatch[1])
|
||||||
let newFontSize = Math.round((font / oy) * ny)
|
let newFontSize = Math.round((font / oy) * ny)
|
||||||
@ -154,6 +154,22 @@ function resamplePOSSubtitle(subtitle: string, ox: number, oy: number, nx: numbe
|
|||||||
}
|
}
|
||||||
lines[i] = line
|
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')
|
return lines.join('\n')
|
||||||
|
Reference in New Issue
Block a user