-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Add label methods, properties to Episodes #868
Conversation
Labels were not added to episodes because you can't add them in the Plex UI. There may be unexpected issues/bugs with sharing label restrictions because Plex isn't designed to support episodes. |
so as far as i can tell from plexapi.server import PlexServer
from plexapi import utils
PLEX_URL = ""
PLEX_TOKEN = ""
PLEX_LIBRARY = ""
EPISODE_LABEL = ""
COLLECTION_NAME = ""
ps = PlexServer(PLEX_URL, PLEX_TOKEN, timeout=600)
lib = next((s for s in ps.library.sections() if s.title == PLEX_LIBRARY), None)
if lib:
key = None
for choice in lib.listFilterChoices("label"):
if choice.title == EPISODE_LABEL:
key = choice.key
break
if key:
args = {
"type": 4,
"title": COLLECTION_NAME,
"smart": 1,
"sectionId": lib.key,
"uri": f"server://{ps.machineIdentifier}/com.plexapp.plugins.library/library/sections/{lib.key}/all?type=4&episode.label={key}"
}
ps.query(f"/library/collections{utils.joinArgs(args)}", method=ps._session.post) |
Add test. https://github.com/pkkid/python-plexapi/blob/master/tests/test_video.py#L1151 test_mixins.edit_label(episode) |
Test added 874d6e2 |
Are the errors really from this PR?
|
EDIT: nevermind, the last CI job has passed OK: |
Combined into PR #872 so it's all in one PR. |
Description
Seems
LabelMixin
was added toAlbum
,Collection
,Show
, andMovie
, but left out ofEpisode
.My testing with
1.24.3.5033-757abe6b4
shows that Episodes can also have labels.Type of change
Please delete options that are not relevant.
Checklist: