発散解像度 -divergence resolution-
Signed-off-by: Shin'ya Minazuki <shinyoukai@laidback.moe>
This commit is contained in:
parent
1ff613dee6
commit
01bb65f8da
457 changed files with 929 additions and 602 deletions
|
|
@ -316,6 +316,7 @@ MIDDLEWARE = (
|
|||
"django.contrib.messages.middleware.MessageMiddleware",
|
||||
"funkwhale_api.users.middleware.RecordActivityMiddleware",
|
||||
"funkwhale_api.common.middleware.ThrottleStatusMiddleware",
|
||||
"allauth.account.middleware.AccountMiddleware",
|
||||
)
|
||||
+ tuple(plugins.trigger_filter(plugins.MIDDLEWARES_AFTER, [], enabled=True))
|
||||
)
|
||||
|
|
|
|||
183
api/dev-requirements.txt
Normal file
183
api/dev-requirements.txt
Normal file
|
|
@ -0,0 +1,183 @@
|
|||
aiohttp==3.8.6 ; python_version >= "3.8" and python_version < "3.12"
|
||||
aioresponses==0.7.6 ; python_version >= "3.8" and python_version < "3.12"
|
||||
aiosignal==1.3.1 ; python_version >= "3.8" and python_version < "3.12"
|
||||
amqp==5.3.1 ; python_version >= "3.8" and python_version < "3.12"
|
||||
anyio==4.5.2 ; python_version >= "3.8" and python_version < "3.12"
|
||||
appnope==0.1.4 ; python_version >= "3.8" and python_version < "3.12" and sys_platform == "darwin"
|
||||
arrow==1.2.3 ; python_version >= "3.8" and python_version < "3.12"
|
||||
asgiref==3.8.1 ; python_version >= "3.8" and python_version < "3.12"
|
||||
astroid==2.15.8 ; python_version >= "3.8" and python_version < "3.12"
|
||||
async-timeout==4.0.3 ; python_version >= "3.8" and python_version < "3.12"
|
||||
asynctest==0.13.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
attrs==25.3.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
autobahn==23.1.2 ; python_version >= "3.8" and python_version < "3.12"
|
||||
automat==24.8.1 ; python_version >= "3.8" and python_version < "3.12"
|
||||
backcall==0.2.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
backports-zoneinfo==0.2.1 ; python_version == "3.8"
|
||||
billiard==3.6.4.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
black==23.3.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
bleach==5.0.1 ; python_version >= "3.8" and python_version < "3.12"
|
||||
boto3==1.26.161 ; python_version >= "3.8" and python_version < "3.12"
|
||||
botocore==1.29.165 ; python_version >= "3.8" and python_version < "3.12"
|
||||
cachetools==5.5.2 ; python_version >= "3.8" and python_version < "3.12"
|
||||
celery==5.2.7 ; python_version >= "3.8" and python_version < "3.12"
|
||||
certifi==2025.1.31 ; python_version >= "3.8" and python_version < "3.12"
|
||||
cffi==1.17.1 ; python_version >= "3.8" and python_version < "3.12"
|
||||
channels-redis==4.1.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
channels==4.0.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
charset-normalizer==3.4.1 ; python_version >= "3.8" and python_version < "3.12"
|
||||
click-didyoumean==0.3.1 ; python_version >= "3.8" and python_version < "3.12"
|
||||
click-plugins==1.1.1 ; python_version >= "3.8" and python_version < "3.12"
|
||||
click-repl==0.3.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
click==8.1.7 ; python_version >= "3.8" and python_version < "3.12"
|
||||
colorama==0.4.6 ; python_version >= "3.8" and python_version < "3.12" and (platform_system == "Windows" or sys_platform == "win32")
|
||||
constantly==23.10.4 ; python_version >= "3.8" and python_version < "3.12"
|
||||
coverage==6.5.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
cryptography==38.0.4 ; python_version >= "3.8" and python_version < "3.12"
|
||||
daphne==4.1.2 ; python_version >= "3.8" and python_version < "3.12"
|
||||
debugpy==1.6.7.post1 ; python_version >= "3.8" and python_version < "3.12"
|
||||
decorator==5.2.1 ; python_version >= "3.8" and python_version < "3.12"
|
||||
defusedxml==0.7.1 ; python_version >= "3.8" and python_version < "3.12"
|
||||
dill==0.3.9 ; python_version >= "3.8" and python_version < "3.12"
|
||||
dj-rest-auth==7.0.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
django-allauth==0.60.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
django-auth-ldap==4.1.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
django-cache-memoize==0.1.10 ; python_version >= "3.8" and python_version < "3.12"
|
||||
django-cacheops==6.1 ; python_version >= "3.8" and python_version < "3.12"
|
||||
django-cleanup==6.0.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
django-cors-headers==3.13.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
django-coverage-plugin==3.0.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
django-debug-toolbar==3.8.1 ; python_version >= "3.8" and python_version < "3.12"
|
||||
django-dynamic-preferences==1.14.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
django-environ==0.10.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
django-extensions==3.2.3 ; python_version >= "3.8" and python_version < "3.12"
|
||||
django-filter==22.1 ; python_version >= "3.8" and python_version < "3.12"
|
||||
django-oauth-toolkit==2.2.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
django-redis==5.2.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
django-storages==1.13.2 ; python_version >= "3.8" and python_version < "3.12"
|
||||
django-versatileimagefield==2.2 ; python_version >= "3.8" and python_version < "3.12"
|
||||
django==3.2.24 ; python_version >= "3.8" and python_version < "3.12"
|
||||
djangorestframework==3.14.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
drf-spectacular==0.26.5 ; python_version >= "3.8" and python_version < "3.12"
|
||||
exceptiongroup==1.2.2 ; python_version >= "3.8" and python_version < "3.11"
|
||||
factory-boy==3.2.1 ; python_version >= "3.8" and python_version < "3.12"
|
||||
faker==15.3.4 ; python_version >= "3.8" and python_version < "3.12"
|
||||
feedparser==6.0.11 ; python_version >= "3.8" and python_version < "3.12"
|
||||
flake8==3.9.2 ; python_version >= "3.8" and python_version < "3.12"
|
||||
frozendict==2.4.6 ; python_version >= "3.8" and python_version < "3.12"
|
||||
frozenlist==1.5.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
funcy==1.18 ; python_version >= "3.8" and python_version < "3.12"
|
||||
gunicorn==20.1.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
h11==0.14.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
httptools==0.6.4 ; python_version >= "3.8" and python_version < "3.12"
|
||||
hyperlink==21.0.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
idna==3.10 ; python_version >= "3.8" and python_version < "3.12"
|
||||
importlib-metadata==8.5.0 ; python_version >= "3.8" and python_version < "3.10"
|
||||
importlib-resources==6.4.5 ; python_version == "3.8"
|
||||
incremental==22.10.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
inflection==0.5.1 ; python_version >= "3.8" and python_version < "3.12"
|
||||
iniconfig==2.1.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
ipdb==0.13.13 ; python_version >= "3.8" and python_version < "3.12"
|
||||
ipython==7.34.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
isort==5.13.2 ; python_version >= "3.8" and python_version < "3.12"
|
||||
jedi==0.19.2 ; python_version >= "3.8" and python_version < "3.12"
|
||||
jmespath==1.0.1 ; python_version >= "3.8" and python_version < "3.12"
|
||||
jsonschema-specifications==2023.12.1 ; python_version >= "3.8" and python_version < "3.12"
|
||||
jsonschema==4.23.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
jwcrypto==1.5.6 ; python_version >= "3.8" and python_version < "3.12"
|
||||
kombu==5.2.4 ; python_version >= "3.8" and python_version < "3.12"
|
||||
lazy-object-proxy==1.10.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
lxml==5.3.2 ; python_version >= "3.8" and python_version < "3.12"
|
||||
markdown==3.4.4 ; python_version >= "3.8" and python_version < "3.12"
|
||||
matplotlib-inline==0.1.7 ; python_version >= "3.8" and python_version < "3.12"
|
||||
mccabe==0.6.1 ; python_version >= "3.8" and python_version < "3.12"
|
||||
msgpack==1.1.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
multidict==6.1.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
musicbrainzngs==0.7.1 ; python_version >= "3.8" and python_version < "3.12"
|
||||
mutagen==1.46.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
mypy-extensions==1.0.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
oauthlib==3.2.2 ; python_version >= "3.8" and python_version < "3.12"
|
||||
packaging==24.2 ; python_version >= "3.8" and python_version < "3.12"
|
||||
parso==0.8.4 ; python_version >= "3.8" and python_version < "3.12"
|
||||
pathspec==0.12.1 ; python_version >= "3.8" and python_version < "3.12"
|
||||
persisting-theory==1.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
pexpect==4.9.0 ; python_version >= "3.8" and python_version < "3.12" and sys_platform != "win32"
|
||||
pickleshare==0.7.5 ; python_version >= "3.8" and python_version < "3.12"
|
||||
pillow==9.3.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
pkgutil-resolve-name==1.3.10 ; python_version == "3.8"
|
||||
platformdirs==4.3.6 ; python_version >= "3.8" and python_version < "3.12"
|
||||
pluggy==1.5.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
pluralizer==1.2.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
prompt-toolkit==3.0.43 ; python_version >= "3.8" and python_version < "3.12"
|
||||
propcache==0.2.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
psycopg2==2.9.9 ; python_version >= "3.8" and python_version < "3.12"
|
||||
ptyprocess==0.7.0 ; python_version >= "3.8" and python_version < "3.12" and sys_platform != "win32"
|
||||
pyasn1-modules==0.4.2 ; python_version >= "3.8" and python_version < "3.12"
|
||||
pyasn1==0.6.1 ; python_version >= "3.8" and python_version < "3.12"
|
||||
pycodestyle==2.7.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
pycountry==22.3.5 ; python_version >= "3.8" and python_version < "3.12"
|
||||
pycparser==2.22 ; python_version >= "3.8" and python_version < "3.12"
|
||||
pydub==0.25.1 ; python_version >= "3.8" and python_version < "3.12"
|
||||
pyflakes==2.3.1 ; python_version >= "3.8" and python_version < "3.12"
|
||||
pygments==2.19.1 ; python_version >= "3.8" and python_version < "3.12"
|
||||
pyjwt==2.10.1 ; python_version == "3.11"
|
||||
pyjwt==2.9.0 ; python_version >= "3.8" and python_version < "3.11"
|
||||
pyld==2.0.4 ; python_version >= "3.8" and python_version < "3.12"
|
||||
pylint-django==2.5.5 ; python_version >= "3.8" and python_version < "3.12"
|
||||
pylint-plugin-utils==0.8.2 ; python_version >= "3.8" and python_version < "3.12"
|
||||
pylint==2.17.7 ; python_version >= "3.8" and python_version < "3.12"
|
||||
pyopenssl==23.2.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
pytest-asyncio==0.21.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
pytest-cov==4.0.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
pytest-django==4.5.2 ; python_version >= "3.8" and python_version < "3.12"
|
||||
pytest-env==0.8.2 ; python_version >= "3.8" and python_version < "3.12"
|
||||
pytest-mock==3.10.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
pytest-randomly==3.12.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
pytest-sugar==0.9.7 ; python_version >= "3.8" and python_version < "3.12"
|
||||
pytest==7.4.4 ; python_version >= "3.8" and python_version < "3.12"
|
||||
python-dateutil==2.9.0.post0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
python-dotenv==1.0.1 ; python_version >= "3.8" and python_version < "3.12"
|
||||
python-ldap==3.4.4 ; python_version >= "3.8" and python_version < "3.12"
|
||||
python-magic==0.4.27 ; python_version >= "3.8" and python_version < "3.12"
|
||||
python3-openid==3.2.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
pytz==2025.2 ; python_version >= "3.8" and python_version < "3.12"
|
||||
pyyaml==6.0.2 ; python_version >= "3.8" and python_version < "3.12"
|
||||
redis==4.5.5 ; python_version >= "3.8" and python_version < "3.12"
|
||||
referencing==0.35.1 ; python_version >= "3.8" and python_version < "3.12"
|
||||
requests-http-message-signatures==0.3.1 ; python_version >= "3.8" and python_version < "3.12"
|
||||
requests-mock==1.10.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
requests-oauthlib==2.0.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
requests==2.28.2 ; python_version >= "3.8" and python_version < "3.12"
|
||||
rpds-py==0.20.1 ; python_version >= "3.8" and python_version < "3.12"
|
||||
s3transfer==0.6.2 ; python_version >= "3.8" and python_version < "3.12"
|
||||
sentry-sdk==1.19.1 ; python_version >= "3.8" and python_version < "3.12"
|
||||
service-identity==21.1.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
setuptools==60.10.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
sgmllib3k==1.0.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
six==1.17.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
sniffio==1.3.1 ; python_version >= "3.8" and python_version < "3.12"
|
||||
sqlparse==0.5.3 ; python_version >= "3.8" and python_version < "3.12"
|
||||
termcolor==2.4.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
tomli==2.2.1 ; python_version >= "3.8" and python_version < "3.11"
|
||||
tomlkit==0.13.2 ; python_version >= "3.8" and python_version < "3.12"
|
||||
traitlets==5.14.3 ; python_version >= "3.8" and python_version < "3.12"
|
||||
twisted-iocpsupport==1.0.4 ; python_version >= "3.8" and python_version < "3.12" and platform_system == "Windows"
|
||||
twisted==24.3.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
txaio==23.1.1 ; python_version >= "3.8" and python_version < "3.12"
|
||||
typing-extensions==4.13.2 ; python_version >= "3.8" and python_version < "3.12"
|
||||
unicode-slugify==0.1.5 ; python_version >= "3.8" and python_version < "3.12"
|
||||
unidecode==1.3.7 ; python_version >= "3.8" and python_version < "3.12"
|
||||
uritemplate==4.1.1 ; python_version >= "3.8" and python_version < "3.12"
|
||||
urllib3==1.26.20 ; python_version >= "3.8" and python_version < "3.12"
|
||||
uvicorn==0.20.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
uvloop==0.21.0 ; python_version >= "3.8" and python_version < "3.12" and sys_platform != "win32" and sys_platform != "cygwin" and platform_python_implementation != "PyPy"
|
||||
vine==5.1.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
watchdog==2.2.1 ; python_version >= "3.8" and python_version < "3.12"
|
||||
watchfiles==0.24.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
wcwidth==0.2.13 ; python_version >= "3.8" and python_version < "3.12"
|
||||
webencodings==0.5.1 ; python_version >= "3.8" and python_version < "3.12"
|
||||
websockets==13.1 ; python_version >= "3.8" and python_version < "3.12"
|
||||
wrapt==1.17.2 ; python_version >= "3.8" and python_version < "3.12"
|
||||
yarl==1.15.2 ; python_version >= "3.8" and python_version < "3.12"
|
||||
zipp==3.20.2 ; python_version >= "3.8" and python_version < "3.10"
|
||||
zope-interface==7.2 ; python_version >= "3.8" and python_version < "3.12"
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
from importlib.metadata import version as get_version
|
||||
|
||||
version = get_version("funquail_api")
|
||||
version = get_version("funkwhale_api")
|
||||
__version__ = version
|
||||
|
|
@ -4,7 +4,7 @@ from . import record
|
|||
|
||||
|
||||
class ActivityConfig(AppConfig):
|
||||
name = "funquail_api.activity"
|
||||
name = "funkwhale_api.activity"
|
||||
|
||||
def ready(self):
|
||||
super().ready()
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
from rest_framework import serializers
|
||||
|
||||
from funquail_api.activity import record
|
||||
from funkwhale_api.activity import record
|
||||
|
||||
|
||||
class ModelSerializer(serializers.ModelSerializer):
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
from django.db import models
|
||||
|
||||
from funquail_api.common import fields
|
||||
from funquail_api.favorites.models import TrackFavorite
|
||||
from funquail_api.history.models import Listening
|
||||
from funkwhale_api.common import fields
|
||||
from funkwhale_api.favorites.models import TrackFavorite
|
||||
from funkwhale_api.history.models import Listening
|
||||
|
||||
|
||||
def combined_recent(limit, **kwargs):
|
||||
|
|
@ -2,8 +2,8 @@ from drf_spectacular.utils import extend_schema
|
|||
from rest_framework import viewsets
|
||||
from rest_framework.response import Response
|
||||
|
||||
from funquail_api.common.permissions import ConditionalAuthentication
|
||||
from funquail_api.favorites.models import TrackFavorite
|
||||
from funkwhale_api.common.permissions import ConditionalAuthentication
|
||||
from funkwhale_api.favorites.models import TrackFavorite
|
||||
|
||||
from . import serializers, utils
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
from funquail_api.common import admin
|
||||
from funkwhale_api.common import admin
|
||||
|
||||
from . import models
|
||||
|
||||
|
|
@ -2,10 +2,10 @@ import uuid
|
|||
|
||||
import factory
|
||||
|
||||
from funquail_api.factories import NoUpdateOnCreate, registry
|
||||
from funquail_api.federation import actors
|
||||
from funquail_api.federation import factories as federation_factories
|
||||
from funquail_api.music import factories as music_factories
|
||||
from funkwhale_api.factories import NoUpdateOnCreate, registry
|
||||
from funkwhale_api.federation import actors
|
||||
from funkwhale_api.federation import factories as federation_factories
|
||||
from funkwhale_api.music import factories as music_factories
|
||||
|
||||
from . import models
|
||||
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
import django_filters
|
||||
from django.db.models import Q
|
||||
|
||||
from funquail_api.common import fields
|
||||
from funquail_api.common import filters as common_filters
|
||||
from funquail_api.federation import actors
|
||||
from funquail_api.moderation import filters as moderation_filters
|
||||
from funkwhale_api.common import fields
|
||||
from funkwhale_api.common import filters as common_filters
|
||||
from funkwhale_api.federation import actors
|
||||
from funkwhale_api.moderation import filters as moderation_filters
|
||||
|
||||
from . import models
|
||||
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
import django.contrib.postgres.fields.jsonb
|
||||
import django.core.serializers.json
|
||||
from django.db import migrations
|
||||
import funquail_api.audio.models
|
||||
import funkwhale_api.audio.models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
|
@ -16,6 +16,6 @@ class Migration(migrations.Migration):
|
|||
migrations.AddField(
|
||||
model_name='channel',
|
||||
name='metadata',
|
||||
field=django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=funquail_api.audio.models.empty_dict, encoder=django.core.serializers.json.DjangoJSONEncoder, max_length=50000),
|
||||
field=django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=funkwhale_api.audio.models.empty_dict, encoder=django.core.serializers.json.DjangoJSONEncoder, max_length=50000),
|
||||
),
|
||||
]
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
import django.core.serializers.json
|
||||
from django.db import migrations, models
|
||||
import funquail_api.audio.models
|
||||
import funkwhale_api.audio.models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
|
@ -15,6 +15,6 @@ class Migration(migrations.Migration):
|
|||
migrations.AlterField(
|
||||
model_name='channel',
|
||||
name='metadata',
|
||||
field=models.JSONField(blank=True, default=funquail_api.audio.models.empty_dict, encoder=django.core.serializers.json.DjangoJSONEncoder, max_length=50000),
|
||||
field=models.JSONField(blank=True, default=funkwhale_api.audio.models.empty_dict, encoder=django.core.serializers.json.DjangoJSONEncoder, max_length=50000),
|
||||
),
|
||||
]
|
||||
|
|
@ -9,10 +9,10 @@ from django.dispatch import receiver
|
|||
from django.urls import reverse
|
||||
from django.utils import timezone
|
||||
|
||||
from funquail_api.federation import keys
|
||||
from funquail_api.federation import models as federation_models
|
||||
from funquail_api.federation import utils as federation_utils
|
||||
from funquail_api.users import models as user_models
|
||||
from funkwhale_api.federation import keys
|
||||
from funkwhale_api.federation import models as federation_models
|
||||
from funkwhale_api.federation import utils as federation_utils
|
||||
from funkwhale_api.users import models as user_models
|
||||
|
||||
|
||||
def empty_dict():
|
||||
|
|
@ -21,7 +21,7 @@ def empty_dict():
|
|||
|
||||
class ChannelQuerySet(models.QuerySet):
|
||||
def external_rss(self, include=True):
|
||||
from funquail_api.federation import actors
|
||||
from funkwhale_api.federation import actors
|
||||
|
||||
query = models.Q(
|
||||
attributed_to=actors.get_service_actor(),
|
||||
|
|
@ -2,7 +2,7 @@ import xml.etree.ElementTree as ET
|
|||
|
||||
from rest_framework import negotiation, renderers
|
||||
|
||||
from funquail_api.subsonic.renderers import dict_to_xml_tree
|
||||
from funkwhale_api.subsonic.renderers import dict_to_xml_tree
|
||||
|
||||
|
||||
class PodcastRSSRenderer(renderers.JSONRenderer):
|
||||
|
|
@ -16,20 +16,20 @@ from drf_spectacular.types import OpenApiTypes
|
|||
from drf_spectacular.utils import extend_schema_field
|
||||
from rest_framework import serializers
|
||||
|
||||
from funquail_api.common import locales, preferences
|
||||
from funquail_api.common import serializers as common_serializers
|
||||
from funquail_api.common import session
|
||||
from funquail_api.common import utils as common_utils
|
||||
from funquail_api.federation import actors
|
||||
from funquail_api.federation import models as federation_models
|
||||
from funquail_api.federation import serializers as federation_serializers
|
||||
from funquail_api.federation import utils as federation_utils
|
||||
from funquail_api.moderation import mrf
|
||||
from funquail_api.music import models as music_models
|
||||
from funquail_api.music.serializers import COVER_WRITE_FIELD, CoverField
|
||||
from funquail_api.tags import models as tags_models
|
||||
from funquail_api.tags import serializers as tags_serializers
|
||||
from funquail_api.users import serializers as users_serializers
|
||||
from funkwhale_api.common import locales, preferences
|
||||
from funkwhale_api.common import serializers as common_serializers
|
||||
from funkwhale_api.common import session
|
||||
from funkwhale_api.common import utils as common_utils
|
||||
from funkwhale_api.federation import actors
|
||||
from funkwhale_api.federation import models as federation_models
|
||||
from funkwhale_api.federation import serializers as federation_serializers
|
||||
from funkwhale_api.federation import utils as federation_utils
|
||||
from funkwhale_api.moderation import mrf
|
||||
from funkwhale_api.music import models as music_models
|
||||
from funkwhale_api.music.serializers import COVER_WRITE_FIELD, CoverField
|
||||
from funkwhale_api.tags import models as tags_models
|
||||
from funkwhale_api.tags import serializers as tags_serializers
|
||||
from funkwhale_api.users import serializers as users_serializers
|
||||
|
||||
from . import categories, models
|
||||
|
||||
|
|
@ -5,9 +5,9 @@ from django.db.models import Q
|
|||
from django.urls import reverse
|
||||
from rest_framework import serializers
|
||||
|
||||
from funquail_api.common import middleware, preferences, utils
|
||||
from funquail_api.federation import utils as federation_utils
|
||||
from funquail_api.music import spa_views
|
||||
from funkwhale_api.common import middleware, preferences, utils
|
||||
from funkwhale_api.federation import utils as federation_utils
|
||||
from funkwhale_api.music import spa_views
|
||||
|
||||
from . import models
|
||||
|
||||
|
|
@ -5,7 +5,7 @@ from django.conf import settings
|
|||
from django.db import transaction
|
||||
from django.utils import timezone
|
||||
|
||||
from funquail_api.taskapp import celery
|
||||
from funkwhale_api.taskapp import celery
|
||||
|
||||
from . import models, serializers
|
||||
|
||||
|
|
@ -7,17 +7,17 @@ from rest_framework import decorators, exceptions, mixins
|
|||
from rest_framework import permissions as rest_permissions
|
||||
from rest_framework import response, viewsets
|
||||
|
||||
from funquail_api.common import locales, permissions, preferences
|
||||
from funquail_api.common import utils as common_utils
|
||||
from funquail_api.common.mixins import MultipleLookupDetailMixin
|
||||
from funquail_api.federation import actors
|
||||
from funquail_api.federation import models as federation_models
|
||||
from funquail_api.federation import routes
|
||||
from funquail_api.federation import tasks as federation_tasks
|
||||
from funquail_api.federation import utils as federation_utils
|
||||
from funquail_api.music import models as music_models
|
||||
from funquail_api.music import views as music_views
|
||||
from funquail_api.users.oauth import permissions as oauth_permissions
|
||||
from funkwhale_api.common import locales, permissions, preferences
|
||||
from funkwhale_api.common import utils as common_utils
|
||||
from funkwhale_api.common.mixins import MultipleLookupDetailMixin
|
||||
from funkwhale_api.federation import actors
|
||||
from funkwhale_api.federation import models as federation_models
|
||||
from funkwhale_api.federation import routes
|
||||
from funkwhale_api.federation import tasks as federation_tasks
|
||||
from funkwhale_api.federation import utils as federation_utils
|
||||
from funkwhale_api.music import models as music_models
|
||||
from funkwhale_api.music import views as music_views
|
||||
from funkwhale_api.users.oauth import permissions as oauth_permissions
|
||||
|
||||
from . import categories, filters, models, renderers, serializers
|
||||
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import click
|
||||
|
||||
from funquail_api.music import tasks
|
||||
from funkwhale_api.music import tasks
|
||||
|
||||
from . import base
|
||||
|
||||
|
|
@ -5,8 +5,8 @@ from django.core.files.storage import default_storage
|
|||
from versatileimagefield import settings as vif_settings
|
||||
from versatileimagefield.image_warmer import VersatileImageFieldWarmer
|
||||
|
||||
from funquail_api.common import utils as common_utils
|
||||
from funquail_api.common.models import Attachment
|
||||
from funkwhale_api.common import utils as common_utils
|
||||
from funkwhale_api.common.models import Attachment
|
||||
|
||||
from . import base
|
||||
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
import click
|
||||
from django.db import transaction
|
||||
|
||||
from funquail_api.federation import models as federation_models
|
||||
from funquail_api.users import models, serializers, tasks
|
||||
from funkwhale_api.federation import models as federation_models
|
||||
from funkwhale_api.users import models, serializers, tasks
|
||||
|
||||
from . import base, utils
|
||||
|
||||
3
api/funkwhale_api/cli/utils.py
Normal file
3
api/funkwhale_api/cli/utils.py
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
import logging
|
||||
|
||||
logger = logging.getLogger("funkwhale_api.cli")
|
||||
|
|
@ -7,7 +7,7 @@ from . import mutations, utils
|
|||
|
||||
|
||||
class CommonConfig(AppConfig):
|
||||
name = "funquail_api.common"
|
||||
name = "funkwhale_api.common"
|
||||
|
||||
def ready(self):
|
||||
super().ready()
|
||||
|
|
@ -6,7 +6,7 @@ from oauth2_provider.contrib.rest_framework.authentication import (
|
|||
)
|
||||
from rest_framework import exceptions
|
||||
|
||||
from funquail_api.users import models as users_models
|
||||
from funkwhale_api.users import models as users_models
|
||||
|
||||
|
||||
class UnverifiedEmail(Exception):
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
from channels.generic.websocket import JsonWebsocketConsumer
|
||||
|
||||
from funquail_api.common import channels
|
||||
from funkwhale_api.common import channels
|
||||
|
||||
|
||||
class JsonAuthConsumer(JsonWebsocketConsumer):
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
import factory
|
||||
|
||||
from funquail_api.factories import NoUpdateOnCreate, registry
|
||||
from funquail_api.federation import factories as federation_factories
|
||||
from funkwhale_api.factories import NoUpdateOnCreate, registry
|
||||
from funkwhale_api.federation import factories as federation_factories
|
||||
|
||||
|
||||
@registry.register
|
||||
|
|
@ -198,7 +198,7 @@ class ActorScopeFilter(filters.CharFilter):
|
|||
return queryset.filter(query).distinct()
|
||||
|
||||
def get_query(self, scope, user, actor):
|
||||
from funquail_api.federation import models as federation_models
|
||||
from funkwhale_api.federation import models as federation_models
|
||||
|
||||
if scope == "me":
|
||||
return self.filter_me(actor)
|
||||
|
|
@ -5,9 +5,9 @@ import uvicorn
|
|||
from django.core.management import call_command
|
||||
from django.core.management.commands.migrate import Command as BaseCommand
|
||||
|
||||
from funquail_api.common import preferences
|
||||
from funquail_api.music.models import Library
|
||||
from funquail_api.users.models import User
|
||||
from funkwhale_api.common import preferences
|
||||
from funkwhale_api.music.models import Library
|
||||
from funkwhale_api.users.models import User
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
|
|
@ -73,6 +73,6 @@ class Command(BaseCommand):
|
|||
reload=True,
|
||||
reload_dirs=[
|
||||
"/workspace/funkwhale/api/config/",
|
||||
"/workspace/funkwhale/api/funquail_api/",
|
||||
"/workspace/funkwhale/api/funkwhale_api/",
|
||||
],
|
||||
)
|
||||
|
|
@ -4,7 +4,7 @@ from argparse import RawTextHelpFormatter
|
|||
from django.core.management.base import BaseCommand
|
||||
from django.db import transaction
|
||||
|
||||
from funquail_api.music import models
|
||||
from funkwhale_api.music import models
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
|
|
@ -5,11 +5,11 @@ from django.conf import settings
|
|||
from django.core.management.base import BaseCommand
|
||||
from django.db import transaction
|
||||
|
||||
from funquail_api.federation import keys
|
||||
from funquail_api.federation import models as federation_models
|
||||
from funquail_api.music import models as music_models
|
||||
from funquail_api.tags import models as tags_models
|
||||
from funquail_api.users import models as users_models
|
||||
from funkwhale_api.federation import keys
|
||||
from funkwhale_api.federation import models as federation_models
|
||||
from funkwhale_api.music import models as music_models
|
||||
from funkwhale_api.tags import models as tags_models
|
||||
from funkwhale_api.users import models as users_models
|
||||
|
||||
BATCH_SIZE = 500
|
||||
|
||||
|
|
@ -236,7 +236,7 @@ class Command(BaseCommand):
|
|||
def handle(self, *args, **options):
|
||||
from django.apps import apps
|
||||
|
||||
from funquail_api import factories
|
||||
from funkwhale_api import factories
|
||||
|
||||
app_names = [app.name for app in apps.app_configs.values()]
|
||||
factories.registry.autodiscover(app_names)
|
||||
|
|
@ -267,7 +267,7 @@ class Command(BaseCommand):
|
|||
self.stdout.write(self.style.SUCCESS("Done!"))
|
||||
|
||||
def create_batch(self, row, results, options, count):
|
||||
from funquail_api import factories
|
||||
from funkwhale_api import factories
|
||||
|
||||
if row["id"] in results:
|
||||
# already generated
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
from django.core.management.base import BaseCommand, CommandError
|
||||
|
||||
from funquail_api.common import scripts
|
||||
from funkwhale_api.common import scripts
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = "Run a specific script from funquail_api/common/scripts/"
|
||||
help = "Run a specific script from funkwhale_api/common/scripts/"
|
||||
|
||||
def add_arguments(self, parser):
|
||||
parser.add_argument("script_name", nargs="?", type=str)
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
from django.core.management.commands.migrate import Command as BaseCommand
|
||||
|
||||
from funquail_api.federation import factories
|
||||
from funquail_api.federation.models import Actor
|
||||
from funkwhale_api.federation import factories
|
||||
from funkwhale_api.federation.models import Actor
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
|
|
@ -15,7 +15,7 @@ from django.core.cache import caches
|
|||
from django.middleware import csrf
|
||||
from rest_framework import views
|
||||
|
||||
from funquail_api.federation import utils as federation_utils
|
||||
from funkwhale_api.federation import utils as federation_utils
|
||||
|
||||
from . import preferences, session, throttling, utils
|
||||
|
||||
|
|
@ -5,8 +5,8 @@ import django.core.serializers.json
|
|||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
import django.utils.timezone
|
||||
import funquail_api.common.models
|
||||
import funquail_api.common.validators
|
||||
import funkwhale_api.common.models
|
||||
import funkwhale_api.common.validators
|
||||
import uuid
|
||||
import versatileimagefield.fields
|
||||
|
||||
|
|
@ -28,7 +28,7 @@ class Migration(migrations.Migration):
|
|||
('last_fetch_date', models.DateTimeField(blank=True, null=True)),
|
||||
('size', models.IntegerField(blank=True, null=True)),
|
||||
('mimetype', models.CharField(blank=True, max_length=200, null=True)),
|
||||
('file', versatileimagefield.fields.VersatileImageField(max_length=255, upload_to=funquail_api.common.models.get_file_path, validators=[funquail_api.common.validators.ImageDimensionsValidator(min_height=50, min_width=50), funquail_api.common.validators.FileValidator(allowed_extensions=['png', 'jpg', 'jpeg'], max_size=5242880)])),
|
||||
('file', versatileimagefield.fields.VersatileImageField(max_length=255, upload_to=funkwhale_api.common.models.get_file_path, validators=[funkwhale_api.common.validators.ImageDimensionsValidator(min_height=50, min_width=50), funkwhale_api.common.validators.FileValidator(allowed_extensions=['png', 'jpg', 'jpeg'], max_size=5242880)])),
|
||||
('actor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='attachments', to='federation.Actor', null=True)),
|
||||
],
|
||||
),
|
||||
|
|
@ -16,7 +16,7 @@ from django.utils import timezone
|
|||
from versatileimagefield.fields import VersatileImageField
|
||||
from versatileimagefield.image_warmer import VersatileImageFieldWarmer
|
||||
|
||||
from funquail_api.federation import utils as federation_utils
|
||||
from funkwhale_api.federation import utils as federation_utils
|
||||
|
||||
from . import utils, validators
|
||||
|
||||
|
|
@ -4,7 +4,7 @@ from django.core.exceptions import ObjectDoesNotExist
|
|||
from django.http import Http404
|
||||
from rest_framework.permissions import BasePermission
|
||||
|
||||
from funquail_api.common import preferences
|
||||
from funkwhale_api.common import preferences
|
||||
|
||||
|
||||
class ConditionalAuthentication(BasePermission):
|
||||
|
|
@ -3,7 +3,7 @@ Compute different sizes of image used for Album covers and User avatars
|
|||
"""
|
||||
from django.db.utils import IntegrityError
|
||||
|
||||
from funquail_api.users.models import User, create_actor
|
||||
from funkwhale_api.users.models import User, create_actor
|
||||
|
||||
|
||||
def main(command, **kwargs):
|
||||
|
|
@ -4,7 +4,7 @@ Compute different sizes of image used for Album covers and User avatars
|
|||
|
||||
from versatileimagefield.image_warmer import VersatileImageFieldWarmer
|
||||
|
||||
from funquail_api.common.models import Attachment
|
||||
from funkwhale_api.common.models import Attachment
|
||||
|
||||
MODELS = [
|
||||
(Attachment, "file", "attachment_square"),
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
Compute different sizes of image used for Album covers and User avatars
|
||||
"""
|
||||
|
||||
from funquail_api.music.models import Upload
|
||||
from funkwhale_api.music.models import Upload
|
||||
|
||||
|
||||
def main(command, **kwargs):
|
||||
|
|
@ -5,7 +5,7 @@ following the work done in #152.
|
|||
from django.contrib.auth.models import Permission
|
||||
from django.db.models import Q
|
||||
|
||||
from funquail_api.users import models
|
||||
from funkwhale_api.users import models
|
||||
|
||||
mapping = {
|
||||
"dynamic_preferences.change_globalpreferencemodel": "settings",
|
||||
|
|
@ -14,10 +14,10 @@ This command will also generate federation ids for existing resources.
|
|||
from django.conf import settings
|
||||
from django.db.models import CharField, F, Value, functions
|
||||
|
||||
from funquail_api.common import preferences
|
||||
from funquail_api.federation import models as federation_models
|
||||
from funquail_api.music import models
|
||||
from funquail_api.users.models import User
|
||||
from funkwhale_api.common import preferences
|
||||
from funkwhale_api.federation import models as federation_models
|
||||
from funkwhale_api.music import models
|
||||
from funkwhale_api.users.models import User
|
||||
|
||||
|
||||
def create_libraries(open_api, stdout):
|
||||
|
|
@ -230,7 +230,7 @@ class StripExifImageField(serializers.ImageField):
|
|||
)
|
||||
|
||||
|
||||
from funquail_api.federation import serializers as federation_serializers # noqa
|
||||
from funkwhale_api.federation import serializers as federation_serializers # noqa
|
||||
|
||||
TARGET_ID_TYPE_MAPPING = {
|
||||
"music.Track": ("id", "track"),
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
import requests
|
||||
from django.conf import settings
|
||||
|
||||
import funquail_api
|
||||
import funkwhale_api
|
||||
|
||||
|
||||
class FunQuailSession(requests.Session):
|
||||
|
|
@ -13,7 +13,7 @@ class FunQuailSession(requests.Session):
|
|||
|
||||
def get_user_agent():
|
||||
return "python-requests (funkwhale/{}; +{})".format(
|
||||
funquail_api.__version__, settings.FUNQUAIL_URL
|
||||
funkwhale_api.__version__, settings.FUNQUAIL_URL
|
||||
)
|
||||
|
||||
|
||||
|
|
@ -8,8 +8,8 @@ from django.db import transaction
|
|||
from django.dispatch import receiver
|
||||
from django.utils import timezone
|
||||
|
||||
from funquail_api.common import channels
|
||||
from funquail_api.taskapp import celery
|
||||
from funkwhale_api.common import channels
|
||||
from funkwhale_api.taskapp import celery
|
||||
|
||||
from . import models, serializers, session, signals
|
||||
|
||||
|
|
@ -155,7 +155,7 @@ def media_url(path):
|
|||
):
|
||||
return join_url(settings.MEDIA_URL, path)
|
||||
|
||||
from funquail_api.federation import utils as federation_utils
|
||||
from funkwhale_api.federation import utils as federation_utils
|
||||
|
||||
return federation_utils.full_url(path)
|
||||
|
||||
|
|
@ -16,11 +16,11 @@ from rest_framework import (
|
|||
from rest_framework.decorators import action
|
||||
|
||||
from config import plugins
|
||||
from funquail_api.common.serializers import (
|
||||
from funkwhale_api.common.serializers import (
|
||||
ErrorDetailSerializer,
|
||||
TextPreviewSerializer,
|
||||
)
|
||||
from funquail_api.users.oauth import permissions as oauth_permissions
|
||||
from funkwhale_api.users.oauth import permissions as oauth_permissions
|
||||
|
||||
from . import filters, models, mutations, serializers, signals, tasks, throttling, utils
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import funquail_api
|
||||
import funkwhale_api
|
||||
from config import plugins
|
||||
|
||||
from .client import ListenBrainzClient, Track
|
||||
|
|
@ -24,7 +24,7 @@ def get_track(track):
|
|||
album = None
|
||||
additional_info = {
|
||||
"media_player": "FunQuail",
|
||||
"media_player_version": funquail_api.__version__,
|
||||
"media_player_version": funkwhale_api.__version__,
|
||||
"submission_client": "FunQuail ListenBrainz plugin",
|
||||
"submission_client_version": PLUGIN["version"],
|
||||
"tracknumber": track.position,
|
||||
|
|
@ -4,7 +4,7 @@ PLUGIN = plugins.get_plugin_config(
|
|||
name="listenbrainz",
|
||||
label="ListenBrainz",
|
||||
description="A plugin that allows you to submit your listens to ListenBrainz.",
|
||||
homepage="https://funquail.laidback.moe/docs/users/builtinplugins.html#listenbrainz-plugin", # noqa
|
||||
homepage="https://funkwhale.laidback.moe/docs/users/builtinplugins.html#listenbrainz-plugin", # noqa
|
||||
version="0.3",
|
||||
user=True,
|
||||
conf=[
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue