mirror of
https://github.com/krateng/maloja.git
synced 2023-08-10 21:12:55 +03:00
Fixed search
This commit is contained in:
parent
01bf88f83d
commit
246f61ee14
@ -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
|
||||
|
@ -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)
|
||||
|
||||
|
||||
|
@ -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():
|
||||
|
@ -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
|
||||
|
Can't render this file because it has a wrong number of fields in line 5.
|
@ -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 = `
|
||||
<tr>
|
||||
@ -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;
|
||||
|
@ -6,6 +6,6 @@
|
||||
<link rel="stylesheet" href="/css/grisons.css" />
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/less.js/3.9.0/less.min.js" ></script> -->
|
||||
<link rel="stylesheet" href="/style.css" />
|
||||
<script src="/search.js" async></script>
|
||||
<script src="/search.js"></script>
|
||||
<script src="/neopolitan.js"></script>
|
||||
<script src="/upload.js"></script>
|
||||
|
Loading…
Reference in New Issue
Block a user