Removed option to build index. Filebased sources should always have an index

This commit is contained in:
Christoph Stahl 2025-02-15 01:32:53 +01:00
parent c381133252
commit 8828733271
2 changed files with 3 additions and 3 deletions

View file

@ -17,7 +17,7 @@ except ImportError:
PYMEDIAINFO_AVAILABLE = False
from .source import Source
from ..config import BoolOption, ListStrOption, ConfigOption
from ..config import ListStrOption, ConfigOption
class FileBasedSource(Source):
@ -34,10 +34,10 @@ class FileBasedSource(Source):
"List of filename extensions\n(mp3+cdg, mp4, ...)",
["mp3+cdg"],
),
"build_index": ConfigOption(BoolOption(), "Build index on startup", True),
}
def apply_config(self, config: dict[str, Any]) -> None:
self.build_index = True
self.extensions: list[str] = config["extensions"] if "extensions" in config else ["mp3+cdg"]
self.extra_mpv_options = {"scale": "oversample"}

View file

@ -127,7 +127,7 @@ class Source(ABC):
self._index: list[str] = config["index"] if "index" in config else []
self.extra_mpv_options: dict[str, str] = {}
self._skip_next = False
self.build_index = config.get("build_index", False)
self.build_index = False
self.apply_config(config)
def is_valid(self, entry: Entry) -> bool: