mirror of
https://github.com/Dangoware/oden-music-bot.git
synced 2025-04-19 07:12:57 -05:00
Fixed variable name
This commit is contained in:
parent
deacd42e6e
commit
c27aaacc33
1 changed files with 8 additions and 16 deletions
24
src/main.py
24
src/main.py
|
@ -1,4 +1,4 @@
|
||||||
import discord, subprocess, glob, os, os.path, urllib.request, ffmpeg
|
import discord, subprocess, glob, os, os.path, ffmpeg
|
||||||
import re, time, datetime, yt_dlp, typing, functools
|
import re, time, datetime, yt_dlp, typing, functools
|
||||||
from time import strftime, gmtime
|
from time import strftime, gmtime
|
||||||
from yt_dlp import YoutubeDL
|
from yt_dlp import YoutubeDL
|
||||||
|
@ -99,20 +99,12 @@ async def play(ctx, *, query: str = None):
|
||||||
|
|
||||||
await song.save(filename)
|
await song.save(filename)
|
||||||
|
|
||||||
# Grab thumbnail from file
|
# Grab thumbnail from the file
|
||||||
ffmpeg_cli = ffmpeg\
|
(ffmpeg
|
||||||
.input(
|
.input(filename,t=1)
|
||||||
filename,
|
.output(thumbname, f="image2")
|
||||||
t=1,
|
|
||||||
)\
|
|
||||||
.output(
|
|
||||||
thumbname,
|
|
||||||
f="image2"
|
|
||||||
)\
|
|
||||||
.overwrite_output()
|
.overwrite_output()
|
||||||
|
.run())
|
||||||
print(ffmpeg_cli.get_args())
|
|
||||||
ffmpeg_cli.run()
|
|
||||||
|
|
||||||
|
|
||||||
# Grab metadata from file
|
# Grab metadata from file
|
||||||
|
@ -531,7 +523,7 @@ async def q(ctx, action = None, selection = None):
|
||||||
else:
|
else:
|
||||||
thumbnail = server_info[server_id]["queue"][selection]['thumbnail']
|
thumbnail = server_info[server_id]["queue"][selection]['thumbnail']
|
||||||
|
|
||||||
if selection is position:
|
if selection is current_position:
|
||||||
await ctx.send(":no_entry_sign: Error, cannot remove currently playing item", delete_after=3)
|
await ctx.send(":no_entry_sign: Error, cannot remove currently playing item", delete_after=3)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -546,7 +538,7 @@ async def q(ctx, action = None, selection = None):
|
||||||
print(str(server_id) + " | " + "Error while deleting song or thumbnail")
|
print(str(server_id) + " | " + "Error while deleting song or thumbnail")
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if selection < position and position > 1:
|
if selection < current_position and current_position > 1:
|
||||||
try:
|
try:
|
||||||
server_info[server_id]["queue_position"] -= 1
|
server_info[server_id]["queue_position"] -= 1
|
||||||
except:
|
except:
|
||||||
|
|
Loading…
Reference in a new issue