mirror of
https://github.com/ovosimpatico/xtream2m3u.git
synced 2026-01-15 08:22:56 -03:00
Handle channels without a category
Some checks failed
Build and Push Docker Image / build-and-push (push) Has been cancelled
Some checks failed
Build and Push Docker Image / build-and-push (push) Has been cancelled
This commit is contained in:
3
run.py
3
run.py
@@ -81,7 +81,8 @@ def generate_m3u():
|
||||
m3u_playlist = "#EXTM3U\n"
|
||||
for channel in livechannelraw:
|
||||
if channel['stream_type'] == 'live':
|
||||
group_title = categoryname[channel["category_id"]]
|
||||
# Use a default category name if category_id is None
|
||||
group_title = categoryname.get(channel["category_id"], "Uncategorized")
|
||||
# Skip this channel if its group is in the unwanted list
|
||||
if not any(unwanted_group.lower() in group_title.lower() for unwanted_group in unwanted_groups):
|
||||
logo_url = channel.get('stream_icon', '')
|
||||
|
||||
Reference in New Issue
Block a user