Skip to content

Commit

Permalink
add more options to servicelist reload api
Browse files Browse the repository at this point in the history
  • Loading branch information
jbleyel committed Apr 9, 2024
1 parent c70d8d1 commit 9270f3c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## Version 2.1.1
* show lcn in bouquet editor
* add more options to servicelist reload api

## Version 2.1.0
* improve streamrelay
Expand Down
18 changes: 16 additions & 2 deletions plugin/controllers/models/servicelist.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##########################################################################
# OpenWebif: serviceslist
##########################################################################
# Copyright (C) 2011 - 2023 jbleyel and E2OpenPlugins
# Copyright (C) 2011 - 2024 jbleyel and E2OpenPlugins
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -41,6 +41,20 @@ def reloadServicesLists(mode):
elif mode == "4":
Components.ParentalControl.parentalControl.open()
msgs.append("parentalcontrol white-/blacklist")
elif mode == "5": # whitelist_streamrelay
try:
from Screens.InfoBarGenerics import streamrelay
streamrelay.reload()
msgs.append("whitelist_streamrelay")
except ImportError:
pass
elif mode == "6": # autocam
try:
from Screens.InfoBarGenerics import autocam
autocam.reload()
msgs.append("autocam")
except ImportError:
pass

if msgs:
return {
Expand All @@ -50,5 +64,5 @@ def reloadServicesLists(mode):
else:
return {
"result": False,
"message": "missing or wrong parameter mode [0 = lamedb and userbouqets, 1 = lamedb only, 2 = userbouqets only, 3 = transponders, 4 = parentalcontrol white/blacklist"
"message": "missing or wrong parameter mode [0 = lamedb and userbouqets, 1 = lamedb only, 2 = userbouqets only, 3 = transponders, 4 = parentalcontrol white/blacklist, 5 = whitelist_streamrelay, 6 = autocam"
}

0 comments on commit 9270f3c

Please sign in to comment.