Skip to content

Commit 6ac3beb

Browse files
committed
9.9.638_v1
1 parent 22b8194 commit 6ac3beb

4 files changed

Lines changed: 23 additions & 19 deletions

File tree

addon.xml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<addon
33
id="script.mtvguide"
44
name="m-TVGuide [COLOR gold][B]EPG[/B][/COLOR]"
5-
version="9.9.637"
5+
version="9.9.638-beta.1"
66
provider-name="mariusz89b">
77
<requires>
88
<import addon="xbmc.addon" version="17.0.0"/>
@@ -41,7 +41,10 @@
4141
<forum>https://github.com/Mariusz89B/script.mtvguide/discussions</forum>
4242
<website>https://github.com/Mariusz89B/script.mtvguide</website>
4343
<source>m-TVGuide © 2013 - 2023</source>
44-
<news>v9.9.637 (2023-01-05)
44+
<news>v9.9.638 (2023-03-12)
45+
- Fixed catchup default setting for playing/downloading content longer than 1 hour.
46+
47+
v9.9.637 (2023-01-05)
4548
- EPG redraw fixes.
4649
- Decreased interval for auto EPG update.
4750
- Other fixes.

changelog.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
v9.9.637 (2023-01-05)
1+
v9.9.638 (2023-03-12)
2+
- Fixed catchup default setting for playing/downloading content longer than 1 hour.
3+
4+
v9.9.637 (2023-01-05)
25
- EPG redraw fixes.
36
- Decreased interval for auto EPG update.
47
- Other fixes.

playService.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1319,7 +1319,7 @@ def LoadVideoLink(self, channel, service, url):
13191319

13201320
# Default
13211321
if ADDON.getSetting('archive_type') == '0':
1322-
matches = re.compile(r'^(http[s]?://[^/]+)/([^/]+)/([^/]*)(mpegts|\\.m3u8)(\\?.+=.+)?$')
1322+
matches = re.compile(r'^(http[s]?://[^/]+)/([^/]+)/([^/]*)(mpegts|\.m3u8)(\\?.+=.+)?$')
13231323

13241324
catchupList = ['hls-custom', 'mono']
13251325

@@ -1432,7 +1432,7 @@ def LoadVideoLink(self, channel, service, url):
14321432

14331433
# Xtream Codes
14341434
if ADDON.getSetting('archive_type') == '2':
1435-
matches = re.compile(r'^(http[s]?://[^/]+)/(?:live/)?([^/]+)/([^/]+)/([^/\\.]+)(\\.m3u[8]?|\\.ts)?$')
1435+
matches = re.compile(r'^(http[s]?://[^/]+)/(?:live/)?([^/]+)/([^/]+)/([^/\\.]+)(\.m3u[8]?|\.ts)?$')
14361436

14371437
if matches.match(strmUrl):
14381438
xcHost = matches.search(strmUrl).group(1)

recordService.py

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,7 @@ def downloadUrl(self, url, threadData):
745745
archivePlaylist = str(self.archiveString)
746746
catchupList = archivePlaylist.split(', ')
747747

748-
p = re.compile('service=playlist_\d&cid=\d+_AR.*')
748+
p = re.compile(r'service=playlist_\d&cid=\d+_AR.*')
749749

750750
if not p.match(url):
751751
return False
@@ -770,7 +770,7 @@ def downloadUrl(self, url, threadData):
770770
strmUrl = strmUrl_catchup.format(utc=utc, lutc=lutc)
771771

772772
if 'mono' in strmUrl:
773-
strmUrl = re.sub('\$', '', str(strmUrl))
773+
strmUrl = re.sub(r'\$', '', str(strmUrl))
774774
strmUrl = re.sub('mono', 'video', str(strmUrl))
775775
else:
776776
deb('archive_type(4) wrong type')
@@ -784,7 +784,7 @@ def downloadUrl(self, url, threadData):
784784

785785
# Default
786786
if ADDON.getSetting('archive_type') == '0':
787-
matches = re.compile('^(http[s]?://[^/]+)/([^/]+)/([^/]*)(mpegts|\\.m3u8)(\\?.+=.+)?$')
787+
matches = re.compile(r'^(http[s]?://[^/]+)/([^/]+)/([^/]*)(mpegts|\.m3u8)(\\?.+=.+)?$')
788788

789789
catchupList = ['hls-custom', 'mono']
790790

@@ -874,10 +874,10 @@ def downloadUrl(self, url, threadData):
874874
if ADDON.getSetting('archive_type') == '1':
875875
setting = ADDON.getSetting('archive_string')
876876

877-
putc = re.compile('(^\?utc=|^\&utc=)')
877+
putc = re.compile(r'(^\?utc=|^\&utc=)')
878878
mutc = putc.match(setting)
879879

880-
putv = re.compile('(^.*)(\{Y\}.\{m\}.\{d\}.*\{H\}.\{M\}.\{S\})(?=.*|$)')
880+
putv = re.compile(r'(^.*)(\{Y\}.\{m\}.\{d\}.*\{H\}.\{M\}.\{S\})(?=.*|$)')
881881
mutv = putv.match(setting)
882882

883883
if mutc:
@@ -886,15 +886,15 @@ def downloadUrl(self, url, threadData):
886886
elif mutv:
887887
catchup = ADDON.getSetting('archive_string').format(Y=year, m=month, d=day, H=hour, M=minute, S=second)
888888

889-
putc = re.compile('(^\?utc=|^\&utc=)')
889+
putc = re.compile(r'(^\?utc=|^\&utc=)')
890890
mutc = putc.match(catchup)
891891

892-
putv = re.compile('(^.*)(\d{4}.\d{2}.\d{2}.*\d{2}.\d{2}.\d{2})(?=.*|$)')
892+
putv = re.compile(r'(^.*)(\d{4}.\d{2}.\d{2}.*\d{2}.\d{2}.\d{2})(?=.*|$)')
893893
mutv = putv.match(catchup)
894894

895895
m_catchupSource = strmUrl + catchup
896896

897-
if mutc:
897+
if mutc:
898898
strmUrl = m_catchupSource + '-' + str(int(duration)*60)
899899

900900
elif mutv:
@@ -911,7 +911,7 @@ def downloadUrl(self, url, threadData):
911911

912912
# Xtream Codes
913913
if ADDON.getSetting('archive_type') == '2':
914-
matches = re.compile('^(http[s]?://[^/]+)/(?:live/)?([^/]+)/([^/]+)/([^/\\.]+)(\\.m3u[8]?|\\.ts)?$')
914+
matches = re.compile(r'^(http[s]?://[^/]+)/(?:live/)?([^/]+)/([^/]+)/([^/\\.]+)(\.m3u[8]?|\.ts)?$')
915915

916916
if matches.match(strmUrl):
917917
xcHost = matches.search(strmUrl).group(1)
@@ -1003,7 +1003,7 @@ def download(self, recordCommand, threadData):
10031003
self.downloading = True
10041004

10051005
for line in threadData['downloadHandle'].stdout:
1006-
p = re.compile('.*time=(.*?)\s')
1006+
p = re.compile(r'.*time=(.*?)\s')
10071007

10081008
i = 1
10091009

@@ -1117,8 +1117,6 @@ def generateFFMPEGDownloadCommand(self, channelInfo, programDuration, destinatio
11171117
recordCommand = list()
11181118
recordCommand.append(self.ffmpegdumpExe)
11191119

1120-
duration = datetime.timedelta(seconds=int(programDuration))
1121-
11221120
streamSource = channelInfo.strm
11231121

11241122
cookieSeparator = streamSource.find('|')
@@ -1129,7 +1127,7 @@ def generateFFMPEGDownloadCommand(self, channelInfo, programDuration, destinatio
11291127

11301128
headers = removedCookie.split('&')
11311129
newHeader = ""
1132-
newCookie = ""
1130+
newCookie = ""
11331131

11341132
UA = serviceLib.HOST
11351133

@@ -1197,7 +1195,7 @@ def generateFFMPEGDownloadCommand(self, channelInfo, programDuration, destinatio
11971195
recordCommand.append("h264_mp4toannexb")
11981196

11991197
recordCommand.append("-t")
1200-
recordCommand.append(str(duration))
1198+
recordCommand.append("{}".format(programDuration))
12011199
recordCommand.append("-loglevel")
12021200
recordCommand.append("info")
12031201
recordCommand.append("-n")

0 commit comments

Comments
 (0)