Skip to content

Commit

Permalink
version 0.11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
salphonso committed Dec 9, 2015
1 parent f42df8e commit 6f42bab
Showing 1 changed file with 56 additions and 1 deletion.
57 changes: 56 additions & 1 deletion Contents/Code/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
SERVERWMC_IP = Prefs['serverwmc_ip']
SERVERWMC_PORT = Prefs['serverwmc_port']
SERVERWMC_ADDR = (SERVERWMC_IP, int(SERVERWMC_PORT))
VERSION = '0.10.0'
VERSION = '0.11.0'
MACHINENAME = socket.gethostname()
IDSTREAMINT = 0
GETSTREAMINFO = 'IncludeStreamInfo'
Expand Down Expand Up @@ -70,6 +70,7 @@ def MainMenu():
oc.add(DirectoryObject(key = Callback(SubMenu, title='Guide'), title='Guide', thumb=R(CHANNEL_ICON)))
oc.add(DirectoryObject(key = Callback(GetTimers), title='Scheduled Recordings', thumb=R(TIMER_ICON)))
oc.add(DirectoryObject(key = Callback(GetRecordings), title='Recorded TV', thumb=R(RECORDEDTV_ICON)))
oc.add(DirectoryObject(key = Callback(GetSeries), title='Manage Series', thumb=R(RECORDEDTV_ICON)))

return oc

Expand Down Expand Up @@ -418,6 +419,41 @@ def GetTimers():

return oc

####################################################################################################
@route(PREFIX + '/GetSeries')
def GetSeries():

oc = ObjectContainer(title2='Scheduled Series Recordings', no_cache=True)

# Connect and Get list of recordings
resultsArray = socketClient('GetSeriesTimers', '')

if DEBUG == 'Verbose':
Log.Debug('----------GetSeries----------')
Log.Debug(resultsArray)

for result in resultsArray:
infoArray = result.split('|')
seriesID = infoArray[0]
name = infoArray[1]
chID = infoArray[2]
## programImage = getListingInfo(
## chID=chID, progItem='programImage', infoType='singleItem', startDt=startDateTime, endDt=endDateTime
## )

if DEBUG == 'Verbose':
Log.Debug(infoArray)

oc.add(DirectoryObject(
key=Callback(cancelSeriesTimer, seriesID=seriesID, programName=name),
title=name,
summary=name,
thumb=DEL_ICON
)
)

return oc

####################################################################################################
@route(PREFIX + '/getLiveStream')
def getLiveStream(channelID):
Expand Down Expand Up @@ -717,6 +753,25 @@ def cancelTimer(timerID, programName, startTime):
Log.Debug(message)
return ObjectContainer(header='Cancelled', message=message)

####################################################################################################
def cancelSeriesTimer(seriesID, programName):

command = 'CancelSeriesTimer|{0}'.format(
seriesID
)

message = 'You have successfully cancelled the scheduled series for {0}.'.format(
programName)


responses = socketClient(command, '')
if DEBUG == 'Verbose':
Log.Debug('----------cancelSeriesTimer----------')
Log.Debug('Send Command:' + command)
Log.Debug(responses)
Log.Debug(message)
return ObjectContainer(header='Series Cancelled', message=message)

####################################################################################################
def deleteRecording(recordingID, recordingName):

Expand Down

0 comments on commit 6f42bab

Please sign in to comment.