Skip to content

Conversation

@JonnyWong16
Copy link
Collaborator

@JonnyWong16 JonnyWong16 commented Oct 21, 2025

Description

Add support for Square Art.

Ref.: https://forums.plex.tv/t/plex-media-server/30447/693

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the docstring for new or existing methods
  • I have added tests when applicable

@JonnyWong16 JonnyWong16 force-pushed the feature/squareArt branch 3 times, most recently from b4bc23c to 18cab4b Compare October 21, 2025 16:41
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for Square Art images in PlexAPI, extending the existing image handling capabilities (art, poster, theme) to include a new square art type. This aligns with Plex Media Server's support for square artwork as referenced in the Plex forums.

Key changes:

  • Implements SquareArtMixin, SquareArtUrlMixin, and SquareArtLockMixin classes with full CRUD operations for square art
  • Adds SquareArt media resource class and registers the squareArt tag type
  • Integrates square art support across all relevant media types (movies, shows, seasons, episodes, audio, photos, collections, playlists)

Reviewed Changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
plexapi/mixins.py Adds three new mixin classes for square art functionality with lock/unlock, upload, set, and delete operations
plexapi/media.py Defines the SquareArt resource class
plexapi/utils.py Registers the squareArt tag type with ID 325
plexapi/video.py Adds SquareArtMixin to Movie, Show, Season, Episode classes and SquareArtUrlMixin to Clip
plexapi/audio.py Adds SquareArtMixin to Artist and Album classes, SquareArtUrlMixin to Track
plexapi/photo.py Adds SquareArtMixin to Photoalbum and SquareArtUrlMixin to Photo
plexapi/collection.py Adds SquareArtMixin to Collection class
plexapi/playlist.py Adds SquareArtMixin to Playlist class
tests/test_mixins.py Updates test helper to include square art delete operations and adds test functions for square art
tests/test_video.py Adds square art test calls for Movie, Show, Season, and Episode
tests/test_audio.py Adds square art test calls for Artist, Album, and Track
tests/test_photo.py Adds square art test calls for Photoalbum
tests/test_collection.py Adds square art test calls for Collection
tests/test_playlist.py Adds square art test calls for Playlist

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

from plexapi.mixins import (
AdvancedSettingsMixin, SplitMergeMixin, UnmatchMatchMixin, ExtrasMixin, HubsMixin, PlayedUnplayedMixin, RatingMixin,
ArtUrlMixin, ArtMixin, LogoMixin, PosterUrlMixin, PosterMixin, ThemeUrlMixin, ThemeMixin,
ArtUrlMixin, ArtMixin, LogoMixin, LogoUrlMixin, PosterUrlMixin, PosterMixin, SquareArtMixin, SquareArtUrlMixin,
Copy link

Copilot AI Oct 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The import statement has become quite long and difficult to read. Consider grouping related mixins on separate lines for better readability. For example, URL mixins on one line and regular mixins on another.

Copilot uses AI. Check for mistakes.
from plexapi.mixins import (
AdvancedSettingsMixin, SplitMergeMixin, UnmatchMatchMixin, ExtrasMixin, HubsMixin, PlayedUnplayedMixin, RatingMixin,
ArtUrlMixin, ArtMixin, PosterUrlMixin, PosterMixin, ThemeMixin, ThemeUrlMixin,
ArtUrlMixin, ArtMixin, PosterUrlMixin, PosterMixin, SquareArtMixin, SquareArtUrlMixin, ThemeMixin, ThemeUrlMixin,
Copy link

Copilot AI Oct 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The import statement has become quite long and difficult to read. Consider grouping related mixins on separate lines for better readability. For example, URL mixins on one line and regular mixins on another.

Suggested change
ArtUrlMixin, ArtMixin, PosterUrlMixin, PosterMixin, SquareArtMixin, SquareArtUrlMixin, ThemeMixin, ThemeUrlMixin,
ArtMixin, PosterMixin, SquareArtMixin, ThemeMixin,
ArtUrlMixin, PosterUrlMixin, SquareArtUrlMixin, ThemeUrlMixin,

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant