Compare commits

...

3 commits

Author SHA1 Message Date
Georg Krause
87ff5b4da0
Remove manual checking of dependencies in favor of upcoming renovate bot 2021-11-25 13:07:26 +01:00
Philipp Wolfer
da12e745bf
ListenBrainz: Submit media player and submission client information
Following new LB submission API specifications.

Resolves #1610
2021-11-24 11:37:24 +01:00
Georg Krause
60347ccd8c
Allow oauth token expiration time to be configured 2021-11-19 11:55:10 +01:00
5 changed files with 10 additions and 29 deletions

View file

@ -361,29 +361,3 @@ build_api:
- master@funkwhale/funkwhale
- stable@funkwhale/funkwhale
- develop@funkwhale/funkwhale
check_api_dependencies:
interruptible: true
stage: deps
image: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
cache:
key: "$CI_PROJECT_ID__pip_cache"
paths:
- "$PIP_CACHE_DIR"
variables:
DJANGO_SETTINGS_MODULE: config.settings.local
POSTGRES_HOST_AUTH_METHOD: trust
only:
- branches
before_script:
- apk add make git gcc python3-dev musl-dev
- apk add postgresql-dev py3-psycopg2 libldap libffi-dev make zlib-dev jpeg-dev openldap-dev
- cd api
- pip3 install -r requirements/base.txt
- pip3 install -r requirements/local.txt
- pip3 install -r requirements/test.txt
script:
- $CI_PROJECT_DIR/scripts/check-api-deps.sh
tags:
- docker
allow_failure: true

View file

@ -621,7 +621,9 @@ OAUTH2_PROVIDER = {
# we keep expired tokens for 15 days, for tracability
"REFRESH_TOKEN_EXPIRE_SECONDS": 3600 * 24 * 15,
"AUTHORIZATION_CODE_EXPIRE_SECONDS": 5 * 60,
"ACCESS_TOKEN_EXPIRE_SECONDS": 60 * 60 * 10,
"ACCESS_TOKEN_EXPIRE_SECONDS": env.int(
"ACCESS_TOKEN_EXPIRE_SECONDS", default=60 * 60 * 10
),
"OAUTH2_SERVER_CLASS": "funkwhale_api.users.oauth.server.OAuth2Server",
}
OAUTH2_PROVIDER_APPLICATION_MODEL = "users.Application"

View file

@ -1,4 +1,5 @@
from config import plugins
import funkwhale_api
from .funkwhale_startup import PLUGIN
from .client import ListenBrainzClient, Track
@ -21,7 +22,10 @@ def get_track(track):
title = track.title
album = None
additional_info = {
"listening_from": "Funkwhale",
"media_player": "Funkwhale",
"media_player_version": funkwhale_api.__version__,
"submission_client": "Funkwhale ListenBrainz plugin",
"submission_client_version": PLUGIN["version"],
"tracknumber": track.position,
"discnumber": track.disc_number,
}

View file

@ -6,7 +6,7 @@ PLUGIN = plugins.get_plugin_config(
label="ListenBrainz",
description="A plugin that allows you to submit your listens to ListenBrainz.",
homepage="https://docs.funkwhale.audio/users/builtinplugins.html#listenbrainz-plugin", # noqa
version="0.1",
version="0.2",
user=True,
conf=[
{

View file

@ -0,0 +1 @@
ListenBrainz: Submit media player and submission client information