mirror of
https://github.com/anidl/multi-downloader-nx.git
synced 2026-04-21 00:12:05 +00:00
Crunchy season fix
- The number of the season will now be correctly inserted - The default filename templated has been altered to include the season
This commit is contained in:
parent
3ae1269ac7
commit
d1972e3725
5 changed files with 10 additions and 7 deletions
3
@types/crunchyTypes.d.ts
vendored
3
@types/crunchyTypes.d.ts
vendored
|
|
@ -10,7 +10,8 @@ export type CrunchyEpMeta = {
|
|||
seasonTitle: string,
|
||||
episodeNumber: string,
|
||||
episodeTitle: string,
|
||||
seasonID: string
|
||||
seasonID: string,
|
||||
season: number
|
||||
}
|
||||
|
||||
export type DownloadedMedia = {
|
||||
|
|
|
|||
|
|
@ -672,7 +672,8 @@ async function getSeasonById(){
|
|||
seasonTitle: item.season_title,
|
||||
episodeNumber: item.episode,
|
||||
episodeTitle: item.title,
|
||||
seasonID: item.season_id
|
||||
seasonID: item.season_id,
|
||||
season: item.season_number
|
||||
};
|
||||
if(item.playback){
|
||||
epMeta.data[0].playback = item.playback;
|
||||
|
|
@ -972,7 +973,8 @@ const itemSelectMultiDub = (eps: Record<string, {
|
|||
seasonTitle: itemE.items.find(a => !a.season_title.includes('('))?.season_title as string,
|
||||
episodeNumber: item.episode,
|
||||
episodeTitle: item.title,
|
||||
seasonID: item.season_id
|
||||
seasonID: item.season_id,
|
||||
season: item.season_number
|
||||
};
|
||||
if(item.playback){
|
||||
epMeta.data[0].playback = item.playback;
|
||||
|
|
@ -1142,7 +1144,7 @@ async function downloadMediaList(medias: CrunchyEpMeta) : Promise<{
|
|||
['episode', medias.episodeNumber],
|
||||
['service', 'CR'],
|
||||
['showTitle', medias.seasonTitle],
|
||||
['season', medias.seasonID]
|
||||
['season', medias.season]
|
||||
] as [yargs.AvailableFilenameVars, string|number][]).map((a): Variable => {
|
||||
return {
|
||||
name: a[0],
|
||||
|
|
|
|||
|
|
@ -280,7 +280,7 @@ const getArgv = (cfg: { [key:string]: unknown }) => {
|
|||
describe: `Set the filename template. Use \${variable_name} to insert variables.\nYou may use ${availableFilenameVars
|
||||
.map(a => `'${a}'`).join(', ')} as variables.`,
|
||||
type: 'string',
|
||||
default: parseDefault<string>('fileName', '[${service}] ${showTitle} - ${episode} [${height}p]')
|
||||
default: parseDefault<string>('fileName', '[${service}] ${showTitle} - S${season}E${episode} [${height}p]')
|
||||
})
|
||||
.option('numbers', {
|
||||
group: groups.fileName,
|
||||
|
|
|
|||
2
package-lock.json
generated
2
package-lock.json
generated
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "multi-downloader-nx",
|
||||
"version": "2.0.3",
|
||||
"version": "2.0.4",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "multi-downloader-nx",
|
||||
"short_name": "aniDL",
|
||||
"version": "2.0.3",
|
||||
"version": "2.0.4",
|
||||
"description": "Download videos from Funimation or Crunchyroll via cli",
|
||||
"keywords": [
|
||||
"download",
|
||||
|
|
|
|||
Loading…
Reference in a new issue