diff --git a/public/js/bundle.js b/public/js/bundle.js index a9b1c6c..47c53ec 100644 --- a/public/js/bundle.js +++ b/public/js/bundle.js @@ -4622,4 +4622,4 @@ PERFORMANCE OF THIS SOFTWARE. `)]),e._v(" "),a("td",[e._v(e._s(i.artists[0].name))]),e._v(" "),a("td",[e._v(e._s(i.album.name))]),e._v(" "),a("td",[e._v(e._s(e.convertDuration(Math.floor(i.duration_ms/1e3))))]),e._v(" "),a("td",[a("input",{directives:[{name:"model",rawName:"v-model",value:i.selected,expression:"track.selected"}],staticClass:"clickable",attrs:{type:"checkbox"},domProps:{checked:Array.isArray(i.selected)?e._i(i.selected,null)>-1:i.selected},on:{change:function(s){var l=i.selected,c=s.target,o=!!c.checked;if(Array.isArray(l)){var d=null,u=e._i(l,d);c.checked?u<0&&e.$set(i,"selected",l.concat([d])):u>-1&&e.$set(i,"selected",l.slice(0,u).concat(l.slice(u+1)))}else e.$set(i,"selected",o)}}})])])})],2)]),e._v(" "),e.label?a("span",{staticStyle:{opacity:"0.4","margin-top":"8px",display:"inline-block","font-size":"13px"}},[e._v(e._s(e.label))]):e._e(),e._v(" "),a("footer",{staticClass:"bg-background-main"},[a("button",{staticClass:"mr-2 btn btn-primary",attrs:{"data-link":e.link},on:{click:function(i){return i.stopPropagation(),e.addToQueue(i)}}},[e._v(` `+e._s(""+e.$t("globals.download",{thing:e.$tc("globals.listTabs."+e.type,1)}))+` `)]),e._v(" "),a("button",{staticClass:"flex items-center btn btn-primary",attrs:{"data-link":e.selectedLinks()},on:{click:function(i){return i.stopPropagation(),e.addToQueue(i)}}},[e._v(` - `+e._s(e.$t("tracklist.downloadSelection"))),a("i",{staticClass:"ml-2 material-icons"},[e._v("file_download")])])])])},__vue_staticRenderFns__$v=[function(){var e=this,n=e.$createElement,a=e._self._c||n;return a("th",[a("i",{staticClass:"material-icons"},[e._v("music_note")])])},function(){var e=this,n=e.$createElement,a=e._self._c||n;return a("th",[a("i",{staticClass:"material-icons"},[e._v("timer")])])},function(){var e=this,n=e.$createElement,a=e._self._c||n;return a("td",[a("div",{staticClass:"table__cell-content table__cell-content--vertical-center",staticStyle:{opacity:"0.54"}},[a("i",{staticClass:"material-icons"},[e._v("album")])])])}];const __vue_inject_styles__$v=void 0,__vue_scope_id__$v=void 0,__vue_is_functional_template__$v=!1;function __vue_normalize__$v(e,n,a,i,r,s,l,c){const o=(typeof a=="function"?a.options:a)||{};return o.__file="Tracklist.vue",o.render||(o.render=e.render,o.staticRenderFns=e.staticRenderFns,o._compiled=!0,r&&(o.functional=!0)),o._scopeId=i,o}var Tracklist=__vue_normalize__$v({render:__vue_render__$v,staticRenderFns:__vue_staticRenderFns__$v},__vue_inject_styles__$v,__vue_script__$t,__vue_scope_id__$v,__vue_is_functional_template__$v);Vue.use(VueRouter);const routes=[{path:window.location.pathname,name:"Home",component:Home,meta:{notKeepAlive:!0}},{path:"tracklist/:type/:id",name:"Tracklist",component:Tracklist},{path:"artist/:id",name:"Artist",component:Artist,meta:{notKeepAlive:!0}},{path:"album/:id",name:"Album",component:Tracklist},{path:"playlist/:id",name:"Playlist",component:Tracklist},{path:"spotify-playlist/:id",name:"Spotify Playlist",component:Tracklist},{path:"charts",name:"Charts",component:Charts,meta:{notKeepAlive:!0}},{path:"favorites",name:"Favorites",component:Favorites,meta:{notKeepAlive:!0}},{path:"errors",name:"Errors",component:Errors},{path:"link-analyzer",name:"Link Analyzer",component:LinkAnalyzer},{path:"about",name:"About",component:About},{path:"info-arl",name:"ARL",component:InfoArl},{path:"info-spotify",name:"Spotify Features",component:InfoSpotifyFeatures},{path:"settings",name:"Settings",component:Settings},{path:"search",name:"Search",component:Search,meta:{notKeepAlive:!0}},{path:"*",component:Home}],router=new VueRouter({mode:"history",routes,scrollBehavior(e,n,a){return{x:0,y:0}}});router.beforeEach((e,n,a)=>{let i=null;switch(e.name){case"Tracklist":i={type:e.params.type,id:e.params.id};break;case"Album":i={type:"album",id:e.params.id};break;case"Playlist":i={type:"playlist",id:e.params.id};break;case"Spotify Playlist":i={type:"spotifyplaylist",id:e.params.id};break}i&&socket.emit("getTracklist",i),a()});function startApp(){new Vue({store,router,i18n,render:e=>e(App)}).$mount("#app")}function initClient(){store.dispatch("setClientMode",!0),setClientModeKeyBindings()}document.addEventListener("DOMContentLoaded",startApp),window.addEventListener("pywebviewready",initClient),document.addEventListener("paste",e=>{if(e.target.localName==="input")return;let n=e.clipboardData.getData("Text");if(isValidURL(n))router.currentRoute.name==="Link Analyzer"?socket.emit("analyzeLink",n):sendAddToQueue(n);else{let a=document.querySelector("#searchbar");a.select(),a.setSelectionRange(0,99999)}});function setClientModeKeyBindings(){document.addEventListener("keyup",e=>{e.altKey&&e.key==="ArrowLeft"&&router.back(),e.altKey&&e.key==="ArrowRight"&&router.forward()})}socket.on("message",function(e){console.log(e)}),socket.on("logging_in",function(){toast(i18n.t("toasts.loggingIn"),"loading",!1,"login-toast")}),socket.on("init_autologin",function(){let e=localStorage.getItem("arl"),n=localStorage.getItem("accountNum");e&&(e=e.trim(),n!=0?socket.emit("login",e,!0,n):socket.emit("login",e))}),socket.on("logged_in",function(e){const{status:n,user:a}=e;switch(n){case 1:case 3:toast(i18n.t("toasts.loggedIn"),"done",!0,"login-toast"),store.dispatch("login",e);break;case 2:toast(i18n.t("toasts.alreadyLogged"),"done",!0,"login-toast"),store.dispatch("setUser",a);break;case 0:toast(i18n.t("toasts.loginFailed"),"close",!0,"login-toast"),store.dispatch("removeARL");break;case-1:toast(i18n.t("toasts.deezerNotAvailable"),"close",!0,"login-toast");return}}),socket.on("logged_out",function(){toast(i18n.t("toasts.loggedOut"),"done",!0,"login-toast"),store.dispatch("logout")}),socket.on("restoringQueue",function(){toast(i18n.t("toasts.restoringQueue"),"loading",!1,"restoring_queue")}),socket.on("cancellingCurrentItem",function(e){toast(i18n.t("toasts.cancellingCurrentItem"),"loading",!1,"cancelling_"+e)}),socket.on("currentItemCancelled",function(e){toast(i18n.t("toasts.currentItemCancelled"),"done",!0,"cancelling_"+e)}),socket.on("startAddingArtist",function(e){toast(i18n.t("toasts.startAddingArtist",{artist:e.name}),"loading",!1,"artist_"+e.id)}),socket.on("finishAddingArtist",function(e){toast(i18n.t("toasts.finishAddingArtist",{artist:e.name}),"done",!0,"artist_"+e.id)}),socket.on("startConvertingSpotifyPlaylist",function(e){toast(i18n.t("toasts.startConvertingSpotifyPlaylist"),"loading",!1,"spotifyplaylist_"+e)}),socket.on("finishConvertingSpotifyPlaylist",function(e){toast(i18n.t("toasts.finishConvertingSpotifyPlaylist"),"done",!0,"spotifyplaylist_"+e)}),socket.on("errorMessage",function(e){toast(e,"error")}),socket.on("queueError",function(e){e.errid?toast(e.link+" - "+i18n.t(`errors.ids.${e.errid}`),"error"):toast(e.link+" - "+e.error,"error")}),socket.on("alreadyInQueue",function(e){toast(i18n.t("toasts.alreadyInQueue",{item:e.title}),"playlist_add_check")}),socket.on("loginNeededToDownload",function(e){toast(i18n.t("toasts.loginNeededToDownload"),"report")}),socket.on("startGeneratingItems",function(e){toast(i18n.t("toasts.startGeneratingItems",{n:e.total}),"loading",!1,"batch_"+e.uuid)}),socket.on("finishGeneratingItems",function(e){toast(i18n.t("toasts.finishGeneratingItems",{n:e.total}),"done",!0,"batch_"+e.uuid)}); + `+e._s(e.$t("tracklist.downloadSelection"))),a("i",{staticClass:"ml-2 material-icons"},[e._v("file_download")])])])])},__vue_staticRenderFns__$v=[function(){var e=this,n=e.$createElement,a=e._self._c||n;return a("th",[a("i",{staticClass:"material-icons"},[e._v("music_note")])])},function(){var e=this,n=e.$createElement,a=e._self._c||n;return a("th",[a("i",{staticClass:"material-icons"},[e._v("timer")])])},function(){var e=this,n=e.$createElement,a=e._self._c||n;return a("td",[a("div",{staticClass:"table__cell-content table__cell-content--vertical-center",staticStyle:{opacity:"0.54"}},[a("i",{staticClass:"material-icons"},[e._v("album")])])])}];const __vue_inject_styles__$v=void 0,__vue_scope_id__$v=void 0,__vue_is_functional_template__$v=!1;function __vue_normalize__$v(e,n,a,i,r,s,l,c){const o=(typeof a=="function"?a.options:a)||{};return o.__file="Tracklist.vue",o.render||(o.render=e.render,o.staticRenderFns=e.staticRenderFns,o._compiled=!0,r&&(o.functional=!0)),o._scopeId=i,o}var Tracklist=__vue_normalize__$v({render:__vue_render__$v,staticRenderFns:__vue_staticRenderFns__$v},__vue_inject_styles__$v,__vue_script__$t,__vue_scope_id__$v,__vue_is_functional_template__$v);Vue.use(VueRouter);const routes=[{path:window.location.pathname,name:"Home",component:Home,meta:{notKeepAlive:!0}},{path:"/tracklist/:type/:id",name:"Tracklist",component:Tracklist},{path:"/artist/:id",name:"Artist",component:Artist,meta:{notKeepAlive:!0}},{path:"/album/:id",name:"Album",component:Tracklist},{path:"/playlist/:id",name:"Playlist",component:Tracklist},{path:"/spotify-playlist/:id",name:"Spotify Playlist",component:Tracklist},{path:"/charts",name:"Charts",component:Charts,meta:{notKeepAlive:!0}},{path:"/favorites",name:"Favorites",component:Favorites,meta:{notKeepAlive:!0}},{path:"/errors",name:"Errors",component:Errors},{path:"/link-analyzer",name:"Link Analyzer",component:LinkAnalyzer},{path:"/about",name:"About",component:About},{path:"/info-arl",name:"ARL",component:InfoArl},{path:"/info-spotify",name:"Spotify Features",component:InfoSpotifyFeatures},{path:"/settings",name:"Settings",component:Settings},{path:"/search",name:"Search",component:Search,meta:{notKeepAlive:!0}},{path:"*",component:Home}],router=new VueRouter({mode:"history",routes,scrollBehavior(e,n,a){return{x:0,y:0}}});router.beforeEach((e,n,a)=>{let i=null;switch(e.name){case"Tracklist":i={type:e.params.type,id:e.params.id};break;case"Album":i={type:"album",id:e.params.id};break;case"Playlist":i={type:"playlist",id:e.params.id};break;case"Spotify Playlist":i={type:"spotifyplaylist",id:e.params.id};break}i&&socket.emit("getTracklist",i),a()});function startApp(){new Vue({store,router,i18n,render:e=>e(App)}).$mount("#app")}function initClient(){store.dispatch("setClientMode",!0),setClientModeKeyBindings()}document.addEventListener("DOMContentLoaded",startApp),window.addEventListener("pywebviewready",initClient),document.addEventListener("paste",e=>{if(e.target.localName==="input")return;let n=e.clipboardData.getData("Text");if(isValidURL(n))router.currentRoute.name==="Link Analyzer"?socket.emit("analyzeLink",n):sendAddToQueue(n);else{let a=document.querySelector("#searchbar");a.select(),a.setSelectionRange(0,99999)}});function setClientModeKeyBindings(){document.addEventListener("keyup",e=>{e.altKey&&e.key==="ArrowLeft"&&router.back(),e.altKey&&e.key==="ArrowRight"&&router.forward()})}socket.on("message",function(e){console.log(e)}),socket.on("logging_in",function(){toast(i18n.t("toasts.loggingIn"),"loading",!1,"login-toast")}),socket.on("init_autologin",function(){let e=localStorage.getItem("arl"),n=localStorage.getItem("accountNum");e&&(e=e.trim(),n!=0?socket.emit("login",e,!0,n):socket.emit("login",e))}),socket.on("logged_in",function(e){const{status:n,user:a}=e;switch(n){case 1:case 3:toast(i18n.t("toasts.loggedIn"),"done",!0,"login-toast"),store.dispatch("login",e);break;case 2:toast(i18n.t("toasts.alreadyLogged"),"done",!0,"login-toast"),store.dispatch("setUser",a);break;case 0:toast(i18n.t("toasts.loginFailed"),"close",!0,"login-toast"),store.dispatch("removeARL");break;case-1:toast(i18n.t("toasts.deezerNotAvailable"),"close",!0,"login-toast");return}}),socket.on("logged_out",function(){toast(i18n.t("toasts.loggedOut"),"done",!0,"login-toast"),store.dispatch("logout")}),socket.on("restoringQueue",function(){toast(i18n.t("toasts.restoringQueue"),"loading",!1,"restoring_queue")}),socket.on("cancellingCurrentItem",function(e){toast(i18n.t("toasts.cancellingCurrentItem"),"loading",!1,"cancelling_"+e)}),socket.on("currentItemCancelled",function(e){toast(i18n.t("toasts.currentItemCancelled"),"done",!0,"cancelling_"+e)}),socket.on("startAddingArtist",function(e){toast(i18n.t("toasts.startAddingArtist",{artist:e.name}),"loading",!1,"artist_"+e.id)}),socket.on("finishAddingArtist",function(e){toast(i18n.t("toasts.finishAddingArtist",{artist:e.name}),"done",!0,"artist_"+e.id)}),socket.on("startConvertingSpotifyPlaylist",function(e){toast(i18n.t("toasts.startConvertingSpotifyPlaylist"),"loading",!1,"spotifyplaylist_"+e)}),socket.on("finishConvertingSpotifyPlaylist",function(e){toast(i18n.t("toasts.finishConvertingSpotifyPlaylist"),"done",!0,"spotifyplaylist_"+e)}),socket.on("errorMessage",function(e){toast(e,"error")}),socket.on("queueError",function(e){e.errid?toast(e.link+" - "+i18n.t(`errors.ids.${e.errid}`),"error"):toast(e.link+" - "+e.error,"error")}),socket.on("alreadyInQueue",function(e){toast(i18n.t("toasts.alreadyInQueue",{item:e.title}),"playlist_add_check")}),socket.on("loginNeededToDownload",function(e){toast(i18n.t("toasts.loginNeededToDownload"),"report")}),socket.on("startGeneratingItems",function(e){toast(i18n.t("toasts.startGeneratingItems",{n:e.total}),"loading",!1,"batch_"+e.uuid)}),socket.on("finishGeneratingItems",function(e){toast(i18n.t("toasts.finishGeneratingItems",{n:e.total}),"done",!0,"batch_"+e.uuid)});