Skip to content
Open
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
c65cd06
common: Replace os.system() mkdir with os.makedirs()
KAMI911 Mar 14, 2026
8074bee
common: Validate provider info field count before unpacking
KAMI911 Mar 14, 2026
899992d
common: Fix downloaded_bytes counter to track actual received bytes
KAMI911 Mar 14, 2026
d4e6206
common: Fix favorites file handling for first-run and missing directory
KAMI911 Mar 14, 2026
d758994
hypnotix: Remove credential-exposing data from log output
KAMI911 Mar 14, 2026
70770e6
hypnotix: Replace bare except clauses with except Exception
KAMI911 Mar 14, 2026
d5132e7
hypnotix: Fix update_ytdlp to use absolute paths instead of os.chdir()
KAMI911 Mar 14, 2026
5bdf013
hypnotix: Fix search debounce timer truncating float to zero
KAMI911 Mar 14, 2026
cf05cf8
hypnotix: Prevent crash in on_search when no provider is selected
KAMI911 Mar 14, 2026
f3f48e5
hypnotix: Escape provider name before inserting into Pango markup
KAMI911 Mar 14, 2026
2db42d2
hypnotix: Use context manager and read() for GPL license file
KAMI911 Mar 14, 2026
ddeee4b
hypnotix: Replace type() == dict with isinstance() checks
KAMI911 Mar 14, 2026
fdd4c14
xtream: Fix cache_path fallback never triggering (== vs =)
KAMI911 Mar 14, 2026
2da41aa
xtream: Fix always-true condition in Group stream type check
KAMI911 Mar 14, 2026
06bb03d
xtream: Move mutable class attributes to instance __init__
KAMI911 Mar 14, 2026
5e433b0
xtream: Fix UnboundLocalError when processing series streams
KAMI911 Mar 14, 2026
22845bd
xtream: Remove duplicate catch_all_group insertion in load_iptv
KAMI911 Mar 14, 2026
e732ce9
xtream: Use compiled regex.match() directly in search_stream
KAMI911 Mar 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
xtream: Use compiled regex.match() directly in search_stream
re.match(compiled_regex, string) re-enters the module to dispatch back
to the compiled pattern object.  Call regex.match(string) directly on
the compiled object to skip the redundant dispatch.

Also remove the dead 'if search_result is not None' guard: search_result
is always a list and therefore never None, so the condition was always
True and the inner block always executed.
  • Loading branch information
KAMI911 committed Mar 14, 2026
commit e732ce932e02cebf76dfcc4f0c46e1be10a237b7
11 changes: 5 additions & 6 deletions usr/lib/hypnotix/xtream.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,23 +351,22 @@ def search_stream(self, keyword: str, ignore_case: bool = True, return_type: str

print("Checking {} movies".format(len(self.movies)))
for stream in self.movies:
if re.match(regex, stream.name) is not None:
if regex.match(stream.name) is not None:
search_result.append(stream.export_json())

print("Checking {} channels".format(len(self.channels)))
for stream in self.channels:
if re.match(regex, stream.name) is not None:
if regex.match(stream.name) is not None:
search_result.append(stream.export_json())

print("Checking {} series".format(len(self.series)))
for stream in self.series:
if re.match(regex, stream.name) is not None:
if regex.match(stream.name) is not None:
search_result.append(stream.export_json())

if return_type == "JSON":
if search_result is not None:
print("Found {} results `{}`".format(len(search_result), keyword))
return json.dumps(search_result, ensure_ascii=False)
print("Found {} results `{}`".format(len(search_result), keyword))
return json.dumps(search_result, ensure_ascii=False)
else:
return search_result

Expand Down