Skip to content

Conversation

@JonnyWong16
Copy link
Collaborator

Description

Refactor mixins for each media type to reduce number of imports.

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

Copy link
Contributor

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 refactors the mixin architecture by introducing consolidated mixin classes for each media type (MovieMixins, ShowMixins, etc.), significantly reducing import complexity across the codebase while maintaining identical functionality.

Key changes:

  • Created 12 new consolidated mixin classes in plexapi/mixins.py (MovieMixins, ShowMixins, SeasonMixins, EpisodeMixins, ClipMixins, ArtistMixins, AlbumMixins, TrackMixins, PhotoalbumMixins, PhotoMixins, CollectionMixins, PlaylistMixins)
  • Updated all media type class definitions to use consolidated mixins instead of listing individual mixins
  • Enhanced type annotation in _parseQueryFeed method

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
plexapi/mixins.py Adds 12 new consolidated mixin classes and improves type annotation for filtersDict
plexapi/video.py Updates Movie, Show, Season, Episode, and Clip classes to use consolidated mixins
plexapi/audio.py Updates Artist, Album, and Track classes to use consolidated mixins
plexapi/photo.py Updates Photoalbum and Photo classes to use consolidated mixins
plexapi/collection.py Updates Collection class to use consolidated mixins
plexapi/playlist.py Updates Playlist class to use consolidated mixins

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@JonnyWong16 JonnyWong16 changed the title Refactor mixins Refactor and consolidate mixins Nov 24, 2025
Copy link
Contributor

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

Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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