Force restatus on ignored movies
This commit is contained in:
@@ -77,6 +77,7 @@ class MediaPlugin(MediaBase):
|
|||||||
addEvent('app.load', self.addSingleListView, priority = 100)
|
addEvent('app.load', self.addSingleListView, priority = 100)
|
||||||
addEvent('app.load', self.addSingleCharView, priority = 100)
|
addEvent('app.load', self.addSingleCharView, priority = 100)
|
||||||
addEvent('app.load', self.addSingleDeleteView, priority = 100)
|
addEvent('app.load', self.addSingleDeleteView, priority = 100)
|
||||||
|
addEvent('app.load', self.cleanupFaults)
|
||||||
|
|
||||||
addEvent('media.get', self.get)
|
addEvent('media.get', self.get)
|
||||||
addEvent('media.with_status', self.withStatus)
|
addEvent('media.with_status', self.withStatus)
|
||||||
@@ -87,6 +88,12 @@ class MediaPlugin(MediaBase):
|
|||||||
addEvent('media.tag', self.tag)
|
addEvent('media.tag', self.tag)
|
||||||
addEvent('media.untag', self.unTag)
|
addEvent('media.untag', self.unTag)
|
||||||
|
|
||||||
|
# Wrongly tagged media files
|
||||||
|
def cleanupFaults(self):
|
||||||
|
medias = fireEvent('media.with_status', 'ignored', with_doc = False, single = True)
|
||||||
|
for media in medias:
|
||||||
|
self.restatus(media.get('_id'))
|
||||||
|
|
||||||
def refresh(self, id = '', **kwargs):
|
def refresh(self, id = '', **kwargs):
|
||||||
handlers = []
|
handlers = []
|
||||||
ids = splitString(id)
|
ids = splitString(id)
|
||||||
|
|||||||
Reference in New Issue
Block a user