Skip to content

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Moromete committed Mar 16, 2015
1 parent 2f66165 commit d742cce
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion addon.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.streams"
name="Streams"
version="0.3.0"
version="0.3.1"
provider-name="Moromete">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
Expand Down
3 changes: 3 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
v 0.3.1 (16.03.2015)
1. fix the marking offline of a sopcast channel

v 0.3.0 (13.03.2015)
1. new online/offline detection system
2. fix some utf8 encoding problems (logo name)
Expand Down
8 changes: 8 additions & 0 deletions play_sop.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import glob
from glob import addon_log, addon, is_exe
from settings import SETTINGS
from mark_stream import mark_stream

class sopcast():
def __init__( self , *args, **kwargs):
Expand Down Expand Up @@ -48,6 +49,7 @@ def start( self ):
addon_log(inst)

addon_log(res)
offline = None
if res:

#START PLAY
Expand All @@ -60,14 +62,20 @@ def start( self ):
try:
urllib2.urlopen(SETTINGS.TEST_URL)
if SETTINGS.NOTIFY_OFFLINE == "true": xbmc.executebuiltin("Notification(%s,%s,%i)" % (addon.getLocalizedString(30057), "",1)) #Channel is offline
offline = True
except:
if SETTINGS.NOTIFY_OFFLINE == "true": xbmc.executebuiltin("Notification(%s,%s,%i)" % (addon.getLocalizedString(30058), "",1)) #Network is offline
elif SETTINGS.NOTIFY_OFFLINE == "true":
try: xbmc.executebuiltin("Dialog.Close(all,true)")
except: pass
xbmc.executebuiltin("Notification(%s,%s,%i)" % (addon.getLocalizedString(30059), "", 1)) #Channel initialization failed
offline = True
try: self.stop_spsc()
except: pass

if offline:
mark = mark_stream(ch_id=self.player.ch_id)
mark.mark_offline()

except Exception as inst:
xbmcgui.Dialog().ok(addon.getLocalizedString(30060), str(type(inst)),str(inst),"")
Expand Down

0 comments on commit d742cce

Please sign in to comment.