PATCH: Refactored underlying file system for streams, seperated vods, streams and thumbnails

This commit is contained in:
2025-02-12 01:29:54 +00:00
parent 1b167b60f1
commit 55fed8a778
7 changed files with 92 additions and 46 deletions

View File

@@ -0,0 +1,17 @@
# Description: This file contains the PathManager class which is responsible for managing the paths of the stream data.
class PathManager():
def get_vods_path(self, username):
return f"stream_data/{username}/vods"
def get_stream_path(self, username):
return f"stream_data/{username}/stream"
def get_thumbnail_path(self, username):
return f"stream_data/{username}/thumbnails"
def get_stream_file_path(self, username):
return f"{self.get_stream_path(username)}/index.m3u8"
def get_thumbnail_file_path(self, username):
return f"{self.get_thumbnail_path(username)}/stream.jpg"