Skip to content

Commit 64e935c

Browse files
authored
Merge pull request #470 from pkkid/static_media
first pass on static media
2 parents 6eea7cc + 22763c2 commit 64e935c

19 files changed

+1251
-696
lines changed

README.rst

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -132,32 +132,22 @@ Usage Examples
132132
Running tests over PlexAPI
133133
--------------------------
134134

135-
In order to test the PlexAPI library you have to prepare a Plex Server instance with following libraries:
136-
137-
1. Movies section (agent `com.plexapp.agents.imdb`) containing both movies:
138-
* Sintel - https://durian.blender.org/
139-
* Elephants Dream - https://orange.blender.org/
140-
* Sita Sings the Blues - http://www.sitasingstheblues.com/
141-
* Big Buck Bunny - https://peach.blender.org/
142-
2. TV Show section (agent `com.plexapp.agents.thetvdb`) containing the shows:
143-
* Game of Thrones (Season 1 and 2)
144-
* The 100 (Seasons 1 and 2)
145-
* (or symlink the above movies with proper names)
146-
3. Music section (agent `com.plexapp.agents.lastfm`) containing the albums:
147-
* Infinite State - Unmastered Impulses - https://github.com/kennethreitz/unmastered-impulses
148-
* Broke For Free - Layers - http://freemusicarchive.org/music/broke_for_free/Layers/
149-
4. A Photos section (any agent) containing the photoalbums (photoalbum is just a folder on your disk):
150-
* `Cats`
151-
* Within `Cats` album you need to place 3 photos (cute cat photos, of course)
152-
* Within `Cats` album you should place 3 more photoalbums (one of them should be named `Cats in bed`,
153-
names of others doesn't matter)
154-
* Within `Cats in bed` you need to place 7 photos
155-
* Within other 2 albums you should place 1 photo in each
156-
157-
Instead of manual creation of the library you could use a script `tools/plex-boostraptest.py` with appropriate
135+
Use:
136+
137+
.. code-block:: bash
138+
139+
tools/plex-boostraptest.py
140+
141+
with appropriate
158142
arguments and add this new server to a shared user which username is defined in environment veriable `SHARED_USERNAME`.
159143
It uses `official docker image`_ to create a proper instance.
160144

145+
For skipping the docker and reuse a existing server use
146+
147+
.. code-block:: bash
148+
149+
tools/plex-boostraptest.py --no-docker -username USERNAME --password PASSWORD --server-name NAME-OF-YOUR-SEVER
150+
161151
Also in order to run most of the tests you have to provide some environment variables:
162152

163153
* `PLEXAPI_AUTH_SERVER_BASEURL` containing an URL to your Plex instance, e.g. `http://127.0.0.1:32400` (without trailing

tests/conftest.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,17 +224,17 @@ def collection(plex):
224224

225225
@pytest.fixture()
226226
def artist(music):
227-
return music.get("Infinite State")
227+
return music.get("Broke For Free")
228228

229229

230230
@pytest.fixture()
231231
def album(artist):
232-
return artist.album("Unmastered Impulses")
232+
return artist.album("Layers")
233233

234234

235235
@pytest.fixture()
236236
def track(album):
237-
return album.track("Holy Moment")
237+
return album.track("As Colourful as Ever")
238238

239239

240240
@pytest.fixture()

tests/data/audio_stub.mp3

3.59 MB
Binary file not shown.

tests/data/cute_cat.jpg

30.1 KB
Loading

tests/data/video_stub.mp4

17.3 MB
Binary file not shown.

0 commit comments

Comments
 (0)