mirror of
https://github.com/HappyTanuki/BumbleCee.git
synced 2025-10-25 17:35:58 +00:00
자잘한 에디터 버그 픽스
This commit is contained in:
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@@ -5,7 +5,7 @@
|
||||
"name": "Debug",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/build/BumbleCee",
|
||||
"program": "/home/happytanuki/BumbleCee/build/BumbleCee",
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${fileDirname}",
|
||||
"environment": [],
|
||||
|
||||
BIN
live555-latest.tar.gz
Normal file
BIN
live555-latest.tar.gz
Normal file
Binary file not shown.
@@ -6,14 +6,11 @@ commands::ICommand::ICommand(std::shared_ptr<dpp::cluster> botCluster)
|
||||
}
|
||||
|
||||
std::shared_ptr<MusicQueue> commands::VCCommand::getQueue(const dpp::slashcommand_t& event) {
|
||||
auto findResult = queueMap->find(event.command.guild_id);
|
||||
if (findResult == queueMap->end())
|
||||
{
|
||||
FMusicQueueID queueID;
|
||||
queueID.guild_id = event.command.guild_id;
|
||||
queueID.shard_id = event.from->shard_id;
|
||||
FMusicQueueID queueID;
|
||||
queueID.guild_id = event.command.guild_id;
|
||||
queueID.shard_id = event.from->shard_id;
|
||||
|
||||
(*queueMap)[queueID.guild_id] = std::make_shared<MusicQueue>(queueID, botCluster);
|
||||
}
|
||||
return queueMap->find(event.command.guild_id)->second;
|
||||
(*queueMap)[queueID.guild_id] = std::make_shared<MusicQueue>(queueID, botCluster);
|
||||
|
||||
return queueMap->find(queueID.guild_id)->second;
|
||||
}
|
||||
@@ -10,7 +10,7 @@ MusicQueue::MusicQueue(FMusicQueueID id, std::shared_ptr<dpp::cluster> botCluste
|
||||
repeat = false;
|
||||
this->botCluster = botCluster;
|
||||
|
||||
botCluster->on_voice_track_marker([this, botCluster](const dpp::voice_track_marker_t &marker)
|
||||
botCluster->on_voice_track_marker([this](const dpp::voice_track_marker_t &marker)
|
||||
{
|
||||
std::cout << marker.track_meta << " Marker reached.\n";
|
||||
|
||||
@@ -18,6 +18,7 @@ MusicQueue::MusicQueue(FMusicQueueID id, std::shared_ptr<dpp::cluster> botCluste
|
||||
{
|
||||
std::cout << "Queue ended\n";
|
||||
playMutex.unlock();
|
||||
this->botCluster->get_shard(this->getId().shard_id)->disconnect_voice(this->getId().guild_id);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -111,12 +112,20 @@ FMusicQueueID MusicQueue::getId()
|
||||
|
||||
void MusicQueue::markerCallback()
|
||||
{
|
||||
if (!dpp::find_guild(id.guild_id)->voice_members.size())
|
||||
{
|
||||
std::cout << "voicechat is empty.";
|
||||
playMutex.unlock();
|
||||
return;
|
||||
}
|
||||
|
||||
std::cout << "Music play started\n";
|
||||
|
||||
dpp::discord_client* joinedShard = botCluster->get_shard(id.shard_id);
|
||||
if (!joinedShard)
|
||||
{
|
||||
std::cout << "No shard\n";
|
||||
playMutex.unlock();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -133,6 +142,7 @@ void MusicQueue::markerCallback()
|
||||
if (!v || !v->voiceclient || !v->voiceclient->is_ready())
|
||||
{
|
||||
std::cout << "not in voicechat. quit musicplay";
|
||||
playMutex.unlock();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -186,6 +196,7 @@ void MusicQueue::markerCallback()
|
||||
v->voiceclient->insert_marker(music.fileName + " end");
|
||||
|
||||
std::cout << "audio sending complete\n";
|
||||
playMutex.unlock();
|
||||
}
|
||||
|
||||
void MusicQueue::play()
|
||||
|
||||
20
src/test.py
Normal file
20
src/test.py
Normal file
@@ -0,0 +1,20 @@
|
||||
import yt_dlp
|
||||
import json
|
||||
import sys
|
||||
|
||||
if len(sys.argv) != 2:
|
||||
sys.exit()
|
||||
|
||||
ydl_opts = {
|
||||
'quiet': True,
|
||||
'clean_infojson': False,
|
||||
'default_search': 'ytsearch',
|
||||
'format': '251',
|
||||
'outtmpl': {'default': 'Temp/%(id)s.temp'},
|
||||
'overwrites': False,
|
||||
'writeinfojson': True }
|
||||
|
||||
with yt_dlp.YoutubeDL(ydl_opts) as ydl:
|
||||
info = ydl.extract_info(sys.argv[1], download=False)
|
||||
with open("out", "w") as f:
|
||||
f.write(json.dumps(ydl.sanitize_info(info)))
|
||||
BIN
src/yt-dlp
BIN
src/yt-dlp
Binary file not shown.
Reference in New Issue
Block a user