Skip to content

Commit

Permalink
Merge pull request #2013 from glensc/fix-WalkConfig
Browse files Browse the repository at this point in the history
Fix: Convert WalkConfig to dataclass
  • Loading branch information
glensc authored Jul 9, 2024
2 parents a3b632f + 7c077f2 commit 86df4b2
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions plextraktsync/plan/WalkConfig.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
from __future__ import annotations

from dataclasses import dataclass, field


@dataclass
class WalkConfig:
walk_movies = True
walk_shows = True
walk_watchlist = True
library: list[str] = []
show: list[str] = []
movie: list[str] = []
id: list[str] = []

def __init__(self, movies=True, shows=True, watchlist=True):
self.walk_movies = movies
self.walk_shows = shows
self.walk_watchlist = watchlist
library: list[str] = field(default_factory=list)
show: list[str] = field(default_factory=list)
movie: list[str] = field(default_factory=list)
id: list[str] = field(default_factory=list)

def update(self, movies=None, shows=None, watchlist=None):
if movies is not None:
Expand Down

0 comments on commit 86df4b2

Please sign in to comment.