Skip to content

Commit

Permalink
bugfix in tuner conflict resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
jumpmanjay committed Aug 30, 2016
1 parent 22d546d commit c0397d6
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions Contents/Services/Shared Code/PyHDHR.pys
Original file line number Diff line number Diff line change
Expand Up @@ -792,24 +792,15 @@ class PyHDHR:
for tunerkey in self.Tuners:
chaninfos = self.Tuners[tunerkey].getChannelInfos()
if guideno in chaninfos:
usethis = True
try:
response = urllib2.urlopen(chaninfos[guideno].getURL()+"?duration=1",None,5)
except urllib2.URLError as e:
Log.Critical("urllib2.URLError: "+str(e))
usethis = False
except urllib2.HTTPError as e:
regx = re.search('HTTP Error 503:',e)
return chaninfos[guideno].getURL()
except Exception as e:
regx = re.search('HTTP Error 503:',str(e))
if regx != None:
Log.Debug("All tuners in use on "+self.Tuners[tunerkey].getLocalIP())
else:
Log.Critical("urllib2.HTTPError: "+str(e))
usethis = False
except Exception as e:
Log.Critical("Exception: "+str(e))
usethis = False
if usethis == True:
return chaninfos[guideno].getURL()
Log.Critical("Exception: "+str(e))
return None

def getRecordedPrograms(self,force=False):
Expand Down

0 comments on commit c0397d6

Please sign in to comment.