Skip to content

Commit 3ad1b18

Browse files
committed
fix login error and add clear cache option
1 parent 930c972 commit 3ad1b18

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

bin/tv_grab_zap2xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ do case "$1" in
5151
;;
5252

5353
-v | --version )
54-
printf "0.6.6\n"
54+
printf "0.6.7\n"
5555
;;
5656

5757
-c | --capabilities )

default.py

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,20 @@
1717
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
1818
# http://www.gnu.org/copyleft/gpl.html
1919
################################################################################
20-
import xbmcgui
20+
import xbmc,xbmcaddon,xbmcgui
21+
import os
2122

2223
dialog = xbmcgui.Dialog()
23-
if dialog.yesno('This is addon runs from within Tvheadend', 'Add your zap2it/screener/tvguide login info in the addon configuration. Reboot and setup the grabber in tvheadend before enabling the other options.'):
24-
xbmc.executebuiltin(Addon.OpenSettings())
24+
if dialog.yesno('This is addon runs from within Tvheadend', 'Add your zap2it/screener/tvguide login info in the addon configuration. Then reboot and setup the grabber channels in tvheadend before enabling the other options.', 'Would you like to open the addon settings?'):
25+
xbmcaddon.Addon().openSettings()
26+
if dialog.yesno('Clear the listings cache', 'Would you like to clear the listings cache?', 'This might be needed to download updated "favorite" channels.'):
27+
scandirs = xbmc.translatePath(
28+
'special://home/addons/script.module.zap2xml/cache'
29+
)
30+
path = scandirs
31+
exts = ('html.gz')
32+
if os.path.exists(scandirs):
33+
for root, dirs, files in os.walk(path):
34+
for currentFile in files:
35+
if any(currentFile.lower().endswith(exts) for ext in exts):
36+
os.remove(os.path.join(root, currentFile))

zap2xml.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def pout (self, pstr, log_type='none',printOut = True, func = False):
150150
br = None #browser global
151151
gridHours = 0
152152
loggedinMatchZ = 0
153-
loggedinStr = '.*Logout of your Screener account.*'
153+
loggedinStr = '.*Logout of your Zap2it account.*'
154154
programs = {}
155155
cp = None
156156
stations = {}

0 commit comments

Comments
 (0)