diff --git a/README.md b/README.md index 6d1ea2d..ccd0fef 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,6 @@ Also neat: You can use your **custom artist or track images**. ## Requirements * Python 3.5 or higher -* Several Pip packages (automatically downloaded) * If you'd like to display images, you will need API keys for [Last.fm](https://www.last.fm/api/account/create) and [Fanart.tv](https://fanart.tv/get-an-api-key/). These are free of charge! ## How to install @@ -55,6 +54,14 @@ Also neat: You can use your **custom artist or track images**. 5) If you'd like to implement anything on top of Maloja, visit `/api_explorer`. +6) To backup your data, run + + maloja backup + +or, to only backup essential data (no artwork etc) + + maloja backup -l minimal + ## How to scrobble ### Native API diff --git a/maloja/__init__.py b/maloja/__init__.py index 8828998..e603e77 100644 --- a/maloja/__init__.py +++ b/maloja/__init__.py @@ -7,7 +7,7 @@ author = { "email":"maloja@krateng.dev", "github": "krateng" } -version = 2,0,8 +version = 2,0,12 versionstr = ".".join(str(n) for n in version) diff --git a/maloja/controller.py b/maloja/controller.py index caf545a..a818bc4 100755 --- a/maloja/controller.py +++ b/maloja/controller.py @@ -29,7 +29,7 @@ os.chdir(DATA_DIR) def copy_initial_local_files(): folder = pkg_resources.resource_filename(__name__,"data_files") #shutil.copy(folder,DATA_DIR) - dir_util.copy_tree(folder,DATA_DIR) + dir_util.copy_tree(folder,DATA_DIR,update=False) def setup(): diff --git a/maloja/data_files/rules/predefined/krateng_kpopgirlgroups.tsv b/maloja/data_files/rules/predefined/krateng_kpopgirlgroups.tsv index a8f414d..2344605 100644 --- a/maloja/data_files/rules/predefined/krateng_kpopgirlgroups.tsv +++ b/maloja/data_files/rules/predefined/krateng_kpopgirlgroups.tsv @@ -108,6 +108,8 @@ replacetitle 여자 대통령 Female President # Mamamoo countas Hwasa Mamamoo +countas Moonbyul Mamamoo +replaceartist Moon Byul Moonbyul replaceartist Hwa Sa Hwasa replaceartist MAMAMOO Mamamoo replacetitle Egotistic(너나 해) Egotistic diff --git a/maloja/static/js/search.js b/maloja/static/js/search.js index 9dd14e2..eb96011 100644 --- a/maloja/static/js/search.js +++ b/maloja/static/js/search.js @@ -1,3 +1,5 @@ + + function search(searchfield) { txt = searchfield.value; if (txt == "") { @@ -18,10 +20,15 @@ function html_to_fragment(html) { return template.content; } +var results_artists; +var results_tracks; +var searchresultwrap; -const results_artists = document.getElementById("searchresults_artists"); -const results_tracks = document.getElementById("searchresults_tracks"); -const searchresultwrap = document.getElementById("resultwrap"); +window.addEventListener("DOMContentLoaded",function(){ + results_artists = document.getElementById("searchresults_artists"); + results_tracks = document.getElementById("searchresults_tracks"); + searchresultwrap = document.getElementById("resultwrap"); +}); var resulthtml = ` @@ -57,7 +64,7 @@ function searchresult() { image = artists[i]["image"]; var node = oneresult.cloneNode(true); - node.setAttribute("onclick","goto(" + link + ")"); + node.setAttribute("onclick","goto('" + link + "')"); node.children[0].style.backgroundImage = "url('" + image + "')"; node.children[1].children[0].innerHTML = name; @@ -71,7 +78,7 @@ function searchresult() { image = tracks[i]["image"]; var node = oneresult.cloneNode(true); - node.setAttribute("onclick","goto(" + link + ")"); + node.setAttribute("onclick","goto('" + link + "')"); node.children[0].style.backgroundImage = "url('" + image + "')"; node.children[1].children[0].innerHTML = artists; node.children[1].children[2].innerHTML = title; diff --git a/maloja/web/common/header.html b/maloja/web/common/header.html index e23b9f3..ba3db6d 100644 --- a/maloja/web/common/header.html +++ b/maloja/web/common/header.html @@ -6,6 +6,6 @@ --> - +