mirror of
https://github.com/anidl/multi-downloader-nx.git
synced 2026-04-20 16:02:14 +00:00
[CR]: Add search-type to --new
This commit is contained in:
parent
025b9d483c
commit
7c850e06d0
1 changed files with 3 additions and 2 deletions
|
|
@ -113,7 +113,7 @@ export default class Crunchy implements ServiceClass {
|
|||
}
|
||||
else if(argv.new){
|
||||
await this.refreshToken();
|
||||
await this.getNewlyAdded(argv.page, argv.raw, argv.rawoutput);
|
||||
await this.getNewlyAdded(argv.page, argv['search-type'], argv.raw, argv.rawoutput);
|
||||
}
|
||||
else if(argv.search && argv.search.length > 2){
|
||||
await this.refreshToken();
|
||||
|
|
@ -1028,7 +1028,7 @@ export default class Crunchy implements ServiceClass {
|
|||
}
|
||||
}
|
||||
|
||||
public async getNewlyAdded(page?: number, raw: boolean = false, rawoutput?: string) {
|
||||
public async getNewlyAdded(page?: number, type: string, raw: boolean = false, rawoutput?: string) {
|
||||
if(!this.token.access_token){
|
||||
console.error('Authentication required!');
|
||||
return;
|
||||
|
|
@ -1042,6 +1042,7 @@ export default class Crunchy implements ServiceClass {
|
|||
};
|
||||
const newlyAddedParams = new URLSearchParams({
|
||||
sort_by: 'newly_added',
|
||||
type: type || 'series',
|
||||
n: '50',
|
||||
start: (page ? (page-1)*25 : 0).toString(),
|
||||
preferred_audio_language: 'ja-JP',
|
||||
|
|
|
|||
Loading…
Reference in a new issue