funkwhale merge requestshttps://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests2019-10-15T13:46:49Zhttps://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/921API support for restricting results by scope2019-10-15T13:46:49ZAgateAPI support for restricting results by scopeSee #594: added support for filtering API results (tracks, albums, artists, uploads, playlists, radios, listenings and favorites) by scope, e.g:
- `GET /api/v1/artists/?scope=me`: list all artists available in my libraries
- `GET /api/v...See #594: added support for filtering API results (tracks, albums, artists, uploads, playlists, radios, listenings and favorites) by scope, e.g:
- `GET /api/v1/artists/?scope=me`: list all artists available in my libraries
- `GET /api/v1/albums/?scope=all`: list all albums (equivalent to omitting the scope parameter)
The `scope=me` parameter will be used to allow creating a UI to browse personal content, as part of #594. In the future, we me also allow `scope=user@domain` for browsing a specific user public content, or `scope=followed` to browse content from followed people.
(There is also an unrelated commit to enable MusicBrainz ID filtering on artists/albums/tracks endpoints)
cc @funkwhale/reviewers-python0.21https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/923Resolve "Redesign the sidebar/navigation to simplify the UI"2020-07-25T03:03:27ZAgateResolve "Redesign the sidebar/navigation to simplify the UI"Closes #594
Cf https://governance.funkwhale.audio/d/m9LlGf4T/redesign-of-the-sidebar-navigation:
- [x] Revamped navigation (no more fixed bar when browsing library)
- [x] Split between personal/public stuff
- [x] Narrower sideba...Closes #594
Cf https://governance.funkwhale.audio/d/m9LlGf4T/redesign-of-the-sidebar-navigation:
- [x] Revamped navigation (no more fixed bar when browsing library)
- [x] Split between personal/public stuff
- [x] Narrower sidebar
- [x] Dedicated player/queue mode (also cf #703)
- [x] Bottom attached player
## Demo
- Test live at http://funkwhale.pages.funkwhale.audio/-/funkwhale/-/jobs/38563/artifacts/front-review/index.html
![Peek_2019-12-22_16-56](/uploads/2faf256eb191103b6ae1dac667cd13f4/Peek_2019-12-22_16-56.mp4)
0.21https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/933Resolve ""Recent" columns on front page no longer display any results"2019-10-16T12:26:50ZCiarán Ainsworthsporiff@funkwhale.audioResolve ""Recent" columns on front page no longer display any results"Closes #948
Recent changes to scopes in the API broke the home page. This change modifies the scope from `user` to `all` to bring back the correct results.
### Before
![Screenshot_2019-10-16_at_12.29.27](/uploads/0bcc83553ac774...Closes #948
Recent changes to scopes in the API broke the home page. This change modifies the scope from `user` to `all` to bring back the correct results.
### Before
![Screenshot_2019-10-16_at_12.29.27](/uploads/0bcc83553ac77405288ca76561c0d3c5/Screenshot_2019-10-16_at_12.29.27.png)
### After
![Screenshot_2019-10-16_at_13.06.50](/uploads/d118488d36eec126efd7617b87716f11/Screenshot_2019-10-16_at_13.06.50.png)
(No judging my music taste please)0.21Ciarán Ainsworthsporiff@funkwhale.audioCiarán Ainsworthsporiff@funkwhale.audiohttps://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/943Subsonic compat2019-10-28T07:56:53ZAgateSubsonic compatAs part of https://github.com/fangfufu/httpdirfs/issues/45, we've identified several issues that prevent `httpdirfs` to work with Funkwhale servers.
This MR should fix all of them:
- [x] Ensure date are formatted as per the subson...As part of https://github.com/fangfufu/httpdirfs/issues/45, we've identified several issues that prevent `httpdirfs` to work with Funkwhale servers.
This MR should fix all of them:
- [x] Ensure date are formatted as per the subsonic API documentation
- [x] Ensure we include a path in our `song` objects
- [x] Fix an unrelated crash when retrieving `getUser`
cc @funkwhale/reviewers-python0.21https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/944Channels [models, API]2019-11-25T08:49:51ZAgateChannels [models, API]See #170:
- [x] Model/database layer to represent channels: a channel a database entry linking to:
- An artist
- An actor (to broadcast activities on federation)
- An owner (the account who owns the channel, expressed in the ...See #170:
- [x] Model/database layer to represent channels: a channel a database entry linking to:
- An artist
- An actor (to broadcast activities on federation)
- An owner (the account who owns the channel, expressed in the `attributed_to` field)
- A library (to store the channel uploads)
- [x] CRUD API to manage channels
- [x] Django admin module
- [x] Feature flag to disable channels
- [x] Exclude channels-related tracks, albums and artists by default on existing endpoints to preserve backward compatibility
Ready for review @funkwhale/reviewers-python0.21https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/951Attachments2019-11-25T16:42:39ZAgateAttachmentsThis MR is a rework of the way we handle non-audio files (like user avatar and album covers), to scale better and support more advanced use cases (e.g suggest a new cover for an album, or add banners for artist profiles). This is a hard ...This MR is a rework of the way we handle non-audio files (like user avatar and album covers), to scale better and support more advanced use cases (e.g suggest a new cover for an album, or add banners for artist profiles). This is a hard requirement for #170 and #588.
Basically, we now have a dedicated `attachment` table, which can be referenced whenever we need to associate one or more images to an object. Although currently restricted to images, the table could other type of files if we need it.
Todo:
- [x] New attachment table
- [x] API endpoints:
- [x] Create attachment
- [x] On the fly fetching of remote attachments
- [x] Destroy attachment
- [x] Documentation
- [x] Use attachment table for album covers (instead of a field on the album table)
- [x] Update import code to create attachments
- [x] Expose attachment in the API / federation
- [x] Data migration to convert existing covers to the new system
- [x] Manual testing (to ensure we're backward compatible):
- [x] Subsonic
- [x] Open Graph / Oembed
- [x] Remote / federation
- [x] Performance (n+1 queries, etc.)
Review is recommended commit-by-commit (I've been extra careful to keep a clean history, given the size of the work)0.21https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/954Server CLI: user management2019-11-25T08:45:55ZAgateServer CLI: user managementit was asked recently via https://monsterpit.net/@multiple_creatures/103134500987250281, and it was due anyway to make automation easier, so I took the morning to work on this.
This makes a new `python.manage.py fw` command namespace ...it was asked recently via https://monsterpit.net/@multiple_creatures/103134500987250281, and it was due anyway to make automation easier, so I took the morning to work on this.
This makes a new `python.manage.py fw` command namespace available on the server. I've used `click` as the CLI library, because it's really easy to use and allow quite complex operations (like having command namespaces or reading option values from env vars). Whitin this namespace, 3 commands are available:
- [x] `python manage.py fw users create`: create a user (and not only an admin users, as `python manage.py createsuperuser does`)
- [x] `python manage.py fw users set`: update attributes such as password, permissions, active status or upload quota on one or more users
- [x] `python manage.py fw users rm`: remove one or more user accounts
The MR also includes:
- [x] Tests
- [x] [Documentation](http://funkwhale.pages.funkwhale.audio/-/funkwhale/-/jobs/35192/artifacts/docs-review/admin/commands.html#user-management)
cc @funkwhale/reviewers-python @funkwhale/reviewers-sysadmin @Sporiff (for docs)0.21https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/955Fix #966: More robust importer against malformed dates2019-11-25T08:46:16ZAgateFix #966: More robust importer against malformed datesCloses #966
cc @funkwhale/reviewers-pythonCloses #966
cc @funkwhale/reviewers-python0.21https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/956Resolve "Adding cover art to my albums"2019-11-27T11:26:14ZAgateResolve "Adding cover art to my albums"Closes #588
This leverages !951 and implement the API/front-end to update cover art on albums:
- [x] Backend logic to support suggesting a new album cover (a.k.a mutations)
- [x] Front-end logic to suggest new cover
- [x] Handle cover...Closes #588
This leverages !951 and implement the API/front-end to update cover art on albums:
- [x] Backend logic to support suggesting a new album cover (a.k.a mutations)
- [x] Front-end logic to suggest new cover
- [x] Handle cover update over federation
cc @funkwhale/reviewers-python
## Demo
![album-cover-update](/uploads/4eee260fb0ea7eb8b2759d3ca80fd224/album-cover-update.mp4)0.21https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/957New radios: play your own content, or a given library2019-11-27T14:28:23ZAgateNew radios: play your own content, or a given libraryThis MR adds two new radios:
- [x] Play your own content (any track in one of your libraries)
- [x] Play tracks from a given library (yours or one you can access)
@funkwhale/reviewers-python, @funkwhale/reviewers-front
## Demo
![Peek...This MR adds two new radios:
- [x] Play your own content (any track in one of your libraries)
- [x] Play tracks from a given library (yours or one you can access)
@funkwhale/reviewers-python, @funkwhale/reviewers-front
## Demo
![Peek_2019-11-26_12-01](/uploads/39024c114f250ed731917c38c0388335/Peek_2019-11-26_12-01.mp4)0.21https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/958See #170: updates to upload API to support channels publishing2019-12-04T08:55:09ZAgateSee #170: updates to upload API to support channels publishingSee #170 and also cf https://mastodon.eliotberriot.com/@eliotberriot/103204268225895127
One current blocking point for channels is that we don't have the necessary APIs to provide a decent audio publication experience.
E.g you cann...See #170 and also cf https://mastodon.eliotberriot.com/@eliotberriot/103204268225895127
One current blocking point for channels is that we don't have the necessary APIs to provide a decent audio publication experience.
E.g you cannot upload a file, edit the metadata, then come back at it two days later, add some tags, and hit publish.
First of all, there is no current way to tell Funkwhale "please don't use audio tags embedded in the files to infer metadata, use this values as title, artist and album instead". More, currently, once uploaded, a track is picked up immediatly and published.
This MR deals with that by:
- [x] Adding a new `draft` option for the `import_status` column on the `upload` table so that API clients can prevent an upload to be processed by the workers (this field can be specified during API calls to `POST /api/v1/uploads`)
- [x] Support `PATCH` requests on `/api/v1/uploads/<uuid>` (only for draft uploads) so that API clients can update audio metadata, audio file, change the library to publish the upload in, etc. Once the client is done, this endpoint can be called with `{import_status: pending}` to freeze the record and trigger processing from the server
- [x] Add a new `GET /api/v1/uploads/<uuid>/audio-file-metadata` endpoint to retrive ID3 / embedded tags from the audio file itself (one use will be to prefill fields in the channel publishing form)
- [x] Support for specifying `{import_metadata: {…}}` when creating or patching an upload, to bypass entirely the use of file tags (typical use will be to allow uploads and publication for untagged files)
API documentation was updated to reflect the change.
ready for review, @funkwhale/reviewers-python0.21https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/959Make media and static files serving more reliable when reverse proxy...2019-11-27T14:10:25ZAgateMake media and static files serving more reliable when reverse proxy...Make media and static files serving more reliable when reverse proxy X_FORWARDED_* headers are incorrect.
It's one of the most common issue, cf https://governance.funkwhale.audio/d/jtavw8gh/set-up-on-headless-server-with-docker/3 for ...Make media and static files serving more reliable when reverse proxy X_FORWARDED_* headers are incorrect.
It's one of the most common issue, cf https://governance.funkwhale.audio/d/jtavw8gh/set-up-on-headless-server-with-docker/3 for instance, and it occurs when `X-Forwarded-Proto` and `X-Forwarded-Host` headers are set incorrectly, which is really easy to when you have multiple proxies nested together.
The root cause of the issue is that `MEDIA_URL` is traditionally a relative path, and that Django concatenates this path to the host from the request headers. When those headers are not set correctly at the reverse-proxy level, you typically end up with urls such as `http://127.0.0.1/media/` instead of `https://yourdomain/media`.
This MR bypass this Django behaviour entirely, by setting by default an absolute URL for `MEDIA_URL` using `{FUNKWHALE_URL}/media/`.
cc @funkwhale/reviewers-sysadmin @funkwhale/reviewers-python
Fix #947: and possibly other issues0.21https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/961Fix #976: fix cover attachment migration under S32019-11-27T17:24:43ZAgateFix #976: fix cover attachment migration under S3This should fix the issue @Sporiff, would you mind trying it on your pod (basically replace the content of the migration file with the content from this MR and try to `python manage.py migrate`?
If this work, then we can merge :)This should fix the issue @Sporiff, would you mind trying it on your pod (basically replace the content of the migration file with the content from this MR and try to `python manage.py migrate`?
If this work, then we can merge :)0.21https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/965Resolve "Browser keyboard shortcuts do not work on some pages"2019-12-04T08:49:58ZCiarán Ainsworthsporiff@funkwhale.audioResolve "Browser keyboard shortcuts do not work on some pages"The `prevent` element of the `@keydown` operations for player shortcuts interrupts the default browser action. To fix this, we can either remove the `prevent` from the function or replace the `@keydown` with `@keyup` or `@keypress`. This...The `prevent` element of the `@keydown` operations for player shortcuts interrupts the default browser action. To fix this, we can either remove the `prevent` from the function or replace the `@keydown` with `@keyup` or `@keypress`. This MR uses the former method, which allows both bespoke FW shortcuts to work as well as built-in browser functions such as `ctrl+f` and `ctrl+l`.
This fixes interruptions to the following shortcuts:
* `ctrl+f` for find
* `ctrl+l` for URL bar focus
* `ctrl+s` for save page as HTML
* `ctrl+q` for closing tabs/pages on certain browsers/operating systems
Closes #340
Closes #985 0.21Ciarán Ainsworthsporiff@funkwhale.audioCiarán Ainsworthsporiff@funkwhale.audiohttps://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/969See #170: federation for channels2019-12-09T12:59:57ZAgateSee #170: federation for channelsSee #170
Implement various federation related endpoints and logic to ensure seamless communication with other platforms (such as Mastodon):
- [x] Expose JSON-LD when fetching `/browse/tracks/<id>` with proper `rel=alternate` link ...See #170
Implement various federation related endpoints and logic to ensure seamless communication with other platforms (such as Mastodon):
- [x] Expose JSON-LD when fetching `/browse/tracks/<id>` with proper `rel=alternate` link to allow easy sharing/search
- [x] Fix #961
- [x] Fix minor compat issues
- [x] Broadcast upload to channel followers
0.21https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/970Resolve "Skipped upload increased count on playlist"2019-12-11T10:06:33ZAgateResolve "Skipped upload increased count on playlist"Closes #986Closes #9860.21https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/971Fix #982: Removed "nodeinfo disabled" setting, as nodeinfo is required for th...2019-12-17T13:25:36ZAgateFix #982: Removed "nodeinfo disabled" setting, as nodeinfo is required for the UI to workCloses #982Closes #9820.21https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/972Update favorite count templates2019-12-16T08:53:06ZNoé GaumontUpdate favorite count templatesCloses #888
Hi,
I manually updated each locale and I'm not sure of the results for the following locales:
- ar
- cs
- eo
- hs
- nb_NO
- pl
- ru
They either have several variants on plural and/or use a word instead of "1".Closes #888
Hi,
I manually updated each locale and I'm not sure of the results for the following locales:
- ar
- cs
- eo
- hs
- nb_NO
- pl
- ru
They either have several variants on plural and/or use a word instead of "1".0.21https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/975Resolve "Switch to proper full-text-search system"2019-12-18T13:58:50ZAgateResolve "Switch to proper full-text-search system"Closes #994
I initially pushed on develop by mistake so I had to revert then rerevert…
Anyway, this leveragaes django and PostgreSQL Full-Text-Search capabilities (https://docs.djangoproject.com/en/3.0/ref/contrib/postgres/search/#...Closes #994
I initially pushed on develop by mistake so I had to revert then rerevert…
Anyway, this leveragaes django and PostgreSQL Full-Text-Search capabilities (https://docs.djangoproject.com/en/3.0/ref/contrib/postgres/search/#searchvectorfield):
1. Add a new `body_text` column on artists, albums, and tracks, with a `tsvector` type
2. Populate this field with adequate data from the corresponding objects (title for tracks and albums, name for artists)
3. Use this new field for our search (instead of the `%LIKE%` queries spanning multiple fields we had before
4. Enjoy the performance improvements (between x2 and x5 in terms of speed during my local tests, possibly even higher on more modest hardware or bigger databases).
I also add to add database triggers on Postgresql to ensure the `body_text` field is synchronized properly whenever an object is updated.
Sidenote: I've included some new tests for the search endpoint (it wasn't covered), and a feature flag to ensure we can revert back to the old logic in case anything goes wrong.
0.21https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/976Resolve "Switch to proper full-text-search system"2019-12-18T14:09:00ZAgateResolve "Switch to proper full-text-search system"See #994
Improvements after !975:
- disable postgresql stop word feature (so that searching for artists named "she" or "his" work)
- improved error handling on client side with invalid querySee #994
Improvements after !975:
- disable postgresql stop word feature (so that searching for artists named "she" or "his" work)
- improved error handling on client side with invalid query0.21