Wykres commitów

1125 Commity (938aa2c8f142cb35fe7180dd1df104fe9138be97)

Autor SHA1 Wiadomość Data
JocelynDelalande 938aa2c8f1 Remove constraint on LC_COLLATE and LC_CTYPE
Which will fail if the system does not contains this locale.
2018-06-08 23:09:46 +00:00
JocelynDelalande 7988363352 Fix wrong name in postgresql database 2018-06-08 23:06:05 +00:00
JocelynDelalande 7fec060040 Add missing dependency
Without that, starting from a debian « naked » system,  it will fail at the `pip install wheel` stage.
2018-06-08 22:39:31 +00:00
JocelynDelalande 3bfa19a509 Fix doc: rmdir -> rm -rf
rmdir will fail on that non-empty dir
2018-06-08 22:37:10 +00:00
Eliot Berriot 06a78336a4 Merge branch '291-makemigrations' into 'develop'
Resolve "Document that admins should never, never run makemigrations"

Closes #291

See merge request funkwhale/funkwhale!239
2018-06-07 11:24:54 +00:00
Eliot Berriot 7a2a363df1
Fix #291: Added multiple warnings in the documentation that you should never
run makemigrations yourself
2018-06-07 13:17:48 +02:00
Eliot Berriot fd32d24044 Merge branch 'fixApacheCovers' into 'develop'
XForwardedProto to https & covers granted

See merge request funkwhale/funkwhale!237
2018-06-07 09:02:34 +00:00
RenonDis c353d59d40 Updated changelog 2018-06-07 10:53:07 +02:00
RenonDis 25a0c0e69b XForwardedProto to https & covers granted 2018-06-07 10:15:31 +02:00
Eliot Berriot 0a7c719a46 Merge branch '287-import-size' into 'develop'
Resolve "Display bug in Activity"

Closes #287

See merge request funkwhale/funkwhale!236
2018-06-07 07:05:22 +00:00
Eliot Berriot 16718809f7
Fix #287: Display file size in human format during file upload 2018-06-07 09:02:02 +02:00
Eliot Berriot b6fc0051fa Merge branch '280-agpl3' into 'develop'
Resolve "Relicence Funkwhale to AGPL"

Closes #280

See merge request funkwhale/funkwhale!235
2018-06-07 06:58:32 +00:00
Eliot Berriot c7a0ce3736
Fix #280: AGPL-3 licence 🎉 2018-06-06 22:37:55 +02:00
Eliot Berriot ab43d6d078
Merge tag '0.14.1' into develop
0.14.1 (2018-06-06)
-------------------

Upgrade instructions are available at https://docs.funkwhale.audio/upgrading.html

Enhancements:

- Display server version in the footer (#270)
- fix_track_files will now update files with bad mimetype (and not only the one
  with no mimetype) (#273)
- Huge performance boost (~x5 to x7) during CLI import that queries MusicBrainz
  (#288)
- Removed alpha-state transcoding support (#271)

Bugfixes:

- Broken logging statement during import error (#274)
- Broken search bar on library home (#278)
- Do not crash when importing track with an artist that do not match the
  release artist (#237)
- Do not crash when tag contains multiple uuids with a / separator (#267)
- Ensure we do not store bad mimetypes (such as application/x-empty) (#266)
- Fix broken "play all" button that played only 25 tracks (#281)
- Fixed broken track download modal (overflow and wrong URL) (#239)
- Removed hardcoded size limit in file upload widget (#275)

Documentation:

- Added warning about _protected/music location in nginx configuration (#247)

Removed alpha-state transcoding (#271)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

A few months ago, a basic transcoding feature was implemented. Due to the way
this feature was designed, it was slow, CPU intensive on the server side,
and very tightly coupled to the reverse-proxy configuration, preventing
it to work Apache2, for instance. It was also not compatible with Subsonic clients.

Based on that, we're currently removing support for transcoding
**in its current state**. The work on a better designed transcoding feature
can be tracked in https://code.eliotberriot.com/funkwhale/funkwhale/issues/272.

You don't have to do anything on your side, but you may want to remove
the now obsolete configuration from your reverse proxy file (nginx only)::

    # Remove those blocks:

    # transcode cache
    proxy_cache_path /tmp/funkwhale-transcode levels=1:2 keys_zone=transcode:10m max_size=1g inactive=7d;

    # Transcoding logic and caching
    location = /transcode-auth {
        include /etc/nginx/funkwhale_proxy.conf;
        # needed so we can authenticate transcode requests, but still
        # cache the result
        internal;
        set $query '';
        # ensure we actually pass the jwt to the underlytin auth url
        if ($request_uri ~* "[^\?]+\?(.*)$") {
            set $query $1;
        }
        proxy_pass http://funkwhale-api/api/v1/trackfiles/viewable/?$query;
        proxy_pass_request_body off;
        proxy_set_header        Content-Length "";
    }

    location /api/v1/trackfiles/transcode/ {
        include /etc/nginx/funkwhale_proxy.conf;
        # this block deals with authenticating and caching transcoding
        # requests. Caching is heavily recommended as transcoding
        # is a CPU intensive process.
        auth_request /transcode-auth;
        if ($args ~ (.*)jwt=[^&]*(.*)) {
            set $cleaned_args $1$2;
        }
        proxy_cache_key "$scheme$request_method$host$uri$is_args$cleaned_args";
        proxy_cache transcode;
        proxy_cache_valid 200 7d;
        proxy_ignore_headers "Set-Cookie";
        proxy_hide_header "Set-Cookie";
        add_header X-Cache-Status $upstream_cache_status;
        proxy_pass   http://funkwhale-api;
    }
    # end of transcoding logic
2018-06-06 22:03:46 +02:00
Eliot Berriot 30eaa78ef9
Merge branch 'release/0.14.1' 2018-06-06 22:03:41 +02:00
Eliot Berriot 73785d451c
Version bump and changelog for 0.14.1 2018-06-06 22:03:36 +02:00
Eliot Berriot a4eda7efad Merge branch '288-cli-perf' into 'develop'
Resolve "Improve CLI import performance by removing duplicated MBID queries"

Closes #288 and #237

See merge request funkwhale/funkwhale!234
2018-06-06 19:50:13 +00:00
Eliot Berriot bbae4e323b
Fix #288: Huge performance boost during CLI import that queries MusicBrainz 2018-06-06 21:45:38 +02:00
Eliot Berriot 9d9676aa17
Fix #237: Do not crash when importing track with an artist that do not match the release artist 2018-06-06 21:41:38 +02:00
Eliot Berriot 33ae51fc91 Merge branch '274-logging' into 'develop'
Resolve "Broken logging formatting in import task"

Closes #274 and #278

See merge request funkwhale/funkwhale!233
2018-06-05 18:55:17 +00:00
Eliot Berriot b7295382e7
Fix #274: Broken logging statement during import error 2018-06-05 20:52:03 +02:00
Eliot Berriot 5f5cb2838e
Fix #278: Broken search bar on library home 2018-06-05 20:48:54 +02:00
Eliot Berriot 1a6492ffed Merge branch '247-nginx-warning' into 'develop'
Resolve "Add a warning about the _protected/music bloc in nginx configuration"

Closes #247

See merge request funkwhale/funkwhale!231
2018-06-05 18:38:49 +00:00
Eliot Berriot 589261a03f
Fix #247: Added warning about _protected/music location in nginx configuration 2018-06-05 20:13:02 +02:00
Eliot Berriot 08bca983a7 Merge branch '239-tracks-download' into 'develop'
Resolve "Favorites downloading not working"

Closes #239

See merge request funkwhale/funkwhale!228
2018-06-05 17:48:03 +00:00
Eliot Berriot 83bb68c1af Merge branch '267-split-slash' into 'develop'
Resolve "Split on / when tag fields contains multiple uuids"

Closes #267

See merge request funkwhale/funkwhale!230
2018-06-05 17:47:19 +00:00
Eliot Berriot 7c47348855
Fix #267: Do not crash when tag contains multiple uuids with a / separator 2018-06-05 19:44:00 +02:00
Eliot Berriot bbfc48e630 Merge branch '275-size-error-upload' into 'develop'
Resolve "Uploading a big file via the web up fail without sending anything (Size error)"

Closes #275 and #276

See merge request funkwhale/funkwhale!229
2018-06-05 17:38:08 +00:00
Eliot Berriot d0c7ff77f6
Fix #276: Removed hardcoded size limit in file upload widget 2018-06-05 19:32:50 +02:00
Eliot Berriot 08b6cf371a Merge branch '281-play-25' into 'develop'
Resolve "Play all limited to 25 tracks"

Closes #281

See merge request funkwhale/funkwhale!227
2018-06-05 17:31:19 +00:00
Eliot Berriot 17d5fa6924
Fixed #239: broken track download modal (overflow and wrong URL) 2018-06-05 19:25:38 +02:00
Eliot Berriot 7df783a700
Fix #281: broken "play all" button that played only 25 tracks 2018-06-05 19:11:44 +02:00
Eliot Berriot a16bd2a409 Merge branch '273-fix-mimetypes' into 'develop'
Resolve "Update file_track_files command to handle bad mimetypes"

Closes #273

See merge request funkwhale/funkwhale!226
2018-06-03 17:00:54 +00:00
Eliot Berriot 18ad6cfa78
Fix #273: fix_track_files will now update files with bad mimetype 2018-06-03 18:57:35 +02:00
Eliot Berriot 1098f1b9e8 Merge branch '271-remove-transcoding' into 'develop'
Resolve "Remove transcoding"

Closes #271

See merge request funkwhale/funkwhale!225
2018-06-03 16:37:00 +00:00
Eliot Berriot 36a0a4df4f
Removed transcoding support (#271) 2018-06-03 18:33:28 +02:00
Eliot Berriot 390dcfd06f Merge branch '266-application-empty' into 'develop'
Resolve "Ogg files end up with a application/x-empty mimetype on import"

Closes #266

See merge request funkwhale/funkwhale!224
2018-06-03 16:11:51 +00:00
Eliot Berriot 5afc3e4637
Fix #266: Ensure we do not store bad mimetypes 2018-06-03 18:07:59 +02:00
Eliot Berriot f33dfdad9d Merge branch '270-version-number' into 'develop'
Resolve "Show the version number in the interface (in the footer?)"

Closes #270

See merge request funkwhale/funkwhale!223
2018-06-03 16:05:25 +00:00
Eliot Berriot f51c33615c
Fix #270: display server version in the footer 2018-06-03 18:01:42 +02:00
Eliot Berriot a00a6162c0
Merge tag '0.14' into develop
0.14 (2018-06-02)
-----------------

Upgrade instructions are available at
  https://docs.funkwhale.audio/upgrading.html

Features:

- Admins can now configure default permissions that will be granted to all
  registered users (#236)
- Files management interface for users with "library" permission (#223)
- New action table component for quick and efficient batch actions (#228) This
  is implemented on the federated tracks pages, but will be included in other
  pages as well depending on the feedback.

Enhancements:

- Added a new "upload" permission that allows user to launch import and view
  their own imports (#230)
- Added Support for OggTheora in import.
- Autoremove media files on model instance deletion (#241)
- Can now import a whole remote library at once thanks to new Action Table
  component (#164)
- Can now use album covers from flac/mp3 metadata and separate file in track
  directory (#219)
- Implemented getCovertArt in Subsonic API to serve album covers (#258)
- Implemented scrobble endpoint of subsonic API, listenings are now tracked
  correctly from third party apps that use this endpoint (#260)
- Retructured music API to increase performance and remove useless endpoints
  (#224)

Bugfixes:

- Consistent constraints/checks for URL size (#207)
- Display proper total number of tracks on radio detail (#225)
- Do not crash on flac import if musicbrainz tags are missing (#214)
- Empty save button in radio builder (#226)
- Ensure anonymous users can use the app if the instance is configured
  accordingly (#229)
- Ensure inactive users cannot get auth tokens (#218) This was already the case
  bug we missed some checks
- File-upload import now supports Flac files (#213)
- File-upload importer should now work properly, assuming files are tagged
  (#106)
- Fixed a few broken translations strings (#227)
- Fixed broken ordering in front-end lists (#179)
- Fixed ignored page_size paremeter on artist and favorites list (#240)
- Read ID3Tag Tracknumber from TRCK (#220)
- We now fetch album covers regardless of the import methods (#231)

Documentation:

- Added missing subsonic configuration block in deployment vhost files (#249)
- Moved upgrade doc under install doc in TOC (#251)

Other:

- Removed acoustid support, as the integration was buggy and error-prone (#106)

Files management interface
^^^^^^^^^^^^^^^^^^^^^^^^^^

This is the first bit of an ongoing work that will span several releases, to
bring more powerful library management features to Funkwhale. This iteration
includes a basic file management interface where users with the "library"
permission can list and search available files, order them using
various criterias (size, bitrate, duration...) and delete them.

New "upload" permission
^^^^^^^^^^^^^^^^^^^^^^^

This new permission is helpful if you want to give upload/import rights
to some users, but don't want them to be able to manage the library as a whole:
although there are no controls yet for managing library in the fron-end,
subsequent release will introduce management interfaces for artists, files,
etc.

Because of that, users with the "library" permission will have much more power,
and will also be able to remove content from the platform. On the other hand,
users with the "upload" permission will only have the ability to add new
content.

Also, this release also includes a new feature called "default permissions":
those are permissions that are granted to every users on the platform.
On public/open instances, this will play well with the "upload" permission
since everyone will be able to contribute to the instance library without
an admin giving the permission to every single user.

Smarter album cover importer
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

In earlier versions, covers where only imported when launching a YouTube import.
Starting from this release, covers will be imported regardless of the import mode
(file upload, youtube-dl, CLI, in-place...). Funkwhale will look for covers
in the following order:

1. In the imported file itself (FLAC/MP3 only)
2. In a cover.jpg or cover.png in the file directory
3. By fetching cover art from Musibrainz, assuming the file is tagged correctly

This will only work for newly imported tracks and albums though. In the future,
we may offer an option to refetch album covers from the interface, but in the
meantime, you can use the following snippet:

.. code-block:: python

    # Store this in /tmp/update_albums.py
    from funkwhale_api.music.models import Album, TrackFile
    from funkwhale_api.music.tasks import update_album_cover

    albums_without_covers = Album.objects.filter(cover='')
    total = albums_without_covers.count()
    print('Found {} albums without cover'.format(total))
    for i, album in enumerate(albums_without_covers.iterator()):
        print('[{}/{}] Fetching cover for {}...'.format(i+1, total, album.title))
        f = TrackFile.objects.filter(track__album=album).filter(source__startswith='file://').first()
        update_album_cover(album, track_file=f)

Then launch it::

    # docker setups
    cat /tmp/update_albums.py | docker-compose run --rm api python manage.py shell -i python

    # non-docker setups
    source /srv/funkwhale/load_env
    source /srv/funkwhale/virtualenv/bin/activate
    cat /tmp/update_albums.py | python manage.py shell -i python

    # cleanup
    rm /tmp/update_albums.py

.. note::

    Depending on your number of albums, the previous snippet may take some time
    to execute. You can interrupt it at any time using ctrl-c and relaunch it later,
    as it's idempotent.

Music API changes
^^^^^^^^^^^^^^^^^

This release includes an API break. Even though the API is advertised
as unstable, and not documented, here is a brief explanation of the change in
case you are using the API in a client or in a script. Summary of the changes:

- ``/api/v1/artists`` does not includes a list of tracks anymore. It was to heavy
  to return all of this data all the time. You can get all tracks for an
  artist using ``/api/v1/tracks?artist=artist_id``
- Additionally, ``/api/v1/tracks`` now support an ``album`` filter to filter
  tracks matching an album
- ``/api/v1/artists/search``, ``/api/v1/albums/search`` and ``/api/v1/tracks/search``
  endpoints are removed. Use ``/api/v1/{artists|albums|tracks}/?q=yourquery``
  instead. It's also more powerful, since you can combine search with other
  filters and ordering options.
- ``/api/v1/requests/import-requests/search`` endpoint is removed as well.
  Use ``/api/v1/requests/import-requests/?q=yourquery``
  instead. It's also more powerful, since you can combine search with other
  filters and ordering options.

Of course, the front-end was updated to work with the new API, so this should
not impact end-users in any way, apart from slight performance gains.

.. note::

    The API is still not stable and may evolve again in the future. API freeze
    will come at a later point.

Flac files imports via upload
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

You have nothing to do to benefit from this, however, since Flac files
tend to be a lot bigger than other files, you may want to increase the
``client_max_body_size`` value in your Nginx configuration if you plan
to upload flac files.

Missing subsonic configuration bloc in vhost files
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Because of a missing bloc in the sample Nginx and Apache configurations,
instances that were deployed after the 0.13 release are likely to be unable
to answer to Subsonic clients (the missing bits were properly documented
in the changelog).

Ensure you have the following snippets in your Nginx or Apache configuration
if you plan to use the Subsonic API.

Nginx::

    location /rest/ {
        include /etc/nginx/funkwhale_proxy.conf;
        proxy_pass   http://funkwhale-api/api/subsonic/rest/;
    }

Apache2::

    <Location "/rest">
        ProxyPass ${funkwhale-api}/api/subsonic/rest
        ProxyPassReverse ${funkwhale-api}/api/subsonic/rest
     </Location>
2018-06-02 18:11:39 +02:00
Eliot Berriot 7d6e6c6a8e
Merge branch 'release/0.14' 2018-06-02 18:11:22 +02:00
Eliot Berriot 73bde2fc9e
Version bump and changelog for 0.14 2018-06-02 18:11:15 +02:00
Eliot Berriot 87edc6ee38 Merge branch '231-cover-import' into 'develop'
Resolve "No cover on import"

Closes #231 and #219

See merge request funkwhale/funkwhale!222
2018-06-02 15:41:19 +00:00
Eliot Berriot 290cae9a8f
Fix #231 and #219: ensure we import covers regarless of the import method
Can now import covers from track metadata and track directory as well
2018-06-02 17:34:46 +02:00
Eliot Berriot 14c8073e26
Ensure we can serve images securely locally 2018-06-02 09:17:32 +02:00
Eliot Berriot 5ebaa884c1
Send proper activity when listening is created through subsonic API 2018-06-02 00:11:31 +02:00
Eliot Berriot 98c7cb6f05 Merge branch '260-subsonic-scrobble' into 'develop'
Resolve "Implement the scrobble API of subsonic"

Closes #260

See merge request funkwhale/funkwhale!221
2018-06-01 22:03:24 +00:00
Eliot Berriot 0f792bf75c
Fix #260: Implemented scrobble endpoint of subsonic API 2018-06-01 23:59:08 +02:00
Eliot Berriot 9ee0f09ff4 Merge branch '258-subsonic-covers' into 'develop'
Resolve "Include album covers in subsonic API"

Closes #258

See merge request funkwhale/funkwhale!220
2018-06-01 20:55:46 +00:00