@@ -247,11 +247,11 @@ def show_epg(plugin, day, channel_id):
247247 },
248248 "params" : {
249249 "channel_id" : each .get ("channel_id" ),
250- "showtime" : None if islive else each .get ("showtime" , "" ).replace (":" , "" ),
251- "srno" : None if islive else datetime .fromtimestamp (int (each .get ("startEpoch" , 0 )* .001 )).strftime ('%Y%m%d' ),
252- "programId" : None if islive else each .get ("srno" , "" ),
253- "begin" : None if islive else datetime .utcfromtimestamp (int (each .get ("startEpoch" , 0 )* .001 )).strftime ('%Y%m%dT%H%M%S' ),
254- "end" : None if islive else datetime .utcfromtimestamp (int (each .get ("endEpoch" , 0 )* .001 )).strftime ('%Y%m%dT%H%M%S' )
250+ "showtime" : each .get ("showtime" , "" ).replace (":" , "" ),
251+ "srno" : datetime .fromtimestamp (int (each .get ("startEpoch" , 0 )* .001 )).strftime ('%Y%m%d' ),
252+ "programId" : each .get ("srno" , "" ),
253+ "begin" : datetime .utcfromtimestamp (int (each .get ("startEpoch" , 0 )* .001 )).strftime ('%Y%m%dT%H%M%S' ),
254+ "end" : datetime .utcfromtimestamp (int (each .get ("endEpoch" , 0 )* .001 )).strftime ('%Y%m%dT%H%M%S' )
255255 }
256256 })
257257 if int (day ) == 0 :
@@ -453,15 +453,11 @@ def logout(plugin):
453453# M3u Generate `route`
454454@Script .register
455455def m3ugen (plugin , notify = "yes" ):
456- pDialog = DialogProgress ()
457- pDialog .create ('Generating M3U' )
458- pDialog .update (20 )
459456 channels = urlquick .get (CHANNELS_SRC ).json ().get ("result" )
460457 r = urlquick .get (DICTIONARY_URL ).text .encode ('utf8' )[3 :].decode ('utf8' )
461458 dictionary = json .loads (r )
462459 GENRE_MAP = dictionary .get ("channelCategoryMapping" )
463460 LANG_MAP = dictionary .get ("languageIdMapping" )
464- pDialog .update (50 )
465461
466462 m3ustr = "#EXTM3U x-tvg-url=\" %s\" " % EPG_SRC
467463 for i , channel in enumerate (channels ):
@@ -496,8 +492,6 @@ def m3ugen(plugin, notify="yes"):
496492 )
497493 with open (M3U_SRC , "w+" ) as f :
498494 f .write (m3ustr .replace (u'\xa0 ' , ' ' ).encode ('utf-8' ).decode ('utf-8' ))
499- pDialog .update (100 )
500- pDialog .close ()
501495 if notify == "yes" :
502496 Script .notify (
503497 "JioTV" , "Playlist updated." )
@@ -535,8 +529,8 @@ def epg_setup(plugin):
535529 # for channel in root.iterfind("channel"):
536530 # root.remove(channel)
537531 pDialog .update (35 )
538- # Example: Modify the program and add catchupid
539- # for channel in source_root.iterfind('channel'):
532+ # Example: Modify the program and add catchupid
533+ # for channel in source_root.iterfind('channel'):
540534 # new_channel = ET.Element(channel.tag, channel.attrib)
541535 # for child in channel:
542536 # new_child = ET.Element(child.tag, child.attrib)
@@ -576,14 +570,15 @@ def pvrsetup(plugin):
576570 executebuiltin (
577571 "RunPlugin(plugin://plugin.video.jiotv/resources/lib/main/m3ugen/)" )
578572 IDdoADDON = 'pvr.iptvsimple'
573+
579574 def set_setting (id , value ):
580575 if Addon (IDdoADDON ).getSetting (id ) != value :
581576 Addon (IDdoADDON ).setSetting (id , value )
582577 if check_addon (IDdoADDON ):
583578 set_setting ("m3uPathType" , "0" )
584579 set_setting ("m3uPath" , M3U_SRC )
585- set_setting ("epgPathType" , "0 " )
586- set_setting ("epgPath " , EPG_PATH )
580+ set_setting ("epgPathType" , "1 " )
581+ set_setting ("epgUrl " , EPG_SRC )
587582 set_setting ("catchupEnabled" , "true" )
588583 set_setting ("catchupWatchEpgBeginBufferMins" , "0" )
589584 set_setting ("catchupWatchEpgEndBufferMins" , "0" )
0 commit comments