Fix readme

This commit is contained in:
Michael Shepanski 2017-02-20 02:14:25 -05:00
parent 50af39c6f3
commit 6eab6f2812

View file

@ -32,7 +32,7 @@ the top left above your available libraries.
```python ```python
from plexapi.myplex import MyPlexAccount from plexapi.myplex import MyPlexAccount
account = MyPlexAccount.signin('<USERNAME>', '<PASSWORD>') account = MyPlexAccount('<USERNAME>', '<PASSWORD>')
plex = account.resource('<SERVERNAME>').connect() # returns a PlexServer instance plex = account.resource('<SERVERNAME>').connect() # returns a PlexServer instance
``` ```
@ -68,9 +68,9 @@ for client in plex.clients():
```python ```python
# Example 4: Play the movie Cars on another client. # Example 4: Play the movie Cars on another client.
# Note: Client must be on same network as server. # Note: Client must be on same network as server.
avatar = plex.library.section('Movies').get('Cars') cars = plex.library.section('Movies').get('Cars')
client = plex.client("Michael's iPhone") client = plex.client("Michael's iPhone")
client.playMedia(avatar) client.playMedia(cars)
``` ```
```python ```python
# Example 5: List all content with the word 'Game' in the title. # Example 5: List all content with the word 'Game' in the title.
@ -87,8 +87,8 @@ for movie in movies.search(None, director=director):
``` ```
```python ```python
# Example 7: List files for the latest episode of The 100. # Example 7: List files for the latest episode of The 100.
thelastone = plex.library.section('TV Shows').get('The 100').episodes()[-1] last_episode = plex.library.section('TV Shows').get('The 100').episodes()[-1]
for part in thelastone.iterParts(): for part in last_episode.iterParts():
print(part.file) print(part.file)
``` ```
```python ```python