Package: plexiglas
plexiglasThis piece of software was inspired by me buying theWD My Passport Wireless Pro,
quite nice external hdd which is able to runPlexand stream all available
media across connected wireless devices. The only remarkable problem was is requirement
to manually copy required content to hdd, at least when you already have some instance
of Plex set up. But now, with plexiglas, you can easily have multiple servers with similar data.FeaturesMobile Sync, Plex Pass subscribers onlyLimit used spaceMinimize transcoding somehow (no idea if it's possible)Work with Python 2.7Work on WD My Passport Wireless Pro (docs)Run and able to download filesKeyring is workingResume transferSimple downloading of original video for those, who don't have PlexPassWith configurable transcodingAutomatically remove watched videosDownload all video parts, not only firstMark missing videos as watchedLimit bandwidthTrailers downloading & converting to mp4Confirmed working with Movies & TV-Showsmobile syncsimple syncConfirmed working with audiomobile syncsimple syncConfirmed working with photomobile syncsimple syncConfirmed working with playlistsmobile syncsimple sync--subdir as pluginSync watching positionInstallationpip install plexiglas(sudo may be required)If you'll receive an error likeAttributeError: 'MyPlexAccount' object has no attribute 'syncItems'it means that you already have PlexAPI installed, but without my changes, to fix this please execute
following commands:pip uninstall plexapi
pip install 'plexapi>=3.1.0'Usageplexiglas -d "/Volumes/My Passport/PlexSync" --limit-disk-usage 10% -wFollowing arguments are currently supported:-u,--username— your Plex.tv username, after the first run in will be securely stored in a keychain-p,--password— your Plex.tv password, after the first run in will be securely stored in a keychain-n,--device-name— allows to set human-readable device name instead of computer name-d,--destination— the path where to store downloaded files and Plexiglas' DB, current dir by default. Do not
forget to copy.plexiglas.dbfile to the new path manually, If you'd like to change the folder-w,--mark-watched— if a previously downloaded file is missing within destination directory the media would be
marked as watched--debug— enable debug logging-v,--verbose— enable logging from underlying library (plexapi)-s,--limit-disk-usage— sets disk usage limit, supported human-readable format and percents of total disk space--loop— run the script in a loop, so it will monitor for updates--delay— sets delay (in seconds) between iterations-r,--resume-downloads— restart download if file is exist--rate-limit— limit bandwidth usage-q— close application right after initialization and storing all required data in keyring-i,--insecure— use insecure keyring, which can be used in non-interactive mode--skip— skip specified file from downloading, can be used multiple times. E.g. passingRewatch/The Butterfly Effect (2004).mp4as an argument will skip the movieThe Butterfly Effectfrom downloading tosyncnamedRewatch--subdir— store each movie in subdirectory, so you can easily add extras (e.g.trailers)--simple-sync-url— download media from specific part of the library, you should enter argument value in formatURL [<COUNT> [<ALLOW_WATCHED>]], where items in square braces are optional.
To get the URL simply open your Plex Web UI, go to the library you're interested in (syncing for single items like
Movie, TVShow, Season also supported), set any required filters and / or sorting and copy the resulting URL from the
browser. Sample usage:Download 10 unwatched movies, sorted by year of release (all filters and sorting are set in Plex Web UI)--simple-sync-url https://app.plex.tv/desktop#!/server/607c8c938b50eef734456f8b9da94b5d02339ce5?key=%2Flibrary%2Fsections%2F1&typeKey=%2Flibrary%2Fsections%2F1%2Fall%3Ftype%3D1&save=1&limit=&sort=year%3Adesc 10Download 5 oldest watched movies:--simple-sync-url http://example.com:32400/web/index.html#!/server/607c8c938b50eef734456f8b9da94b5d02339ce5?key=%2Flibrary%2Fsections%2F1&typeKey=%2Flibrary%2Fsections%2F1%2Fall%3Ftype%3D1&customFilter=1&save=1&sort=lastViewedAt&filters=unwatched%21%3D1 5 1If you wouldn't provide a username and/or password the app will ask you to provide them in interactive mode, afterwards
it will be stored in secure storage, unless option-iwas set.If you're using Mobile Sync you can split all your files by subdirectories in quite an easy way:
when you create a new Sync Item in Plex interface it asks you for atitle— it would be a folder
name for all the items, related to this item. And there lies a trick, there is some special handling
for this title:You can set it to something likeMovies#Best— in this case the part after#will be ignored
and all the files would be placed withinMoviesfolder, while you'll be able to differentiate
Sync Items in the interfaceYou can use/or\\to split the files by folders, e.g. you can add a new ItemTV Shows/The Big Gang Theoryand all the episodes will be stored inside directoryTV Shows/The Big Gang Theoryof your downloading path.