Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/majn/tgl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tgl.h
diff options
context:
space:
mode:
authormjentsch <mtthsjntsch@gmail.com>2015-08-09 19:31:40 +0300
committermjentsch <mtthsjntsch@gmail.com>2015-08-09 19:47:21 +0300
commit71ba543692bcf45bdc2bd5a68ce13a03811eec7c (patch)
tree071d9447780499f213ce4e4802d5825b7801f2cf /tgl.h
parent5cc7e87da51a96163c465e7568aaef7c211afcfb (diff)
Fix downloads of documents with audio / video flag
Instead of using the document attributes, use the InputMedia type to determine the download type in tgl_do_load_document. This fixes an FILE_ID_INVALID error in certain cases when sending a video or audio file as regular document.
Diffstat (limited to 'tgl.h')
-rw-r--r--tgl.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/tgl.h b/tgl.h
index 3b153c2..f475162 100644
--- a/tgl.h
+++ b/tgl.h
@@ -568,6 +568,9 @@ void tgl_do_load_photo (struct tgl_state *TLS, struct tgl_photo *photo, void (*c
void tgl_do_load_encr_document (struct tgl_state *TLS, struct tgl_encr_document *V, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, const char *file_name), void *callback_extra);
void tgl_do_load_document (struct tgl_state *TLS, struct tgl_document *V, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, const char *file_name), void *callback_extra);
void tgl_do_load_document_thumb (struct tgl_state *TLS, struct tgl_document *video, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, const char *file_name), void *callback_extra);
+void tgl_do_load_video (struct tgl_state *TLS, struct tgl_document *V, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, const char *filename), void *callback_extra);
+void tgl_do_load_audio (struct tgl_state *TLS, struct tgl_document *V, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, const char *filename), void *callback_extra);
+
// loads file by location. Use only for small files!
void tgl_do_load_file_location (struct tgl_state *TLS, struct tgl_file_location *FL, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, const char *file_name), void *callback_extra);