fix stats, add files to help with setup
This commit is contained in:
parent
f05d4289e5
commit
0aab1dffdd
5 changed files with 20 additions and 2 deletions
8
.env.example
Normal file
8
.env.example
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
TOKEN=""
|
||||||
|
GUILD_ID=""
|
||||||
|
MAX_MIN="8"
|
||||||
|
MAX_QUEUE="5"
|
||||||
|
ALLOW_SKIP="TRUE"
|
||||||
|
PERMANENT_MAX_QUEUE="FALSE"
|
||||||
|
LOCK_SHUFFLE="FALSE"
|
||||||
|
PROXY="socks5://your-proxy-here-or-comment-out-the-line-in-newbot.py"
|
|
@ -228,7 +228,7 @@ async def stats(inter: disnake.AppCmdInter):
|
||||||
message = message + f"Title: {nowplaying.input_settings['text']}\n"
|
message = message + f"Title: {nowplaying.input_settings['text']}\n"
|
||||||
playing = obs.get_media_input_status("player")
|
playing = obs.get_media_input_status("player")
|
||||||
message = message + f"Video Duration: {str(datetime.timedelta(seconds=(round(playing.media_cursor/1000))))}/{str(datetime.timedelta(seconds=(round(playing.media_duration/1000))))}\n"
|
message = message + f"Video Duration: {str(datetime.timedelta(seconds=(round(playing.media_cursor/1000))))}/{str(datetime.timedelta(seconds=(round(playing.media_duration/1000))))}\n"
|
||||||
if inter.permissions.moderate_members and not os.getenv("PERMANENT_MAX_QUEUE",False):
|
if inter.permissions.moderate_members and not (os.getenv("PERMANENT_MAX_QUEUE","FALSE") == "TRUE"):
|
||||||
message = message + f"Queued by <@{user_queue[0]}>"
|
message = message + f"Queued by <@{user_queue[0]}>"
|
||||||
await inter.edit_original_response(message)
|
await inter.edit_original_response(message)
|
||||||
|
|
||||||
|
@ -530,6 +530,7 @@ async def ensurewaiting():
|
||||||
if playing.media_cursor == None:
|
if playing.media_cursor == None:
|
||||||
obs.set_current_program_scene("error")
|
obs.set_current_program_scene("error")
|
||||||
if len(os.listdir(full_dl_dir)) == 0 and len(queue) >= 1: #just in case
|
if len(os.listdir(full_dl_dir)) == 0 and len(queue) >= 1: #just in case
|
||||||
|
loop = asyncio.get_running_loop()
|
||||||
await loop.run_in_executor(None, download_video, 0)
|
await loop.run_in_executor(None, download_video, 0)
|
||||||
|
|
||||||
@tasks.loop(seconds=5)
|
@tasks.loop(seconds=5)
|
||||||
|
@ -549,3 +550,4 @@ bot.run(os.getenv("TOKEN"))
|
||||||
print("cleaning up tempdir")
|
print("cleaning up tempdir")
|
||||||
temp_dir.cleanup()
|
temp_dir.cleanup()
|
||||||
download_dir.cleanup()
|
download_dir.cleanup()
|
||||||
|
obs.set_current_program_scene("nosignal")
|
2
requirements.txt
Normal file
2
requirements.txt
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
disnake
|
||||||
|
obsws_python
|
|
@ -10,6 +10,7 @@ pkgs.mkShell {
|
||||||
pkgs.python311Packages.python-dotenv
|
pkgs.python311Packages.python-dotenv
|
||||||
pkgs.python311Packages.venvShellHook
|
pkgs.python311Packages.venvShellHook
|
||||||
pkgs.ffmpeg
|
pkgs.ffmpeg
|
||||||
|
pkgs.icewm
|
||||||
pkgs.discord
|
pkgs.discord
|
||||||
];
|
];
|
||||||
venvDir = "./.venv";
|
venvDir = "./.venv";
|
||||||
|
|
5
wm.sh
Executable file
5
wm.sh
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
Xwayland -geometry 1920x1080 -fullscreen :12 &
|
||||||
|
sleep 2
|
||||||
|
DISPLAY=:12 icewm --display=:12 &
|
||||||
|
env -u WAYLAND_DISPLAY DISPLAY=:12 obs --disable-shutdown-check --startstreaming --startvirtualcam --multi --disable-missing-files-check --scene nosignal &
|
||||||
|
env DISPLAY=:12 vlc -f srt://127.0.0.1:9999?transtype=live
|
Loading…
Reference in a new issue