Comments (12)
Now we use a relational DBMS, the database scheme is changed.
My proposal:
playlistTable:
{
name: String,
description: String,
visibility: {
type: String,
enum: ['PUBLIC', 'PRIVATE']
},
createdAt: {
type: Date,
default: Date.now
},
updatedAt: {
type: Date,
default: Date.now
},
actorId -> references the actor that owns the playlist
}
playlistVideoTable:
{
// Position of the video in the playlist
position: {
type: Number,
default: 0
},
videoId -> references a video
playlistId -> references a playlist
}
from peertube.
I updated my comment to replace userId
by actorId
. An actor is a user or a channel.
from peertube.
Implemented in #1708
from peertube.
@6543 https://github.com/Chocobozzz/PeerTube/tree/feature/playlists
from peertube.
@rzr Pre-Release v1.3.0-rc.1
from peertube.
For the DB model, I would add a playlist visibility: public/private.
I like the reordering API of Spotify: https://developer.spotify.com/web-api/reorder-playlists-tracks/
My opinion:
- A playlist belongs to one user so I would prefix each route with
/users/userId/
. playlist
->playlists
to keep coherency- Add a video to the playlist throught the POST method and body parameters
- Suppress a video from the playlist throught the DELETE method and body parameters
- Rename a playlist is part of the modify playlist route
API route
get /accounts/:accountId/playlists/
→ get account playlistsget /video-channels/:videoChannelId/playlists/
→ get video channel playlists (to organize videos inside the channel)get /playlists/:id
→ get playlist information (+ number of videos)delete /playlists/:id
→ suppress a playlistget /playlists/:id/videos
→ get videos of the playlistpost /playlists/:id/videos
→ add video(s) to the playlistput /playlists/:id/videos
→ reorder playlistdelete /playlists/:id/videos/:id
→ delete video from the playlistput /playlists/:id
→ change playlist informations (name, visibility?)
Account playlists: just playlists that could be accessed and shared (if public)
Video channel playlists: playlists to organize videos inside a channel
Database schema
from peertube.
I would use PATCH
to reorder the playlists and change informations as it is it's definition:
The PATCH method applies partial modifications to a resource.
from peertube.
I was wondering about channel's playlist (or even playlists for videos like what is hacked here https://youtu.be/5NJSCRPeNpU?t=11m0s the annotation link bottom rigth of the video)
For this reason I suggest to replace userId
by something like ownerId
and ownerType
. It would make the playlist system very versatile at a very reasonnable cost (the GUI for it could come later but everything would be in place for it to work in the future)
from peertube.
works for me :)
from peertube.
Any progress at the moment?
from peertube.
Tanks for the great work!
from peertube.
is this feature released in any version ? Apparently not in current version:
https://github.com/Chocobozzz/PeerTube/releases/tag/v1.2.1
from peertube.
Related Issues (20)
- importing vids between 1080p => 2159p are reset to 1080p HOT 13
- Caption Option and quality option is not visible and not selectable. HOT 1
- Subscriber count varies depending on the instance HOT 1
- Downloaded video length not displaying correctly on Windows and Android HOT 1
- Comments to autoblocked videos listed publicly are being published on the fediverse, revealing a playable URL HOT 3
- Give plugins access to user object on the client
- registerSetting adds multiple settings when called multiple times with same setting name
- problems playing redundancies HOT 7
- So many updates? HOT 2
- Transcode Batch Action on failed transcoded videos does not work HOT 1
- Please, use SVG icons instead font icons HOT 1
- RTL UI inconsistency
- Peertube Embed Api addEventListener doesn't work in iphone, using safari or webview in app HOT 2
- Deleted comments are counted in the "In this instance federation" total HOT 1
- Import failed, text value too long for chapters HOT 1
- Object Storage: Google Cloud Storage Config issues HOT 2
- Error in installation documentation HOT 2
- downloading old videos don't work (error 404) json
- Batch delete failed runners job shows "unknown runner jobs" systematically HOT 1
- Video imported from channel sync accept description length beyond the max authorized
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from peertube.