toml
This commit is contained in:
parent
49dd4728f6
commit
e43409d40c
1 changed files with 9 additions and 2 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue