diff --git a/database.py b/database.py index 860c75c..38c1332 100644 --- a/database.py +++ b/database.py @@ -666,6 +666,24 @@ def issues(): return {"duplicates":duplicates,"combined":combined,"newartists":newartists,"inconsistent":inconsistent} + +@dbserver.post("/importrules") +def import_rulemodule(): + keys = FormsDict.decode(request.forms) + filename = keys.get("filename") + remove = keys.get("remove") is not None + validchars = "'-_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" + filename = "".join(c for c in filename if c in validchars) + + if remove: + log("Deactivating predefined rulefile " + filename) + os.remove("rules/" + filename + ".tsv") + else: + log("Importing predefined rulefile " + filename) + os.symlink("predefined/" + filename + ".tsv","rules/" + filename + ".tsv") + + + @dbserver.post("/rebuild") def rebuild(): diff --git a/rules/.gitignore b/rules/.gitignore index b6308a3..3c8ddf3 100644 --- a/rules/.gitignore +++ b/rules/.gitignore @@ -1 +1 @@ -*.tsv +/*.tsv diff --git a/rules/predefined/krateng_artistsingroups.tsv b/rules/predefined/krateng_artistsingroups.tsv new file mode 100644 index 0000000..c1b2a63 --- /dev/null +++ b/rules/predefined/krateng_artistsingroups.tsv @@ -0,0 +1,15 @@ +# NAME: Artists and Groups +# DESC: Combines artists that also performed as part of a group + +# single artist more famous than group +countas Selena Gomez & The Scene Selena Gomez +countas The Police Sting +countas Trouble Maker HyunA +# Group more famous than single artist +countas RenoakRhythm Approaching Nirvana +countas Shirley Manson Garbage +countas Lewis Brindley The Yogscast +countas Sips The Yogscast +countas Jennie BLACKPINK +countas Junghwa EXID +countas Hwasa Mamamoo diff --git a/rules/predefined/krateng_kpopgirlgroups.tsv b/rules/predefined/krateng_kpopgirlgroups.tsv new file mode 100644 index 0000000..c4bb003 --- /dev/null +++ b/rules/predefined/krateng_kpopgirlgroups.tsv @@ -0,0 +1,89 @@ +# NAME: K-Pop Girl Groups +# DESC: Fixes various different spellings and romanizes artist names and track titles for some K-Pop Girl Groups + +# HyunA +replaceartist Kim Hyun-a HyunA +replaceartist 현아 HyunA +replacetitle 빨개요 Red +replacetitle RED Red +replacetitle Bubble Pop Bubble Pop! +replacetitle Do it Do It! +replacetitle How's This How's This? +replacetitle How's this How's This? +replaceartist HyunA(현아) HyunA +replacetitle Cause I'm God Girl Roll Deep + +# 4Minute +replaceartist 4minute 4Minute +replacetitle 미쳐 Crazy + +# BLACKPINK +replacetitle AS IF IT'S YOUR LAST As If It's Your Last +replacetitle BOOMBAYAH Boombayah +replacetitle WHISTLE Whistle +replacetitle DDU-DU DDU-DU Ddu-Du Ddu-Du +replacetitle PLAYING WITH FIRE Playing With Fire +replaceartist BLΛƆKPIИK BLACKPINK + +# Dal Shabet +replaceartist Dal Shabet Dal★Shabet +replaceartist Dal shabet Dal★Shabet +replaceartist Dalshabet Dal★Shabet +replaceartist Dalshabet(달샤벳) Dal★Shabet +replaceartist 달샤벳(Dal★shabet) (Dalshabet) Dal★Shabet +replacetitle JOKER (Inst.) Joker (Instrumental) +replacetitle JOKER (Instrumental) Joker (Instrumental) +replacetitle Joker (inst.) Joker (Instrumental) +replacetitle Someone like U Someone Like U +replacetitle Be Ambitious(내 다리를 봐) Be Ambitious + +# f(x) +replacetitle When I’m Alone When I'm Alone +replacetitle 첫 사랑니 (Rum Pum Pum Pum) Rum Pum Pum Pum +replacetitle 종이 심장 (Paper Heart) Paper Heart +replacetitle 나비 (Butterfly) Butterfly +replacetitle Déjà vu Déjà Vu +replacetitle 라차타 (LA chA TA) LA chA TA + +# Stellar +replaceartist STELLAR Stellar +replaceartist 스텔라 Stellar Stellar +replaceartist 스텔라(Stellar) (Stellar) Stellar +replacetitle 찔려 Sting Sting + +# Red Velvet +replacetitle 러시안 룰렛 Russian Roulette Russian Roulette +replacetitle 피카부 Peek-a-Boo Peek-A-Boo +replacetitle 빨간 맛 Red Flavor Red Flavor +replacetitle 행복 (Happiness) Happiness +replacetitle 봐 Look Look +replacetitle RBB (Really Bad Boy) Really Bad Boy + +# EXID +replacetitle HOT PINK Hot Pink +replacetitle AH YEAH Ah Yeah + +# TWICE +replacetitle CHEER UP Cheer Up +replacetitle OOH-AHH하게 Like OOH-AHH Like Ooh-Ahh +replacetitle OOH-AHH Like Ooh-Ahh +replacetitle LIKEY Likey + +# AOA +replacetitle 사뿐사뿐 (Like a Cat) Like a Cat +replacetitle Like A Cat (Japanese Version) Like a Cat (Japanese Version) + +# Girl's Day +replaceartist Girl's Day(걸스데이) Girl's Day +replacetitle DON'T FOR GET ME(나를 잊지마요) Don't forget me +replacetitle Expect(기대해) Expect +replacetitle EXPECT Expect +replacetitle I'll be yours I'll Be Yours +replacetitle FEMALE PRESIDENT(여자 대통령) Female President + +# Mamamoo +replaceartist Hwa Sa Hwasa +replaceartist MAMAMOO Mamamoo + +# Hello Venus +replaceartist Hello/Venus Hello Venus diff --git a/rules/predefined/krateng_lotr-soundtrack.tsv b/rules/predefined/krateng_lotr-soundtrack.tsv new file mode 100644 index 0000000..84f9f28 --- /dev/null +++ b/rules/predefined/krateng_lotr-soundtrack.tsv @@ -0,0 +1,19 @@ +# NAME: Lord of the Rings Soundtrack +# DESC: Fixes tracks and artists from Howard Shore's soundtrack on different releases + +replaceartist Howard Shore/Mabel Faletolu Howard Shore␟Mabel Faletolu +replaceartist Sir James Galway Viggo Mortensen And Renee Fleming Sir James Galway␟Viggo Mortensen␟Renée Fleming +replaceartist Sir James Galway Viggo Mortensen And Renée Fleming Sir James Galway␟Viggo Mortensen␟Renée Fleming +replaceartist Billy Boyd And Dominic Monaghan Billy Boyd␟Dominic Monaghan +replaceartist Billy Boyd and Dominic Monaghan Billy Boyd␟Dominic Monaghan +replaceartist Billy Boyd And Dominic Monaghan Album Version Billy Boyd␟Dominic Monaghan +replaceartist Sissel Performing Asëa Aranion Sissel +replaceartist Annie Lennox Performing Into The West Annie Lennox +replaceartist Billy Boyd Performing The Edge Of Night Billy Boyd +replaceartist Liv Tyler Album Version Liv Tyler +replaceartist Renée Fleming Album Version Renée Fleming +replaceartist Ben del Maestro Album Version Ben Del Maestro +replaceartist Sir James Galway Album Version Sir James Galway +replaceartist Sir James Galway Viggo Mortensen And Renée Fleming Album Version Sir James Galway␟Viggo Mortensen␟Renée Fleming +notanartist In Dreams +notanartist Aniron Theme For Aragorn And Arwen diff --git a/rules/predefined/krateng_monstercat.tsv b/rules/predefined/krateng_monstercat.tsv new file mode 100644 index 0000000..068e9e9 --- /dev/null +++ b/rules/predefined/krateng_monstercat.tsv @@ -0,0 +1,10 @@ +# NAME: Monstercat EDM +# DESC: Fixes parsing of some Monstercat releases + +belongtogether Darth & Vader +belongtogether Case & Point +replaceartist Mr FijiWiji, AgNO3 Mr FijiWiji␟AgNO3 +replaceartist Danilo Garcia, Laura Brehm Danilo Garcia␟Laura Brehm +replaceartist Two Thirds Laura Brehm Two Thirds␟Laura Brehm +replaceartist Approaching Nirvana Laura Brehm Approaching Nirvana␟Laura Brehm +replaceartist Mr FijiWiji AgNO3 Mr FijiWiji␟AgNO3 diff --git a/rules/predefined/predefined.info b/rules/predefined/predefined.info new file mode 100644 index 0000000..20130f0 --- /dev/null +++ b/rules/predefined/predefined.info @@ -0,0 +1,6 @@ +These are some files to get you started if you don't want to create your own rules. +They are concerned with specific artists / genres and are not complete by any means, +but may help you have a clean database from the start if your music taste happens +to be met by them. If you would like to curate your own ruleset, create a pull request +on GitHub. Please do not simply contribute your complete rule file, but a selection +concerned with a specific genre / category / group of music. diff --git a/website/maloja.css b/website/maloja.css index 1527cdc..7463a81 100644 --- a/website/maloja.css +++ b/website/maloja.css @@ -40,9 +40,9 @@ div.header { left:0px; padding:10px; opacity:1; - + color:black; - + z-index:5; } @@ -111,7 +111,7 @@ div.footer input { div.footer input:focus { outline:none; /**background-color:rgba(245,245,220,0.05);**/ - + } div.searchresults { @@ -139,7 +139,7 @@ div.searchresults tr { margin-bottom:5px; height:50px; cursor:pointer; - + } div.searchresults tr:hover { background-color:rgba(35,35,35,1); @@ -253,7 +253,7 @@ span.stat_selector_pulse,span.stat_selector_topartists,span.stat_selector_toptra table.list { border-collapse:collapse; - + } table.list tr td { @@ -263,7 +263,7 @@ table.list tr td { overflow:hidden; text-overflow:ellipsis; padding-right:15px; - + } table.list tr:nth-child(even) { @@ -272,7 +272,7 @@ table.list tr:nth-child(even) { table.list tr:nth-child(5n) td { border-color:rgba(120,120,120,0.2); - + } table.list tr:hover { @@ -281,7 +281,7 @@ table.list tr:hover { table.list td.time { width:11%; - color:gray; + color:gray; } @@ -300,8 +300,16 @@ table.list td.icon div { table.list td.artists,td.artist,td.title { min-width:100px; - - + + +} + + +table th { + text-align: left; +} +table td.interaction { + width:65px; } @@ -317,14 +325,14 @@ table tr td.artists div span { z-index:-2; position:relative; white-space:nowrap; - + } table tr:hover td.artists div span { animation: bounce 3s linear infinite alternate; } @keyframes bounce { 0% { - + } 100% { //transform: translateX(-60px); @@ -479,5 +487,5 @@ div.sidelist table { } div.sidelist table.list td.time { - width:17%; + width:17%; } diff --git a/website/setup.html b/website/setup.html index 58ac1af..b90bb59 100644 --- a/website/setup.html +++ b/website/setup.html @@ -4,7 +4,7 @@
Maloja- + Welcome to your own Maloja server! |