another dev log?
i decided to use fastapi static files to “send” the videos to the users,
now also each video and info about it is stored in a videos.json having its own id, title and file path,
an http GET is sent to the api, to fetch a video selected with random.choice, the json is loaded and then serves valuable info that JS uses to update the src of the video player, but also to update <p></p> for title displaying,
now also the whole server can be started from a single terminal so no need for 2 anymore. next up i think about implementing a system for liking/disliking videos, based on the reddit upvote/downvote system, so instead of two counters, there will be one. the little problem is still the videos/ folder being local which means, each user has to get their own .mp4 files but also update the videos.json with any new/updated info, i will look forward to making this system easier in the future
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.