Fixed load audio
This commit is contained in:
parent
11b68d0cb8
commit
5069568590
3 changed files with 19 additions and 2 deletions
|
@ -971,7 +971,7 @@ void interpreter (char *line UU) {
|
|||
}
|
||||
struct message *M = message_get (num);
|
||||
if (M && !M->service && M->media.type == (int)CODE_message_media_audio) {
|
||||
do_load_video (&M->media.video, 1);
|
||||
do_load_audio (&M->media.video, 1);
|
||||
} else if (M && !M->service && M->media.type == (int)CODE_decrypted_message_media_audio) {
|
||||
do_load_encr_video (&M->media.encr_video, 1);
|
||||
} else {
|
||||
|
@ -986,7 +986,7 @@ void interpreter (char *line UU) {
|
|||
}
|
||||
struct message *M = message_get (num);
|
||||
if (M && !M->service && M->media.type == (int)CODE_message_media_audio) {
|
||||
do_load_video (&M->media.video, 2);
|
||||
do_load_audio (&M->media.video, 2);
|
||||
} else if (M && !M->service && M->media.type == (int)CODE_decrypted_message_media_audio) {
|
||||
do_load_encr_video (&M->media.encr_video, 2);
|
||||
} else {
|
||||
|
|
16
queries.c
16
queries.c
|
@ -1936,6 +1936,22 @@ void do_load_video (struct video *V, int next) {
|
|||
load_next_part (D);
|
||||
}
|
||||
|
||||
void do_load_audio (struct video *V, int next) {
|
||||
assert (V);
|
||||
assert (next);
|
||||
struct download *D = talloc0 (sizeof (*D));
|
||||
D->offset = 0;
|
||||
D->size = V->size;
|
||||
D->id = V->id;
|
||||
D->access_hash = V->access_hash;
|
||||
D->dc = V->dc_id;
|
||||
D->next = next;
|
||||
D->name = 0;
|
||||
D->fd = -1;
|
||||
D->type = CODE_input_audio_file_location;
|
||||
load_next_part (D);
|
||||
}
|
||||
|
||||
void do_load_document (struct document *V, int next) {
|
||||
assert (V);
|
||||
assert (next);
|
||||
|
|
|
@ -89,6 +89,7 @@ struct photo;
|
|||
struct video;
|
||||
void do_load_photo (struct photo *photo, int next);
|
||||
void do_load_video_thumb (struct video *video, int next);
|
||||
void do_load_audio (struct video *V, int next);
|
||||
void do_load_video (struct video *V, int next);
|
||||
void do_load_document (struct document *V, int next);
|
||||
void do_load_document_thumb (struct document *video, int next);
|
||||
|
|
Loading…
Add table
Reference in a new issue