From b5a5559f7ba4390e15e9777a81e0409f30b693c2 Mon Sep 17 00:00:00 2001 From: Lars Noack Date: Thu, 23 May 2024 18:05:18 +0200 Subject: [PATCH] feat: created layout for option --- music_kraken/download/__init__.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/music_kraken/download/__init__.py b/music_kraken/download/__init__.py index e9f0fd0..11b0f3b 100644 --- a/music_kraken/download/__init__.py +++ b/music_kraken/download/__init__.py @@ -445,3 +445,16 @@ class Page: def download_song_to_target(self, source: Source, target: Target, desc: str = None) -> DownloadResult: return DownloadResult() + +class Option: + """ + This could represent a data object, a string or a page. + """ + + def __init__(self, value: Any, text: Optional[str] = None, keys: Set[str] = None): + self.value = value + self.text = text or str(value) + + self.keys = keys or set() + self.keys.add(self.text) +