-
-
Notifications
You must be signed in to change notification settings - Fork 52
Video quality selection #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| /help — this message | ||
| /language — change language | ||
| /audio — convert all files to audio | ||
| /max_quality - automatically download videos in maximum quality |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Вместо этого, давай сделаем /chooseResolution, который по дефолту false
| import report from '@/helpers/report' | ||
| import sendHelp from '@/handlers/sendHelp' | ||
| import startMongo from '@/helpers/startMongo' | ||
| import { resolutionMenu } from './menus/resolutionMenu' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Не используй относительные импорты, только @
| export default async function handleMaxQuality(ctx: Context) { | ||
| ctx.dbchat.autoMaxQuality = !ctx.dbchat.autoMaxQuality | ||
| await ctx.dbchat.save() | ||
| return ctx.reply( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use replyWithLocalization
| if (ctx.dbchat.autoMaxQuality) { | ||
| return createDownloadJobAndRequest(ctx, url) | ||
| } else { | ||
| const waitMessage = await ctx.reply(ctx.i18n.t('check_resolutions')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use replyWithLocalization
| @@ -0,0 +1 @@ | |||
| declare module 'random-token' | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Нам это точно нужно? Мы же делаем require
| shortId!: string | ||
| @prop({ required: true }) | ||
| url!: string | ||
| @prop({ required: true, type: () => [Number] }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Можно обойтись без этого поля?
| } | ||
|
|
||
| const ShortUrlModel = getModelForClass(ShortUrl, { | ||
| schemaOptions: { timestamps: true }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Давай использовать @modelOptions
No description provided.