fixed .0 episodes not merging

This commit is contained in:
stratuma 2024-06-01 22:40:33 +02:00
parent 49391c3b98
commit cbe97b6e87
3 changed files with 5 additions and 12 deletions

View File

@ -18,12 +18,6 @@
>
</div>
<div class="w-full flex gap-2 flex-row items-center justify-center">
<!-- <button class="flex items-center justify-center px-2 py-2 gap-1 transition-all bg-[#ffffff16] hover:bg-[#ffffff25] rounded-lg select-none" style="-webkit-app-region: no-drag">
<Icon name="iconamoon:playlist" class="h-3.5 w-3.5 text-white" />
<div class="text-[11px] text-white font-dm">
PLAYLIST
</div>
</button> -->
<button
@click="openSettings"
class="flex items-center justify-center px-2 py-2 gap-1 transition-all bg-[#ffffff16] hover:bg-[#ffffff25] rounded-lg select-none"
@ -37,9 +31,6 @@
</template>
<script lang="ts" setup>
import { checkAccount, crunchyLogin } from './Crunchyroll/Account'
import { openNewWindow } from './Functions/WindowHandler'
const isProduction = process.env.NODE_ENV !== 'development'
async function openSettings() {

View File

@ -119,7 +119,7 @@
</div>
<div v-if="p.service === 'CR'" class="text-base capitalize h-full flex items-center">
{{ (p.media as CrunchyEpisode).series_title }} Season {{ (p.media as CrunchyEpisode).season_number }} Episode
{{ (p.media as CrunchyEpisode).episode_number }}
{{ (p.media as CrunchyEpisode).episode_number ? (p.media as CrunchyEpisode).episode_number : (p.media as CrunchyEpisode).episode }}
</div>
<div v-if="p.service === 'ADN'" class="text-base capitalize h-full">
{{ (p.media as ADNEpisode).show.title }} Season {{ (p.media as ADNEpisode).season ? (p.media as ADNEpisode).season : 1 }} Episode

View File

@ -293,6 +293,7 @@ async function checkPlaylists() {
(e.dataValues.media as CrunchyEpisode).series_title,
(e.dataValues.media as CrunchyEpisode).season_number,
(e.dataValues.media as CrunchyEpisode).episode_number,
(e.dataValues.media as CrunchyEpisode).episode,
e.dataValues.quality,
e.dataValues.dir,
e.dataValues.format,
@ -464,6 +465,7 @@ export async function downloadCrunchyrollPlaylist(
name: string,
season: number,
episode: number,
episode_string: string,
quality: 1080 | 720 | 480 | 360 | 240,
downloadPath: string,
format: 'mp4' | 'mkv',
@ -1030,8 +1032,8 @@ export async function downloadCrunchyrollPlaylist(
.replace('{seriesName}', name.replace(/[/\\?%*:|"<>]/g, ''))
.replace('{seasonNumber}', season.toString())
.replace('{seasonNumberDD}', season.toString().padStart(2, '0'))
.replace('{episodeNumber}', episode.toString())
.replace('{episodeNumberDD}', episode.toString().padStart(2, '0'))
.replace('{episodeNumber}', episode ? episode.toString() : episode_string)
.replace('{episodeNumberDD}', episode ? episode.toString().padStart(2, '0') : episode_string)
.replace('{quality}', quality.toString() + 'p')
await mergeVideoFile(file as string, audios, subss, seasonFolder, episodeNaming, format, downloadID)