mirror of
https://github.com/HappyTanuki/BumbleCee.git
synced 2025-10-26 01:45:15 +00:00
도커허브 업로드 자동화 구현
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -4,3 +4,4 @@ Music
|
|||||||
*.json
|
*.json
|
||||||
yt-dlp
|
yt-dlp
|
||||||
ffmpeg
|
ffmpeg
|
||||||
|
password
|
||||||
4
BuildDockerAndUpload.sh
Executable file
4
BuildDockerAndUpload.sh
Executable file
@@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
cat password | docker login -u happytanuki12 --password-stdin
|
||||||
|
docker build --tag happytanuki12/bumblebee:latest .
|
||||||
|
docker push happytanuki12/bumblebee:latest
|
||||||
@@ -19,10 +19,10 @@ RUN pip3 install --break-system-packages pycryptodome
|
|||||||
RUN curl -Lo dpp.deb https://dl.dpp.dev/
|
RUN curl -Lo dpp.deb https://dl.dpp.dev/
|
||||||
RUN dpkg -i dpp.deb
|
RUN dpkg -i dpp.deb
|
||||||
RUN rm dpp.deb
|
RUN rm dpp.deb
|
||||||
RUN curl -LO https://github.com/BtbN/FFmpeg-Builds/releases/latest/download/ffmpeg-master-latest-linux64-gpl.tar.xz
|
# RUN curl -LO https://github.com/BtbN/FFmpeg-Builds/releases/latest/download/ffmpeg-master-latest-linux64-gpl.tar.xz
|
||||||
RUN tar -xf ffmpeg-master-latest-linux64-gpl.tar.xz
|
# RUN tar -xf ffmpeg-master-latest-linux64-gpl.tar.xz
|
||||||
RUN rm ffmpeg-master-latest-linux64-gpl.tar.xz
|
# RUN rm ffmpeg-master-latest-linux64-gpl.tar.xz
|
||||||
RUN mv ffmpeg-master-latest-linux64-gpl ffmpeg
|
# RUN mv ffmpeg-master-latest-linux64-gpl ffmpeg
|
||||||
RUN curl -LO https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp
|
RUN curl -LO https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp
|
||||||
RUN chmod +x ./yt-dlp
|
RUN chmod +x ./yt-dlp
|
||||||
COPY ./build/BumbleCee /BumbleCee
|
COPY ./build/BumbleCee /BumbleCee
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
services:
|
services:
|
||||||
bumblebee:
|
bumblebee:
|
||||||
build: .
|
image: happytanuki12/bumblebee:latest
|
||||||
container_name: BumbleBee
|
container_name: BumbleBee
|
||||||
volumes:
|
volumes:
|
||||||
- ./config.json:/config.json
|
- ./config.json:/config.json
|
||||||
|
|||||||
@@ -81,6 +81,8 @@ std::list<MusicQueueElement> MusicPlayManager::getQueue(const dpp::snowflake gui
|
|||||||
|
|
||||||
MusicQueueElement MusicPlayManager::getNowPlaying(const dpp::snowflake guildId) {
|
MusicQueueElement MusicPlayManager::getNowPlaying(const dpp::snowflake guildId) {
|
||||||
std::shared_ptr<MusicQueueElement> nowplaying = queueMap[guildId]->nowplaying();
|
std::shared_ptr<MusicQueueElement> nowplaying = queueMap[guildId]->nowplaying();
|
||||||
|
if (nowplaying == nullptr)
|
||||||
|
return MusicQueueElement("", "", dpp::user(), dpp::embed());
|
||||||
MusicQueueElement returnValue(*nowplaying);
|
MusicQueueElement returnValue(*nowplaying);
|
||||||
return returnValue;
|
return returnValue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,7 +36,10 @@ std::list<std::shared_ptr<MusicQueueElement>>::iterator MusicQueue::findByIndex(
|
|||||||
}
|
}
|
||||||
std::shared_ptr<MusicQueueElement> MusicQueue::nowplaying() {
|
std::shared_ptr<MusicQueueElement> MusicQueue::nowplaying() {
|
||||||
std::lock_guard<std::mutex> lock(queueMutex);
|
std::lock_guard<std::mutex> lock(queueMutex);
|
||||||
return *currentPlayingPosition;
|
if (currentPlayingPosition == queue.end())
|
||||||
|
return nullptr;
|
||||||
|
else
|
||||||
|
return *currentPlayingPosition;
|
||||||
}
|
}
|
||||||
std::list<std::shared_ptr<MusicQueueElement>>::iterator MusicQueue::next_music() {
|
std::list<std::shared_ptr<MusicQueueElement>>::iterator MusicQueue::next_music() {
|
||||||
std::lock_guard<std::mutex> lock(queueMutex);
|
std::lock_guard<std::mutex> lock(queueMutex);
|
||||||
|
|||||||
Reference in New Issue
Block a user