This commit is contained in:
@@ -120,12 +120,18 @@ class CacheManager:
|
||||
self.invalidate_if_needed()
|
||||
current = get_channels_hash(self._channels_file)
|
||||
if current is None:
|
||||
logger.debug("EPG cache miss: channels.json not found or unreadable")
|
||||
return None
|
||||
epg_path = self._epg_cache_file()
|
||||
if not epg_path.exists():
|
||||
logger.debug("EPG cache miss: %s does not exist", epg_path)
|
||||
return None
|
||||
stored = self._get_stored_hash()
|
||||
if stored is None:
|
||||
logger.debug("EPG cache miss: %s does not exist (hash required)", self._hash_file())
|
||||
return None
|
||||
if stored != current:
|
||||
logger.debug("EPG cache miss: channels.json changed (hash %s -> %s)", stored[:16], current[:16])
|
||||
return None
|
||||
try:
|
||||
return epg_path.read_text(encoding="utf-8")
|
||||
|
||||
Reference in New Issue
Block a user