Skip to content

Commit 080f269

Browse files
author
Jon Maddox
authored
Merge pull request #1 from fancybits/add-new-methods
Add toggle_pause and previous_channel
2 parents b85c723 + a532d62 commit 080f269

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ You can control Channels with these methods.
105105
#### Toggle Mute
106106
client.toggle_mute()
107107

108+
#### Toggle Pause
109+
client.toggle_pause()
110+
108111
#### Pause
109112
client.pause()
110113

@@ -134,6 +137,11 @@ Skip to the next chapter mark. This is for recordings made with Channels DVR tha
134137
client.skip_backward()
135138
Skip to the previous chapter mark. This is for recordings made with Channels DVR that have their commercials indexed.
136139

140+
#### Previous Channel
141+
client.previous_channel()
142+
Jump back to the last watched channel.
143+
144+
137145
#### Play Channel
138146
client.play_channel(channel_number)
139147
Play a channel by passing it the channel number.

pychannels/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ def favorite_channels(self):
6868
else:
6969
return []
7070

71+
def toggle_pause(self):
72+
"""Toggle paused state and returns the current state."""
73+
return self._command('toggle_pause')
74+
7175
def pause(self):
7276
"""Set playback to paused and returns the current state."""
7377
return self._command('pause')
@@ -101,6 +105,10 @@ def skip_backward(self):
101105
"""Skip backward to the previous chapter mark."""
102106
return self._command('skip_backward')
103107

108+
def previous_channel(self):
109+
"""Jump back to the last channel."""
110+
return self._command('previous_channel')
111+
104112
def toggle_muted(self):
105113
"""Mute and returns the current state."""
106114
return self._command('toggle_mute')

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
setup(
44
name='pychannels',
5-
version="1.0.0",
5+
version="1.1.0",
66
packages=['pychannels',],
77
license='The MIT License',
88
description = 'API client for the Channels app - https://getchannels.com',

0 commit comments

Comments
 (0)