1
0
mirror of https://github.com/krateng/maloja.git synced 2023-08-10 21:12:55 +03:00

Updated scrobbler

This commit is contained in:
krateng 2021-12-26 19:20:43 +01:00
parent 0ec93d7d0f
commit 6c7e94fc20
7 changed files with 15 additions and 17 deletions

View File

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

View File

@ -1,12 +1,12 @@
maloja_scrobbler_selector_playbar = "//div[@class='now-playing-bar']"
maloja_scrobbler_selector_playbar = "//footer[@data-testid='now-playing-bar']"
maloja_scrobbler_selector_metadata = ".//div[@class='now-playing-bar__left']"
maloja_scrobbler_selector_metadata = ".//div[@data-testid='now-playing-widget']"
maloja_scrobbler_selector_title = ".//a[@data-testid='nowplaying-track-link']/text()"
maloja_scrobbler_selector_title = ".//a[@data-testid='context-item-link']/text()"
maloja_scrobbler_selector_artists = ".//a[contains(@href,'/artist/')]"
maloja_scrobbler_selector_artist = "./text()"
maloja_scrobbler_selector_duration = ".//div[@class='playback-bar']/div[3]/text()"
maloja_scrobbler_selector_duration = ".//div[@data-testid='playback-duration']/text()"
maloja_scrobbler_selector_control = ".//div[contains(@class,'player-controls__buttons')]/button[3]/@title"
maloja_scrobbler_selector_control = ".//button[@data-testid='control-button-playpause']/@aria-label"

View File

@ -3,4 +3,4 @@ convert ../../maloja/web/static/png/favicon_large.png -resize 128 maloja-scrobbl
convert ../../maloja/web/static/png/favicon_large.png -resize 48 maloja-scrobbler/icon48.png
convert ../../maloja/web/static/png/favicon_large.png -background none -resize 280 -gravity center -extent 440x280 -background "#232327" -flatten tile.png
rm ./maloja-scrobbler.zip
zip ./maloja-scrobbler.zip maloja-scrobbler/*
zip ./maloja-scrobbler.zip maloja-scrobbler/* maloja-scrobbler/*/*

View File

@ -102,7 +102,7 @@ def print_info():
print("#####")
print()
@mainfunction({"l":"level","v":"version"},flags=['version'],shield=True)
@mainfunction({"l":"level","v":"version","V":"version"},flags=['version'],shield=True)
def main(*args,**kwargs):
actions = {
@ -121,13 +121,11 @@ def main(*args,**kwargs):
if "version" in kwargs:
print(info.VERSIONSTR)
elif len(args) > 0:
action = args[0]
args = args[1:]
if action in actions: actions[action](*args,**kwargs)
else: print("Valid commands: " + " ".join(a for a in actions))
else:
print("No action specified!")
try:
action, *args = args
actions[action](*args,**kwargs)
except (ValueError, KeyError):
print("Valid commands: " + " ".join(a for a in actions))
return True

View File

@ -18,7 +18,7 @@
<span>
{% for tab_url,tab_name in [
['overview','Overview'],
['setup','Setup'],
['setup','Server Setup'],
['settings','Settings'],
['apikeys','API Keys'],
['manual','Manual Scrobbling'],

View File

@ -3,7 +3,7 @@ name = "maloja"
version = "2.13.4"
description = "Self-hosted music scrobble database"
readme = "./README.md"
requires-python = ">=3.6"
requires-python = ">=3.8"
license = { file="./LICENSE" }
authors = [ { name="Johannes Krattenmacher", email="maloja@dev.krateng.ch" } ]