Skip to content

Commit

Permalink
fix: ordering of assignment before super call
Browse files Browse the repository at this point in the history
  • Loading branch information
iPromKnight committed Nov 7, 2024
1 parent 2428c2b commit b1f749a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/program/media/item.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,9 +423,9 @@ def copy(self, other):
return self

def __init__(self, item):
self.type = MovieMediaType.Movie.value
self.file = item.get("file", None)
super().__init__(item)
self.type = MovieMediaType.Movie.value

def __repr__(self):
return f"Movie:{self.log_string}:{self.state.name}"
Expand All @@ -445,8 +445,8 @@ class Show(MediaItem):
}

def __init__(self, item):
super().__init__(item)
self.type = ShowMediaType.Show.value
super().__init__(item)
self.locations = item.get("locations", [])
self.seasons: list[Season] = item.get("seasons", [])
self.propagate_attributes_to_childs()
Expand Down Expand Up @@ -660,10 +660,10 @@ class Episode(MediaItem):
}

def __init__(self, item):
self.type = ShowMediaType.Episode.value
self.number = item.get("number", None)
self.file = item.get("file", None)
super().__init__(item)
self.type = ShowMediaType.Episode.value
if self.parent and isinstance(self.parent, Season):
self.is_anime = self.parent.parent.is_anime

Expand Down

0 comments on commit b1f749a

Please sign in to comment.