[TV] Added "status" to episode and season media
This commit is contained in:
@@ -16,7 +16,7 @@ class Episode(MediaBase):
|
|||||||
addEvent('show.episode.add', self.add)
|
addEvent('show.episode.add', self.add)
|
||||||
addEvent('show.episode.update_info', self.updateInfo)
|
addEvent('show.episode.update_info', self.updateInfo)
|
||||||
|
|
||||||
def add(self, parent_id, info = None, update_after = True):
|
def add(self, parent_id, info = None, update_after = True, status = None):
|
||||||
if not info: info = {}
|
if not info: info = {}
|
||||||
|
|
||||||
identifiers = info.get('identifiers')
|
identifiers = info.get('identifiers')
|
||||||
@@ -28,6 +28,7 @@ class Episode(MediaBase):
|
|||||||
'_t': 'media',
|
'_t': 'media',
|
||||||
'type': 'show.episode',
|
'type': 'show.episode',
|
||||||
'identifiers': identifiers,
|
'identifiers': identifiers,
|
||||||
|
'status': status if status else 'active',
|
||||||
'parent_id': parent_id,
|
'parent_id': parent_id,
|
||||||
'info': info, # Returned dict by providers
|
'info': info, # Returned dict by providers
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ class Season(MediaBase):
|
|||||||
addEvent('show.season.add', self.add)
|
addEvent('show.season.add', self.add)
|
||||||
addEvent('show.season.update_info', self.updateInfo)
|
addEvent('show.season.update_info', self.updateInfo)
|
||||||
|
|
||||||
def add(self, parent_id, info = None, update_after = True):
|
def add(self, parent_id, info = None, update_after = True, status = None):
|
||||||
if not info: info = {}
|
if not info: info = {}
|
||||||
|
|
||||||
identifiers = info.get('identifiers')
|
identifiers = info.get('identifiers')
|
||||||
@@ -30,6 +30,7 @@ class Season(MediaBase):
|
|||||||
'_t': 'media',
|
'_t': 'media',
|
||||||
'type': 'show.season',
|
'type': 'show.season',
|
||||||
'identifiers': identifiers,
|
'identifiers': identifiers,
|
||||||
|
'status': status if status else 'active',
|
||||||
'parent_id': parent_id,
|
'parent_id': parent_id,
|
||||||
'info': info, # Returned dict by providers
|
'info': info, # Returned dict by providers
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user