Plex Import Photos Library

Overview¶

Plex Photo Library Setup

Quit Photos, then press and hold the Option key as you open the Photos app. Select the Library that you want to import your photos to, then click Choose Library. Choose File Import. In the Import window, navigate to the Finder folder that contains the photos and videos that you want to import. Now you will see all kinds of files. Find the one called ‘Originals’ and click on it. Now you will see a new folder with a lot of years. Click on a year, then a month, and you will see all the pictures from your iPhoto library from that month. You can then open the photos one by one, copy them, or do what you like with each. The Expert's Guide to Managing Your Plex Server. There are several useful tricks and tools buried in the Plex server application's settings that can help you keep things organized and the content.

Unofficial Python bindings for the Plex API. Our goal is to match all capabilities of the officialPlex Web Client. A few of the many features we currently support are:

  • Navigate local or remote shared libraries.

  • Perform library actions such as scan, analyze, empty trash.

  • Remote control and play media on connected clients, including Controlling Sonos speakers

  • Listen in on all Plex Server notifications.

Installation & Documentation¶

Documentation can be found at Read the Docs.

Join our Discord for support and discussion.

Getting a PlexServer Instance¶

There are two types of authentication. If you are running on a separate networkor using Plex Users you can log into MyPlex to get a PlexServer instance. Anexample of this is below. NOTE: Servername below is the name of the server (notthe hostname and port). If logged into Plex Web you can see the server name inthe top left above your available libraries.

Plex Import Photos Library

If you want to avoid logging into MyPlex and you already know your auth tokenstring, you can use the PlexServer object directly as above, by passing inthe baseurl and auth token directly.

Usage Examples¶

Controlling Sonos speakers¶

To control Sonos speakers directly using Plex APIs, the following requirements must be met:

  1. Active Plex Pass subscription

  2. Sonos account linked to Plex account

  3. Plex remote access enabled

Due to the design of Sonos music services, the API calls to control Sonos speakers route through https://sonos.plex.tvand back via the Plex server’s remote access. Actual media playback is local unless networking restrictions prevent theSonos speakers from connecting to the Plex server directly.

Running tests over PlexAPI¶

Use:

with appropriatearguments and add this new server to a shared user which username is defined in environment veriable SHARED_USERNAME.It uses official docker image to create a proper instance.

For skipping the docker and reuse a existing server use

Plex Import Photos Library

Also in order to run most of the tests you have to provide some environment variables:

  • PLEXAPI_AUTH_SERVER_BASEURL containing an URL to your Plex instance, e.g. http://127.0.0.1:32400 (without trailingslash)

  • PLEXAPI_AUTH_MYPLEX_USERNAME and PLEXAPI_AUTH_MYPLEX_PASSWORD with your MyPlex username and password accordingly

After this step you can run tests with following command:

Photos

Some of the tests in main test-suite require a shared user in your account (e.g. test_myplex_users,test_myplex_updateFriend, etc.), you need to provide a valid shared user’s username to get them running you need toprovide the username of the shared user as an environment variable SHARED_USERNAME. You can enable a Guest account andsimply pass Guest as SHARED_USERNAME (or just create a user like plexapitest and play with it).

To be able to run tests over Mobile Sync api you have to some some more environment variables, to following valuesexactly:

  • PLEXAPI_HEADER_PROVIDES=’controller,sync-target’

  • PLEXAPI_HEADER_PLATFORM=iOS

  • PLEXAPI_HEADER_PLATFORM_VERSION=11.4.1

  • PLEXAPI_HEADER_DEVICE=iPhone

And finally run the sync-related tests:

Common Questions¶

Why are you using camelCase and not following PEP8 guidelines?

Plex

This API reads XML documents provided by MyPlex and the Plex Server.We decided to conform to their style so that the API variable names directlymatch with the provided XML documents.

Why don’t you offer feature XYZ?

This library is meant to be a wrapper around the XML pages the Plexserver provides. If we are not providing an API that is offerered in theXML pages, please let us know! – Adding additional features beyond thatshould be done outside the scope of this library.

What are some helpful links if trying to understand the raw Plex API?