Refactor: Add flexible video source options to Movie model
Co-authored-by: mathieumoran1 <[email protected]>
This commit is contained in:
co-authored by
mathieumoran1
parent
ae1f065000
commit
43925c3b60
+8
-1
@@ -9,7 +9,14 @@ const movieSchema = new mongoose.Schema({
|
||||
// Oscar pool year / edition (used to segment movies + stats)
|
||||
year: { type: Number, required: false, index: true },
|
||||
category: { type: String, required: true },
|
||||
vod_link: { type: String, required: true },
|
||||
// Legacy "one field" player source.
|
||||
// Kept for backwards-compat. New UI prefers video_src / embed_src.
|
||||
vod_link: { type: String, required: false },
|
||||
|
||||
// Player configuration (optional; used by player.html)
|
||||
player_mode: { type: String, required: false, enum: ["auto", "video", "embed"], default: "auto" },
|
||||
video_src: { type: String, required: false }, // direct video file URL or HLS (.m3u8)
|
||||
embed_src: { type: String, required: false }, // URL or iframe code
|
||||
watchedBy: [{ type: mongoose.Schema.Types.ObjectId, ref: 'User' }]
|
||||
}, { timestamps: true });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user