Fix bugs probably
parent
48c1b572ee
commit
a9a9961c37
|
@ -14,8 +14,7 @@ class QueueItem
|
||||||
if uri.scheme == "file"
|
if uri.scheme == "file"
|
||||||
@fname = uri.path
|
@fname = uri.path
|
||||||
@is_file = true
|
@is_file = true
|
||||||
elsif uri.host and uri.host.end_with? "youtube.com" or
|
elsif uri.host and check_youtube_dl uri.host
|
||||||
uri.host.end_with? "youtu.be"
|
|
||||||
@fname = get_yt_vid_from uri
|
@fname = get_yt_vid_from uri
|
||||||
@is_file = true
|
@is_file = true
|
||||||
else
|
else
|
||||||
|
@ -45,6 +44,12 @@ class QueueItem
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
def check_youtube_dl host
|
||||||
|
host.end_with? "youtube.com" or
|
||||||
|
host.end_with? "youtu.be" or
|
||||||
|
host.end_with? "soundcloud.com"
|
||||||
|
end
|
||||||
|
|
||||||
def get_yt_vid_from uri
|
def get_yt_vid_from uri
|
||||||
yt_tmp = get_tmp_name "vrobot4_yt_temp_", ".m4a"
|
yt_tmp = get_tmp_name "vrobot4_yt_temp_", ".m4a"
|
||||||
mv_tmp = get_tmp_name "vrobot4_mv_temp_", ".mp3"
|
mv_tmp = get_tmp_name "vrobot4_mv_temp_", ".mp3"
|
||||||
|
@ -92,7 +97,7 @@ class Mod_Audio < Vrobot4::Module::Module
|
||||||
end
|
end
|
||||||
|
|
||||||
def c_quit m, argv
|
def c_quit m, argv
|
||||||
m.serv.voice_quit
|
m.serv.voice_quit m
|
||||||
end
|
end
|
||||||
|
|
||||||
def c_queue m, argv
|
def c_queue m, argv
|
||||||
|
|
Loading…
Reference in New Issue