Skip to content

Refactor and consolidate mixins - #1564

Merged
JonnyWong16 merged 5 commits into
pushingkarmaorg:masterfrom
JonnyWong16:feature/refactor_mixins
Jan 30, 2026
Merged

Refactor and consolidate mixins#1564
JonnyWong16 merged 5 commits into
pushingkarmaorg:masterfrom
JonnyWong16:feature/refactor_mixins

Conversation

@JonnyWong16

Copy link
Copy Markdown
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

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

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
FileDescription
plexapi/mixins.pyAdds 12 new consolidated mixin classes and improves type annotation for filtersDict
plexapi/video.pyUpdates Movie, Show, Season, Episode, and Clip classes to use consolidated mixins
plexapi/audio.pyUpdates Artist, Album, and Track classes to use consolidated mixins
plexapi/photo.pyUpdates Photoalbum and Photo classes to use consolidated mixins
plexapi/collection.pyUpdates Collection class to use consolidated mixins
plexapi/playlist.pyUpdates Playlist class to use consolidated mixins

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

@JonnyWong16JonnyWong16 changed the title Refactor mixinsRefactor and consolidate mixinsNov 24, 2025

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

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.

Comment threadplexapi/mixins/edit.py
@JonnyWong16
JonnyWong16 merged commit f5a1d7e into pushingkarmaorg:masterJan 30, 2026
5 checks passed
@JonnyWong16
JonnyWong16 deleted the feature/refactor_mixins branch January 30, 2026 23:45
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@JonnyWong16