diff --git a/htdocs/js/mpd.js b/htdocs/js/mpd.js index 3d63e7a..4ad2f75 100644 --- a/htdocs/js/mpd.js +++ b/htdocs/js/mpd.js @@ -116,6 +116,13 @@ $(document).ready(function(){ } }); + $('#addstream').on('shown.bs.modal', function () { + $('#streamurl').focus(); + }) + $('#addstream form').on('submit', function (e) { + addStream(); + }); + if(!notificationsSupported()) $('#btnnotify').addClass("disabled"); else @@ -583,6 +590,7 @@ function addStream() { if($('#streamurl').val().length > 0) { socket.send('MPD_API_ADD_TRACK,'+$('#streamurl').val()); } + $('#streamurl').val(""); $('#addstream').modal('hide'); }