mirror of
https://github.com/KevinMidboe/zoff.git
synced 2026-01-08 10:35:34 +00:00
Added functionality to add songs from another channel
This commit is contained in:
@@ -596,6 +596,12 @@ function change_offline(enabled, already_offline){
|
||||
|
||||
function toast(msg) {
|
||||
switch(msg) {
|
||||
case "other_list_pass":
|
||||
msg = "The other list has a pass, can't import the songs..";
|
||||
break;
|
||||
case "nolist":
|
||||
msg = "There is no list with that name";
|
||||
break;
|
||||
case "suggested_thumbnail":
|
||||
if(embed) return;
|
||||
msg = "The thumbnail has been suggested!";
|
||||
|
||||
@@ -876,6 +876,22 @@ $(document).on("submit", "#listImport", function(e){
|
||||
document.getElementById("import").value = "";
|
||||
});
|
||||
|
||||
$(document).on("submit", "#listImportZoff", function(e) {
|
||||
e.preventDefault();
|
||||
var new_channel = $("#import_zoff").val();
|
||||
if(new_channel == "") {
|
||||
Materialize.toast("It seems you've entered a invalid channel-name.", 4000);
|
||||
return;
|
||||
}
|
||||
socket.emit("import_zoff", {channel: chan.toLowerCase(), new_channel: new_channel.toLowerCase()});
|
||||
});
|
||||
|
||||
$(document).on("click", ".import-zoff", function(e) {
|
||||
e.preventDefault();
|
||||
$(".import-zoff-container").addClass("hide");
|
||||
$(".zoff_add_field").removeClass("hide");
|
||||
});
|
||||
|
||||
$(document).on("submit", "#listImportSpotify", function(e){
|
||||
e.preventDefault();
|
||||
if(spotify_authenticated && $("#import_spotify").val() !== ""){
|
||||
|
||||
Reference in New Issue
Block a user