Version 0.7.0 - Add Improvements

This commit is contained in:
CICD - Pipeline 2023-08-30 15:22:13 +02:00
parent 5f3dd3160d
commit 47c5608cf4
7 changed files with 149 additions and 34 deletions

View File

@ -1,26 +1,8 @@
[
{
"host": "lavalink.devamop.in",
"password": "DevamOP",
"port": 443,
"secure": true
},
{
"host": "suki.nathan.to",
"password": "adowbongmanacc",
"port": 443,
"secure": true
},
{
"host": "ssl.horizxon.studio",
"host": "lava2.horizxon.studio",
"password": "horizxon.studio",
"port": 443,
"secure": true
},
{
"host": "eu-lavalink.lexnet.cc",
"password": "lexn3tl@val!nk",
"port": 443,
"secure": true
"port": 80,
"secure": false
}
]
]

View File

@ -77,6 +77,17 @@
"isStream": false,
"uri": "https://www.youtube.com/watch?v=U-RyWK2DFS8",
"thumbnail": "https://img.youtube.com/vi/U-RyWK2DFS8/default.jpg"
},
{
"track": "QAAA5QIAC1RvdXQgQ2hhbmdlABBqdWxpZW5sYW1hc3Nvbm5lAAAAAAADBqkAcFU6aHR0cHM6Ly9hcGktdjIuc291bmRjbG91ZC5jb20vbWVkaWEvc291bmRjbG91ZDp0cmFja3M6ODM3ODEzNDYvMWVjYTY3ZmEtZjg3ZS00MjFkLWExYzctNTVhY2M4ZTdkODIyL3N0cmVhbS9obHMAAQAzaHR0cHM6Ly9zb3VuZGNsb3VkLmNvbS9qdWxpZW5sYW1hc3Nvbm5lL3RvdXQtY2hhbmdlAApzb3VuZGNsb3VkAAAAAAAAAAA=",
"title": "Tout Change",
"identifier": "U:https://api-v2.soundcloud.com/media/soundcloud:tracks:83781346/1eca67fa-f87e-421d-a1c7-55acc8e7d822/stream/hls",
"author": "julienlamassonne",
"duration": 198313,
"isSeekable": true,
"isStream": false,
"uri": "https://soundcloud.com/julienlamassonne/tout-change",
"thumbnail": null
}
]
}

View File

@ -35,5 +35,79 @@
"bio": "",
"banner": null,
"token": "bbc2f9a1-a52c-4548-895b-2c3b9095e2d4"
},
{
"auth": {
"token_type": "Bearer",
"access_token": "jY17lCWaOpTdPQCnz50kfNm7ABpsGz",
"expires_in": 604800,
"refresh_token": "3TronknZ7j5kVSDBjI3OechmCYF8ck",
"scope": "identify guilds guilds.members.read"
},
"avatar": null,
"communication_disabled_until": null,
"flags": 0,
"joined_at": "2023-03-06T18:20:23.413000+00:00",
"nick": "Raphix",
"pending": false,
"premium_since": null,
"roles": [
"397725552968204288"
],
"user": {
"id": "486943594893017119",
"username": "raphixscrap",
"avatar": "7129e80c23aa3ba3d2d45814dd352a29",
"discriminator": "0",
"public_flags": 4194368,
"flags": 4194368,
"banner": null,
"accent_color": 10712214,
"global_name": "Raphix",
"avatar_decoration_data": null,
"banner_color": "#a37496"
},
"mute": false,
"deaf": false,
"bio": "",
"banner": null,
"token": "56a35d77-427f-4ac3-9db8-170f08fac724"
},
{
"auth": {
"token_type": "Bearer",
"access_token": "jY17lCWaOpTdPQCnz50kfNm7ABpsGz",
"expires_in": 604800,
"refresh_token": "3TronknZ7j5kVSDBjI3OechmCYF8ck",
"scope": "guilds.members.read identify guilds"
},
"avatar": null,
"communication_disabled_until": null,
"flags": 0,
"joined_at": "2023-03-06T18:20:23.413000+00:00",
"nick": "Raphix",
"pending": false,
"premium_since": null,
"roles": [
"397725552968204288"
],
"user": {
"id": "486943594893017119",
"username": "raphixscrap",
"avatar": "7129e80c23aa3ba3d2d45814dd352a29",
"discriminator": "0",
"public_flags": 4194368,
"flags": 4194368,
"banner": null,
"accent_color": 10712214,
"global_name": "Raphix",
"avatar_decoration_data": null,
"banner_color": "#a37496"
},
"mute": false,
"deaf": false,
"bio": "",
"banner": null,
"token": "d026da49-07d0-48cf-bfdb-9807ad9765ce"
}
]

View File

@ -1,7 +1,7 @@
{
"name": "subsonics-web",
"author": "Raphix",
"version": "0.6.5",
"version": "0.7.0",
"nodemonConfig": {
"ext": "js, html",
"ignore": [

View File

@ -197,12 +197,19 @@ module.exports.SPECIAL_MJ = async function (client, userId) {
let player = client.manager.players.get("137291455336022018")
var memberVoices = discord.getMemberVoices()
var channelId = memberVoices.get(userId)
if(!channelId) {
channelId = "664355808250953739"
}
if(!player) {
player = client.manager.create({
guild: "137291455336022018",
voiceChannel: memberVoices.get(userId),
voiceChannel: channelId,
textChannel: "664355637685256203",
});

View File

@ -118,14 +118,15 @@ socket.on("ANSWER/GET/PLAYLIST", (data) => {
var selectionData = new Array()
contentToPush.push('<div id="addPlaylist" class="playlist_div"><i class="fa-solid fa-plus playlist_tile"></i> Créer une playlist</div>')
for (const [key, value] of Object.entries(data)) {
contentToPush.push('<div id="' + key + '_playlist" class="playlist_div checker"><img class="playlist_tile" src="/images/playlist-tile.svg"><p>' + key + '</p></div>')
selectionData.push('<option style="color: black;">' + key + '</option>')
}
contentToPush.push('<div id="SPECIAL" class="playlist_div"><i class="fa-solid fa-gears playlist_tile"></i> Debug</div>')
contentToPush.push('<div id="addPlaylist" class="playlist_div"><i class="fa-solid fa-plus playlist_tile"></i> Créer une playlist</div>')
@ -245,7 +246,14 @@ function loadPlaylist(key, value) {
PFormatduration = pmax
playlist_songs.push('<div class="search_song"> <img class="search_thumbnail" src="' + title.thumbnail + '"><div class="search_titleSong"> <p class="search_title">' + title.title + '</p></div> <p>' + title.author + '</p><p>' + PFormatduration + '</p> <div class="search_buttons"><button id="' + value.indexOf(title) + '_padd" class="search_add"><i class="fa fa-plus"></i></button><button id="' + value.indexOf(title) + '_pplay" class="search_lmore"><i class="fa fa-play"></i></button><button id="' + value.indexOf(title) + '_pdelete" style="font-size: 20px;" class="list_delete"><i class="fa fa-trash"></i></button></div></div>')
var thumbnail = title.thumbnail
if(!thumbnail) {
thumbnail = "/images/black-image.svg"
}
playlist_songs.push('<div class="search_song"> <img class="search_thumbnail" src="' + thumbnail + '"><div class="search_titleSong"> <p class="search_title">' + title.title + '</p></div> <p>' + title.author + '</p><p>' + PFormatduration + '</p> <div class="search_buttons"><button id="' + value.indexOf(title) + '_padd" class="search_add"><i class="fa fa-plus"></i></button><button id="' + value.indexOf(title) + '_pplay" class="search_lmore"><i class="fa fa-play"></i></button><button id="' + value.indexOf(title) + '_pdelete" style="font-size: 20px;" class="list_delete"><i class="fa fa-trash"></i></button></div></div>')
}
@ -346,8 +354,15 @@ searchBtn.addEventListener("click", () => {
}
var thumbnail = title.thumbnail
if(!thumbnail) {
thumbnail = "/images/black-image.svg"
}
PFormatduration = pmax
contentToPush.push(' <div class="search_song"> <img class="search_thumbnail" src="' + title.thumbnail + '"><div class="search_titleSong"> <p class="search_title">' + title.title + '</p></div> <p>' + title.author + '</p><p>' + PFormatduration + '</p> <div class="search_buttons"><button id="' + data.indexOf(title) + '_ladd" class="search_add"><i class="fa fa-plus"></i></button> <div class="searchMoreDiv"><button id="' + data.indexOf(title) + '_lmore" class="search_lmore"><i class="fa-solid fa-ellipsis"></i></button></div><div class="searchPopup" id="' + data.indexOf(title) + '_popup"><div id="' + data.indexOf(title) + '_playNow" class="INDEX_line"><i class="fa-solid fa-play"></i> Lire maintenant</div><div id="' + data.indexOf(title) +'_addPlaylist" class="INDEX_line"><i class="fa-solid fa-list-ul"></i> Ajouter à une playlist</div></div></div><dialog id="' + data.indexOf(title) + 'playlistManager" class="report_dialog"><div class="rlineclose"><p class="rtitle"><i class="fa fa-square-plus"></i> Ajouter à une playlist</p><button id="' + data.indexOf(title) + 'playlistManager_close" class="report_close"><i class="fa-solid fa-xmark"></i></button></div><div class="apContent"><img id="' + data.indexOf(title) + 'playlist_add_img" class="ppTile" src="/images/playlist-tile.svg"><p style="padding: 1%;" id="' + data.indexOf(title) + 'playlist_add_music"></p><p>Selectionner la playlist</p><select style=" color: white; background-color: transparent; border: solid 2px #2c3df4;padding: 1%; border-radius: 12px;" id="' + data.indexOf(title) + 'playlistSelection"></select><button id="' + data.indexOf(title) + 'playlistAddSong" class="rsend"><i class="fa fa-plus"></i> Ajouter</button></div></dialog></div>')
contentToPush.push(' <div class="search_song"> <img class="search_thumbnail" src="' + thumbnail + '"><div class="search_titleSong"> <p class="search_title">' + title.title + '</p></div> <p>' + title.author + '</p><p>' + PFormatduration + '</p> <div class="search_buttons"><button id="' + data.indexOf(title) + '_ladd" class="search_add"><i class="fa fa-plus"></i></button> <div class="searchMoreDiv"><button id="' + data.indexOf(title) + '_lmore" class="search_lmore"><i class="fa-solid fa-ellipsis"></i></button></div><div class="searchPopup" id="' + data.indexOf(title) + '_popup"><div id="' + data.indexOf(title) + '_playNow" class="INDEX_line"><i class="fa-solid fa-play"></i> Lire maintenant</div><div id="' + data.indexOf(title) +'_addPlaylist" class="INDEX_line"><i class="fa-regular fa-square-plus"></i> Ajouter à une playlist</div></div></div><dialog id="' + data.indexOf(title) + 'playlistManager" class="report_dialog"><div class="rlineclose"><p class="rtitle"><i class="fa fa-square-plus"></i> Ajouter à une playlist</p><button id="' + data.indexOf(title) + 'playlistManager_close" class="report_close"><i class="fa-solid fa-xmark"></i></button></div><div class="apContent"><img id="' + data.indexOf(title) + 'playlist_add_img" class="ppTile" src="/images/playlist-tile.svg"><p style="padding: 1%;" id="' + data.indexOf(title) + 'playlist_add_music"></p><p>Selectionner la playlist</p><select style=" color: white; background-color: transparent; border: solid 2px #2c3df4;padding: 1%; border-radius: 12px;" id="' + data.indexOf(title) + 'playlistSelection"></select><button id="' + data.indexOf(title) + 'playlistAddSong" class="rsend"><i class="fa fa-plus"></i> Ajouter</button></div></dialog></div>')
}
if(contentToPush.join("") == "") {
@ -374,8 +389,12 @@ searchBtn.addEventListener("click", () => {
const playlist_add_img = document.getElementById(data.indexOf(title) + "playlist_add_img")
const playlistAddSong = document.getElementById(data.indexOf(title) + "playlistAddSong")
var thumbnail = data[add_to.id.replace("_ladd", "")].thumbnail
if(!thumbnail) {
thumbnail = "/images/black-image.svg"
}
testPopup.style.display = "none"
@ -388,7 +407,7 @@ searchBtn.addEventListener("click", () => {
PlaylistManager.showModal()
playlist_add_music.innerHTML = data[add_to.id.replace("_ladd", "")].title
playlist_add_img.src = data[add_to.id.replace("_ladd", "")].thumbnail
playlist_add_img.src = thumbnail
playlistSelection.innerHTML = playlistAvailable
})
@ -542,9 +561,17 @@ const cplaylistAddSong = document.getElementById("current_playlistAddSong")
takeCurrent.addEventListener("click", () => {
if(currentSong != null) {
var thumbnail = currentSong.thumbnail
if(!thumbnail) {
thumbnail = "/images/black-image.svg"
}
cPlaylistManager.showModal()
cplaylist_add_music.innerHTML = currentSong.title
cplaylist_add_img.src = currentSong.thumbnail
cplaylist_add_img.src = thumbnail
cplaylistSelection.innerHTML = playlistAvailable
}
@ -602,10 +629,17 @@ vol.addEventListener("click", () => {
})
volRange.addEventListener("click", () => {
send("VOLUME", volRange.value)
})
volRange.addEventListener("input", () => {
volTxt.innerHTML = volRange.value + "%"
})
disconnect.addEventListener("click", () => {
@ -800,7 +834,14 @@ socket.on("/ALWAYS/MUSIC_STATE", (data) => {
takeCurrent.classList.add("invisible")
} else {
musicURL.innerHTML = '<img class="showPicture" src="' + data.current.thumbnail + '">'
var thumbnail = data.current.thumbnail
if(!thumbnail) {
thumbnail = "/images/black-image.svg"
}
musicURL.innerHTML = '<img class="showPicture" src="' + thumbnail + '">'
musicTitle.innerHTML = "<p>" + data.current.title + "</p>"
currentSong = data.current
takeCurrent.classList.remove("invisible")

View File

@ -41,7 +41,7 @@
<dialog id="addPlaylist_dialog" class="report_dialog">
<div class="rlineclose">
<p class="rtitle"><i class="fa fa-plus"></i> Ajouter une playlist</p>
<p class="rtitle"><i class="fa fa-plus"></i> Créer une playlist</p>
<button id="addPlaylist_close" class="report_close"><i class="fa-solid fa-xmark"></i></button>
</div>
<div class="apContent">