From e332ef1dc64e946129dc4a3cfe7f77cd8bf0028f Mon Sep 17 00:00:00 2001 From: Akamaru Date: Mon, 29 Jun 2015 21:11:31 +0200 Subject: [PATCH] --no-playlist --no-continue --max-filesize 15m --- plugins/youtube_dl.lua | 3 +- tmp/.gitkeep | 688 +++++++++++++++++++++++++++++++++++++++++ tmp/video.mp4 | 1 - 3 files changed, 690 insertions(+), 2 deletions(-) create mode 100644 tmp/.gitkeep delete mode 100644 tmp/video.mp4 diff --git a/plugins/youtube_dl.lua b/plugins/youtube_dl.lua index f616901..77a1f92 100644 --- a/plugins/youtube_dl.lua +++ b/plugins/youtube_dl.lua @@ -1,11 +1,12 @@ -- Requires: (sudo) apt-get install youtube-dl +-- See https://github.com/rg3/youtube-dl/blob/master/README.md#options function run(msg, matches) URL = matches[1] local receiver = get_receiver(msg) if string.match(msg.text, '"') then return 'Vergiss es' else - text = run_bash("rm tmp/video.mp4 && youtube-dl -o tmp/video.mp4 " .. URL) + text = run_bash("youtube-dl -o tmp/video.mp4 --no-playlist --no-continue --max-filesize 15m " .. URL) send_video(get_receiver(msg), "tmp/video.mp4", ok_cb, false) return URL .. ' wurde gedownloadet und wird jetzt gesendet! \nDas kann je nach Video sehr lang dauern! \nAlso habt Geduld!' end diff --git a/tmp/.gitkeep b/tmp/.gitkeep new file mode 100644 index 0000000..2a2d56e --- /dev/null +++ b/tmp/.gitkeep @@ -0,0 +1,688 @@ + + + + + + + + + + + + Mikubot/.gitkeep at 5266b93d0fb71f3bd388a4b71e086e29c6ae2f26 · Akamaru/Mikubot · GitHub + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Skip to content +
+ + + + + + + + + + + +
+
+
+ +
+
+
+ + + + +

+ + /Mikubot + + + + + + + forked from yagop/telegram-bot + +

+
+
+ +
+
+
+ + + +
+ +
+

HTTPS clone URL

+
+ + + + +
+
+ + +
+

Subversion checkout URL

+
+ + + + +
+
+ + + +
You can clone with +
or
. + + + +
+ + + + + + + Download ZIP + +
+
+ +
+ + + + + + + +
+ +
+ + + tree: + 5266b93d0f + + + +
+ +
+ + + + +
+ + +
+ + +
+
+ @Akamaru + + + +
+ + + +
+ +
+
+
+ +
+ Raw + Blame + History +
+ + + + + +
+ +
+ 0 lines (0 sloc) + + 0.0 kB +
+
+ +
+ +
+ +
+ +
+ +Jump to Line + + +
+ +
+ +
+
+ + +
+ +
+ +
+ + +
+
+
+ +
+
+
+
+
+ +
+ + + + + + +
+ + + Something went wrong with that request. Please try again. +
+ + + + + + + + + diff --git a/tmp/video.mp4 b/tmp/video.mp4 deleted file mode 100644 index 9540913..0000000 --- a/tmp/video.mp4 +++ /dev/null @@ -1 +0,0 @@ -This is a temp file \ No newline at end of file