Merge branch 'master' into v3

This commit is contained in:
krateng 2022-02-13 05:57:53 +01:00
commit 034f8b32c7
5 changed files with 21 additions and 10 deletions

View File

@ -1,6 +1,6 @@
{
"name": "Maloja Scrobbler",
"version": "1.8",
"version": "1.10",
"description": "Scrobbles tracks from various sites to your Maloja server",
"manifest_version": 2,
"permissions": [

View File

@ -3,9 +3,9 @@ maloja_scrobbler_selector_playbar = "//div[contains(@class,'PlayerControls')]"
maloja_scrobbler_selector_metadata = ".//div[contains(@class,'PlayerControlsMetadata-container')]"
maloja_scrobbler_selector_title = ".//a[@data-qa-id='metadataTitleLink']/@title"
maloja_scrobbler_selector_title = ".//a[@data-testid='metadataTitleLink']/@title"
maloja_scrobbler_selector_artist = ".//span[contains(@class,'MetadataPosterTitle-title')]/a[1]/@title"
maloja_scrobbler_selector_duration = ".//button[@data-qa-id='mediaDuration']/text()[3]"
maloja_scrobbler_selector_duration = ".//button[@data-testid='mediaDuration']/text()[3]"
maloja_scrobbler_selector_control = ".//div[contains(@class,'PlayerControls-buttonGroupCenter')]/button[2]/@title"

View File

@ -66,9 +66,10 @@ class APIHandler:
exceptiontype = sys.exc_info()[0]
if exceptiontype in self.errors:
response.status,result = self.errors[exceptiontype]
log(f"Error with {self.__apiname__} API: {exceptiontype} (Request: {path})")
else:
log("Unhandled Exception with " + self.__apiname__ + ": " + str(exceptiontype))
response.status,result = 500,{"status":"Unknown error","code":500}
log(f"Unhandled Exception with {self.__apiname__} API: {exceptiontype} (Request: {path})")
return result
#else:

View File

@ -198,6 +198,12 @@ countas 3Won IZ*ONE
replaceartist ChaeYenJin ACE
countas ACE IZ*ONE
countas Chaewon IZ*ONE
countas Minju IZ*ONE
countas Yeji ITZY
countas Wonyoung IVE
countas Yujin IVE
# Popular Remixes
artistintitle Areia Remix Areia

Can't render this file because it has a wrong number of fields in line 5.

View File

@ -63,12 +63,16 @@ def setup():
print("Password has been set.")
elif auth.defaultuser.checkpw("admin"):
# if the actual pw is admin, it means we've never set this up properly (eg first start after update)
newpw = prompt("Please set a password for web backend access. Leave this empty to generate a random password.",skip=SKIP,secret=True)
if newpw is None:
newpw = randomstring(32)
print("Generated password:",col["yellow"](newpw))
auth.defaultuser.setpw(newpw)
newpw, newpw_repeat = 1, 2
while newpw != newpw_repeat:
newpw = prompt("Please set a password for web backend access. Leave this empty to generate a random password.",skip=SKIP,secret=True)
if newpw is None:
newpw = randomstring(32)
print("Generated password:",col["yellow"](newpw))
else:
newpw_repeat = prompt("Please type again to confirm.",skip=SKIP,secret=True)
if newpw != newpw_repeat: print("Passwords do not match!")
else: auth.defaultuser.setpw(newpw)
if malojaconfig["SEND_STATS"] is None:
answer = ask("I would like to know how many people use Maloja. Would it be okay to send a daily ping to my server (this contains no data that isn't accessible via your web interface already)?",default=True,skip=SKIP)