Skip to content

Commit

Permalink
Merge pull request #49 from krreet/feature/support-for-catchup
Browse files Browse the repository at this point in the history
OS-002 use external epg url from Mobassar4u
  • Loading branch information
krreet committed Mar 6, 2023
2 parents c847d13 + bc53b19 commit 04c6f26
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
10 changes: 5 additions & 5 deletions resources/lib/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,12 @@ def show_listby(plugin, by):
for each in CONFIG[by]:
tvImg = IMG_CONFIG[by].get(each, {}).get("tvImg", ""),
promoImg = IMG_CONFIG[by].get(each, {}).get("promoImg", "")
image = IMG_CONFIG[by].get(each, {}).get("image", tvImg),
yield Listitem.from_dict(**{
"label": each,
"art": {
"thumb": tvImg,
"icon": tvImg,
"fanart": promoImg,
"banner": image
"fanart": promoImg
},
"callback": Route.ref("/resources/lib/main:show_category"),
"params": {"categoryOrLang": each, "by": by}
Expand Down Expand Up @@ -475,7 +473,7 @@ def m3ugen(plugin, notify="yes"):
# get the epg for this channel
# }&begin={{Y}}{{m}}{{d}}T{{H}}{{M}}{{S}}&end={{Y}}{{m}}{{d}}T{{H}}{{M}}{{S}}

catchup = ' catchup="vod" catchup-source="{0}channel_id={1}&showtime={{H}}{{M}}{{S}}&srno={{Y}}{{m}}{{d}}&programId={{catchup-id}}" catchup-days="7"'.format(
catchup = ' catchup="vod" catchup-source="{0}channel_id={1}&showtime={{H}}{{M}}{{S}}&srno={{Y}}{{m}}{{d}}&programId={{catchup-id}}&begin={{Y}}{{m}}{{d}}T{{H}}{{M}}{{S}}&end={{Y}}{{m}}{{d}}T{{H}}{{M}}{{S}}" catchup-days="7"'.format(
PLAY_URL, channel.get("channel_id"))
m3ustr += M3U_CHANNEL.format(
tvg_id=channel.get("channel_id"),
Expand All @@ -499,7 +497,9 @@ def epg_setup(plugin):
Script.notify("Please wait", "Epg setup in progress")
with busy():
# Download EPG XML file
url = "https://cdn.jsdelivr.net/gh/mitthu786/tvepg/epg.xml.gz"
url = Settings.get_string("epgurl")
if not url:
url = "https://bit.ly/3kWSsl3"
payload = {}
headers = {}
response = requests.request("GET", url, headers=headers, data=payload)
Expand Down
1 change: 1 addition & 0 deletions resources/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<setting id="applyAllSettings0" type="action" label="Apply all settings" action="RunPlugin(plugin://plugin.video.jiotv/resources/lib/main/applyall/)" option="close"/>
</category>
<category label="Setup">
<setting label="EPG URL" type="text" id="epgurl" default="https://bit.ly/3kWSsl3"/>
<setting label="Setup EPG" type="action" id="epgsetup" action="RunPlugin(plugin://plugin.video.jiotv/resources/lib/main/epg_setup/)"/>
<setting label="Setup Simple IPTV PVR" type="action" id="pvrsetup" action="RunPlugin(plugin://plugin.video.jiotv/resources/lib/main/pvrsetup/)" option="close"/>
<setting id="m3ugen" type="bool" label="Generate Playlist On Startup" default="true"/>
Expand Down

0 comments on commit 04c6f26

Please sign in to comment.