feat: support external HLS sources with playlist management and player improvements#1530
Open
alexamirante wants to merge 33 commits into
Open
feat: support external HLS sources with playlist management and player improvements#1530alexamirante wants to merge 33 commits into
alexamirante wants to merge 33 commits into
Conversation
…ad, tags) to POST/PUT endpoints
…sses JSONParser in parser_classes conflicts with drf-yasg swagger generation when form parameters (IN_FORM) are declared. The multipart form-data parsing works fine with just MultiPartParser and FormParser, which are already present. Fixes 500 errors when accessing /swagger/ endpoint.
- Remove 'duration' from read_only_fields in MediaSerializer - In MediaList POST: accept 'duration' only when external_m3u8_url is also provided, restricted to managers/superusers - In MediaDetail PUT: accept 'duration' only when the media already has an external_hls_url, restricted to managers/superusers - Update swagger docs for both endpoints with duration parameter
…o 0019 Instead of a merge migration, renumber files/0015_media_external_hls_url to files/0019_media_external_hls_url with dependency on 0018_embedmediacourse, giving a clean linear migration graph.
Includes changes from main: - Align upload UI visibility with CAN_ADD_MEDIA permissions - Add configurable sidebar link visibility flags - Add contact link visibility setting - Gate My Playlists visibility by CAN_ADD_MEDIA
f915325 to
c521315
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds support for linking external HLS master playlist URLs as media
sources, without requiring a file upload. It also includes several improvements
to the media API, the upload/edit UX, and the video player.
New features
External HLS support
external_hls_urlURLField on theMediamodel (migration included)(
media_initis not called)hls_infoandoriginal_media_urldurationfor external HLS media via the APIPlaylist management via API
playlist_idsfield added to mediaPOST/PUTendpoints, allowing callersto assign a media item to one or more playlists in a single request
Media API improvements
POST/PUTendpoints now acceptenable_comments,allow_download, andtagsfieldsPUT)uploaded_posterdocumented in Swagger forPOSTJSONParserissues fixedPlayer fixes
Regressions fixed
Other
docker-compose.yaml: Admin credentials made configurable via environment variable(
ADMIN_USER,ADMIN_EMAIL,ADMIN_PASSWORD)__pycache__directories added to.gitignoreDatabase migrations
A new migration
0019_media_external_hls_urladds theexternal_hls_urlfield to the
files_mediatable. It depends on0018_embedmediacourseandfits cleanly into the linear migration graph.