This commit is contained in:
Marc Beninca 2025-03-18 23:41:04 +01:00
parent 49dd4728f6
commit e43409d40c
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -7,6 +7,7 @@ from typing import Any
from yt_dlp import YoutubeDL
from rwx import Object
from rwx.fs import read_file_dict
from rwx.log import stream as log
TIMESTAMP = "%Y%m%d%H%M%S"
@ -21,8 +22,14 @@ URL = "https://youtube.com"
class Cache(Object):
"""YouTube local cache."""
def __init__(self, root: Path) -> None:
self.root = root
def __init__(self, root_file: Path) -> None:
self.root_file = root_file.resolve()
self.root_directory = self.root_file.parent
self.load()
def load(self) -> None:
d = read_file_dict(self.root_file)
log.info(d)
class Channel(Object):