Version 0.6.0 - Ajout des fonctionnalités externes de la version
This commit is contained in:
parent
d5651f8cef
commit
d1a0130f00
89
README.md
89
README.md
@ -7,6 +7,10 @@
|
||||
|
||||
* En cas de bug, n'hésitez pas à faire un **report** sur votre profil.
|
||||
* Vous pouvez utiliser la commande **/restart** sur Discord pour redémarrer l'intégralité du programme !
|
||||
* Certaines fonctionnalités sont encore en développement et peuvent générer des bugs, merci de me les reports en faisant un Rapport en cliquant sur votre petite tête
|
||||
* Les playlists (en version 0.6.0) ne sont pas sauvegardés en raison de la Pipeline qui écrase tout comme un sauvage ... même les tokens de connexion ....
|
||||
* N'hésitez pas lorsque vous êtes seuls à expérimenter le bot en le poussant à bout pour voir ses limites et de me le signaler ^^
|
||||
* Pour toutes suggestions, pas de problème ^^ Vous pouvez envoyez un rapport avec la catégorie Suggestion ! ^^
|
||||
|
||||
</div>
|
||||
|
||||
@ -16,32 +20,74 @@
|
||||
|
||||
## Changelog
|
||||
### Subsonics - Web - 0.6.0
|
||||
- **Adds :** *Web features : Playlist | Pipeline Deploy V2 | Search Ellipis | Handle Playlist on Web*
|
||||
- **Adds :** *Playlist | Pipeline Deploy V2 | Search Ellipis | Handle Playlist on Web | Add Song Button from current*
|
||||
#### Details
|
||||
**Web Player Features**
|
||||
> - Playlist
|
||||
>> - SEND/ SEARCH_SONGS
|
||||
>> - SEND/ ADD_SONGS
|
||||
> - Make a popup
|
||||
>> - Lire maintenant
|
||||
>> - Ajouter à une playlist
|
||||
|
||||
**Playlist**
|
||||
> - Ajouter / Supprimer des chansons
|
||||
> - Lire toutes la playlist
|
||||
|
||||
|
||||
**Pipeline Deploy V2**
|
||||
>> - Copy /data/ except "betas.json"
|
||||
>> - Reinject /data/
|
||||
> - Copy /data/ except "betas.json"
|
||||
> - Reinject /data/
|
||||
|
||||
**Handle Playlist on Web**
|
||||
|
||||
> - Check with ytpfs
|
||||
> - Make a preview track
|
||||
|
||||
**Add Song Button from current**
|
||||
|
||||
> - Take Current & SEND/ADD_SONG_TO_PLAYLIST
|
||||
|
||||
<hr>
|
||||
|
||||
### Subsonics - Web - 0.7.0
|
||||
- **Adds :** *Settings : Web Page Change, Logs, Connexions, Gestion d'accès, Beta | Users V2 | Handle CLP & Banned account*
|
||||
- **Adds :** *Settings : Logs, Connexions, Gestion d'accès | Users V2 | Improvements*
|
||||
#### Details
|
||||
-- TO DO
|
||||
|
||||
**Settings**
|
||||
> - Logs : Afficher les logs
|
||||
> - Connexions : Afficher l'état des nodes et modifier les nodes
|
||||
> - Gestion d'accès : Bannir les personnes / Leur ajouter des perms *
|
||||
|
||||
**Users V2**
|
||||
> - Ajout des permissions
|
||||
> - Handle Ban Case
|
||||
|
||||
**Improvements**
|
||||
|
||||
> - Change Volume with moving |
|
||||
> - Find a default URL when thumbnail is null
|
||||
|
||||
<hr>
|
||||
|
||||
### Subsonics - Web - 0.8.0
|
||||
- **Adds :** *Alerts, Playlist Share, See Who is Online*
|
||||
- **Adds :** *Alerts, Playlist Share, See Who is Online | Edit playlist picture | Tooltip*
|
||||
#### Details
|
||||
-- TO DO
|
||||
|
||||
**Alerts**
|
||||
> - Popup Prefab
|
||||
> - Declencher lors de l'action
|
||||
|
||||
**Playlist Share**
|
||||
|
||||
> - Envoyer des playlist avec la liste des utilisateurs
|
||||
|
||||
**See Who is Online**
|
||||
|
||||
> - Ajouter une petite liste des gens connectés actuellement
|
||||
|
||||
**Edit playlist picture**
|
||||
|
||||
> - Support l'upload
|
||||
> - Ajouter à la playlist
|
||||
> - Handle la picture
|
||||
|
||||
**Tooltip**
|
||||
|
||||
> - Tooltip sur les bouttons
|
||||
|
||||
<hr>
|
||||
|
||||
@ -50,4 +96,19 @@
|
||||
#### Details
|
||||
-- TO DO
|
||||
|
||||
<hr>
|
||||
|
||||
### Subsonics - Web - 1.1.0
|
||||
- **Adds :** *Soundboard Editor*
|
||||
#### Details
|
||||
-- TO DO
|
||||
|
||||
|
||||
<hr>
|
||||
|
||||
### Subsonics - Web - 1.2.0
|
||||
- **Adds :** *Assets Rework*
|
||||
#### Details
|
||||
-- TO DO
|
||||
|
||||
</div>
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "subsonics-web",
|
||||
"author": "Raphix",
|
||||
"version": "0.6.0",
|
||||
"version": "0.6.1",
|
||||
"nodemonConfig": {
|
||||
"ext": "js, html",
|
||||
"ignore": [
|
||||
|
@ -1,6 +1,7 @@
|
||||
const { SlashCommandBuilder, EmbedBuilder } = require("discord.js");
|
||||
const { __glob } = require("../modules/global-variables");
|
||||
const { LogType } = require('./sub-log');
|
||||
const discord = require("./discord-bot")
|
||||
|
||||
const dlog = new LogType("Queue-List")
|
||||
|
||||
@ -223,12 +224,39 @@ module.exports.List = class {
|
||||
|
||||
} else {
|
||||
|
||||
// [A FINIR POUR WEB]
|
||||
}
|
||||
if(!client) {
|
||||
|
||||
client = discord.getClient()
|
||||
}
|
||||
|
||||
let player = client.manager.players.get("137291455336022018")
|
||||
|
||||
if(!player) {
|
||||
|
||||
player = client.manager.create({
|
||||
guild: "137291455336022018",
|
||||
voiceChannel: discord.getMemberVoices().get(userId),
|
||||
textChannel: "664355637685256203",
|
||||
});
|
||||
|
||||
|
||||
player.connect();
|
||||
}
|
||||
|
||||
for(var song of playlist) {
|
||||
|
||||
const song_finded = await client.manager.search(song.url)
|
||||
next.push(song_finded.tracks[0])
|
||||
|
||||
}
|
||||
|
||||
if(!player.playing) {
|
||||
|
||||
player.play(next[0])
|
||||
this.remove(next[0])
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -175,6 +175,16 @@ module.exports.getState = function(client, interaction) {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
module.exports.playPlaylist = function (data, client) {
|
||||
|
||||
|
||||
|
||||
list.playlistAdd(data, null)
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
module.exports.SPECIAL_MJ = async function (client, userId) {
|
||||
|
@ -89,6 +89,20 @@ module.exports.removeSong = function (id, name, song ) {
|
||||
|
||||
}
|
||||
|
||||
module.exports.playPlaylist = function (id, name) {
|
||||
check()
|
||||
if(playlists[id][name]) {
|
||||
plog.log("Ajout de la playlist à l'utilisateur \"" + id + "\" dans la liste de lecture !")
|
||||
|
||||
subplayer.playPlaylist(playlists[id][name])
|
||||
} else {
|
||||
|
||||
plog.log("L'utilisateur \"" + id + "\" n'a pas une playlist avec le nom "+ name + " dans la base de donnée Playlist !")
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function check() {
|
||||
|
@ -599,6 +599,42 @@ function IOConnection(io) {
|
||||
|
||||
|
||||
|
||||
})
|
||||
|
||||
socket.on("SEND/PLAY_PLAYLIST", async (data) => {
|
||||
|
||||
|
||||
var cookies = socket.handshake.headers.cookie
|
||||
|
||||
if(cookies) {
|
||||
|
||||
cookies = cook.parse(cookies)
|
||||
var token = cookies.token
|
||||
|
||||
if(auth.checkUser(token)) {
|
||||
|
||||
|
||||
|
||||
var user = auth.getUser(token)
|
||||
var userId = user.user.id
|
||||
|
||||
|
||||
subplaylist.playPlaylist(userId, data)
|
||||
|
||||
io.emit("DO_UPDATE_PLAYLIST")
|
||||
io.emit("ANSWER/SEND/PLAY_PLAYLIST/OK")
|
||||
|
||||
} else {
|
||||
|
||||
io.emit("ANSWER/SEND/PLAY_PLAYLIST", {"error":"USER_DONT_EXIST"})
|
||||
}
|
||||
} else {
|
||||
io.emit("ANSWER/SEND/PLAY_PLAYLIST", {"error":"TOKEN_NOT_FINDED"})
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
@ -88,6 +88,16 @@ function delPlayList(key) {
|
||||
}
|
||||
|
||||
|
||||
function playPlayList(key) {
|
||||
|
||||
send("PLAY_PLAYLIST", key)
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
socket.on("DO_UPDATE_PLAYLIST", () => {
|
||||
@ -184,7 +194,7 @@ socket.on("ANSWER/GET/PLAYLIST", (data) => {
|
||||
|
||||
}
|
||||
|
||||
playlistToPush.push('<div class="apPres"><div class="apTitle"><img class="apTile" src="/images/playlist-tile.svg"><p class="apName">' + key + '</p></div><div class="apButtons"><button id="'+ key +'_playlistplay" class="primary"><i class="fas fa-play"></i></button><button onclick="delPlayList(\''+ key +'\')" "id="'+ key +'_playlistdelete" class="list_delete"><i class="fas fa-trash"></i></button></div></div><hr>' + playlist_songs.join(""))
|
||||
playlistToPush.push('<div class="apPres"><div class="apTitle"><img class="apTile" src="/images/playlist-tile.svg"><p class="apName">' + key + '</p></div><div class="apButtons"><button onclick="playPlayList(\''+ key +'\')" id="'+ key +'_playlistplay" class="primary"><i class="fas fa-play"></i></button><button onclick="delPlayList(\''+ key +'\')" "id="'+ key +'_playlistdelete" class="list_delete"><i class="fas fa-trash"></i></button></div></div><hr>' + playlist_songs.join(""))
|
||||
|
||||
if(playlistToPush.join("") == "") {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user