diff --git a/.gitignore b/.gitignore index 87c9ad3..a2d6b61 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -server/sound/ +Server/sound/ *.db start.bat .env diff --git a/Client/ext/popper.js b/Client/ext/popper.js deleted file mode 100644 index 19a42b9..0000000 --- a/Client/ext/popper.js +++ /dev/null @@ -1,134 +0,0 @@ -function Pop() { - // var cssRuleFile = "/src/css/style.css"; // will be the link once this css file became available online - var cssRuleFile = "https://cookieconsent.popupsmart.com/src/css/style.css"; // will be the link once this css file became available online - - let lnk = document.createElement("link"); - lnk.setAttribute("rel", "stylesheet"); - lnk.setAttribute("type", "text/css"); - lnk.setAttribute("href", cssRuleFile); - document.getElementsByTagName("head")[0].appendChild(lnk); - - let styl = "undefined"; - var conDivObj; - - var fadeInTime = 10; // If needed could be served as an customizable option to the user - var fadeOutTime = 10; - - let cookie = { - name: "cookieconsent_status", - path: "/", - expiryDays: 365 * 24 * 60 * 60 * 5000, - }; - - let content = { - /// Add a field for link color - message: - "This website uses cookies to ensure you get the best experience on our website.", - btnText: "Got it!", - mode: " banner bottom", - theme: " theme-classic", - palette: " palette1", - link: "Learn more", - href: "https://www.cookiesandyou.com", - target: "_blank", - }; - - let createPopUp = function () { - console.log(content); - if (typeof conDivObj === "undefined") { - conDivObj = document.createElement("DIV"); - conDivObj.style.opacity = 0; - conDivObj.setAttribute("id", "spopupCont"); - } - conDivObj.innerHTML = - '
'; - - document.body.appendChild(conDivObj); - fadeIn(conDivObj); - - document - .getElementById("cookie-btn") - .addEventListener("click", function () { - saveCookie(); - fadeOut(conDivObj); - }); - }; - - let fadeOut = function (element) { - var op = 1; - var timer = setInterval(function () { - if (op <= 0.1) { - clearInterval(timer); - conDivObj.parentElement.removeChild(conDivObj); - } - element.style.opacity = op; - element.style.filter = "alpha(opacity=" + op * 100 + ")"; - op -= op * 0.1; - }, fadeOutTime); - }; - let fadeIn = function (element) { - var op = 0.1; - var timer = setInterval(function () { - if (op >= 1) { - clearInterval(timer); - } - element.style.opacity = op; - element.style.filter = "alpha(opacity=" + op * 100 + ")"; - op += op * 0.1; - }, fadeInTime); - }; - - let checkCookie = function (key) { - var keyValue = document.cookie.match("(^|;) ?" + key + "=([^;]*)(;|$)"); - return keyValue ? true : false; - }; - - let saveCookie = function () { - var expires = new Date(); - expires.setTime(expires.getTime() + cookie.expiryDays); - document.cookie = - cookie.name + - "=" + - "ok" + - ";expires=" + - expires.toUTCString() + - "path=" + - cookie.path; - }; - - this.init = function (param) { - if (checkCookie(cookie.name)) return; - - if (typeof param === "object") { - if ("ButtonText" in param) content.btnText = param.ButtonText; - if ("Mode" in param) content.mode = " " + param.Mode; - if ("Theme" in param) content.theme = " " + param.Theme; - if ("Palette" in param) content.palette = " " + param.Palette; - if ("Message" in param) content.message = param.Message; - if ("LinkText" in param) content.link = param.LinkText; - if ("Location" in param) content.href = param.Location; - if ("Target" in param) content.target = param.Target; - if ("Time" in param) - setTimeout(function () { - createPopUp(); - }, param.Time * 1000); - else createPopUp(); - } - }; -} -window.start = new Pop(); diff --git a/Server/__pycache__/versionNum.cpython-313.pyc b/Server/__pycache__/versionNum.cpython-313.pyc new file mode 100644 index 0000000..d9f0a4b Binary files /dev/null and b/Server/__pycache__/versionNum.cpython-313.pyc differ diff --git a/Server/databaseGenerator.py b/Server/databaseGenerator.py index ebf8263..6a4f09a 100644 --- a/Server/databaseGenerator.py +++ b/Server/databaseGenerator.py @@ -11,18 +11,18 @@ parser=argparse.ArgumentParser(description="Options for the generation of the so # parser.add_argument('-k','--apikey', help='String: LastFM api key', default="") parser.add_argument('-m', '--mode', help='new/update: Remake database or update current', default= "update") parser.add_argument('-a', '--art', help="True/False: Add art to the database using LastFm (takes minimum 0.25s per song)", default="True") -parser.add_argument('-d','--directory',help="Directory of the song files", default="./sound/") +# parser.add_argument('-d','--directory',help="Directory of the song files", default="./sound/") args = parser.parse_args() dotenv.load_dotenv() apikeylastfm = os.getenv("API_KEY") soundLocation = os.getenv("DIRECTORY") # apikeylastfm = args.apikey -if args.directory[-1] == "/" or args.directory[-1] == "\\": - soundLocation = args.directory -elif "/" in args.directory: - soundLocation = args.directory + "/" +if soundLocation[-1] == "/" or soundLocation[-1] == "\\": + soundLocation = soundLocation +elif "/" in soundLocation: + soundLocation = soundLocation + "/" else: - soundLocation = args.directory + "\\" + soundLocation = soundLocation + "\\" songFiles = os.listdir(soundLocation) fileOfDB = sql.connect("songDatabase.db") diff --git a/Client/ext/qrcode.min.js b/Server/static/ext/qrcode.min.js similarity index 100% rename from Client/ext/qrcode.min.js rename to Server/static/ext/qrcode.min.js diff --git a/Server/static/ext/sha256.min.js b/Server/static/ext/sha256.min.js new file mode 100644 index 0000000..7fe9102 --- /dev/null +++ b/Server/static/ext/sha256.min.js @@ -0,0 +1,9 @@ +/** + * [js-sha256]{@link https://github.com/emn178/js-sha256} + * + * @version 0.11.0 + * @author Chen, Yi-Cyuan [emn178@gmail.com] + * @copyright Chen, Yi-Cyuan 2014-2024 + * @license MIT + */ +!function(){"use strict";function t(t,i){i?(d[0]=d[16]=d[1]=d[2]=d[3]=d[4]=d[5]=d[6]=d[7]=d[8]=d[9]=d[10]=d[11]=d[12]=d[13]=d[14]=d[15]=0,this.blocks=d):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=t}function i(i,r,s){var e,n=typeof i;if("string"===n){var o,a=[],u=i.length,c=0;for(e=0;e>>6,a[c++]=128|63&o):o<55296||o>=57344?(a[c++]=224|o>>>12,a[c++]=128|o>>>6&63,a[c++]=128|63&o):(o=65536+((1023&o)<<10|1023&i.charCodeAt(++e)),a[c++]=240|o>>>18,a[c++]=128|o>>>12&63,a[c++]=128|o>>>6&63,a[c++]=128|63&o);i=a}else{if("object"!==n)throw new Error(h);if(null===i)throw new Error(h);if(f&&i.constructor===ArrayBuffer)i=new Uint8Array(i);else if(!(Array.isArray(i)||f&&ArrayBuffer.isView(i)))throw new Error(h)}i.length>64&&(i=new t(r,!0).update(i).array());var y=[],p=[];for(e=0;e<64;++e){var l=i[e]||0;y[e]=92^l,p[e]=54^l}t.call(this,r,s),this.update(p),this.oKeyPad=y,this.inner=!0,this.sharedMemory=s}var h="input is invalid type",r="object"==typeof window,s=r?window:{};s.JS_SHA256_NO_WINDOW&&(r=!1);var e=!r&&"object"==typeof self,n=!s.JS_SHA256_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;n?s=global:e&&(s=self);var o=!s.JS_SHA256_NO_COMMON_JS&&"object"==typeof module&&module.exports,a="function"==typeof define&&define.amd,f=!s.JS_SHA256_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,u="0123456789abcdef".split(""),c=[-2147483648,8388608,32768,128],y=[24,16,8,0],p=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],l=["hex","array","digest","arrayBuffer"],d=[];!s.JS_SHA256_NO_NODE_JS&&Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),!f||!s.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(t){return"object"==typeof t&&t.buffer&&t.buffer.constructor===ArrayBuffer});var A=function(i,h){return function(r){return new t(h,!0).update(r)[i]()}},w=function(i){var h=A("hex",i);n&&(h=b(h,i)),h.create=function(){return new t(i)},h.update=function(t){return h.create().update(t)};for(var r=0;rAdd songs to the shared playlist below!
@@ -63,11 +61,11 @@ changes visibility with JS-->Opposite of light mode
How long alerts stay on screen for (seconds)
@@ -114,20 +112,21 @@ changes visibility with JS-->Wipe the playlist, except the currently playing song. With PartyMode enabled, a second song will be added back randomly
PartyJukebox is under an AGPLV3 liscense. You can access the source code here.
+PartyJukebox is under an AGPLV3 liscense. You can access the source code here.
+Release {{ REL_VER_NUM }}
-
-
-
+
+
+
+