示例#1
0
文件: search.py 项目: Fursje/Anorak
 def run(self):
     while (True):
         try:
             print "Anorak searcher thread has woken up\n"
             animes = list(model.get_animes())
             for anime in animes:
                 self.searchAnime(anime)
             # refresh anime metadata only once a day at a random hour (so we don't DDOS anidb)
             if self.date < datetime.datetime.now():
                 refresher = MetadataRefreshThread(animes)
                 refresher.start()
                 self.setMetadataRefreshDate()
             print "Anorak searcher thread resuming sleep\n"
             # reload settings just in case the search frequency changed
             self.settings = settings.getSettings()
             time.sleep(60*float(self.settings.get("Anorak", "searchFrequency")))
         except:
             print "Something went wrong with the searching thread. Continuing anyways."
示例#2
0
 def run(self):
     while (True):
         try:
             print "Anorak searcher thread has woken up\n"
             animes = list(model.get_animes())
             for anime in animes:
                 self.searchAnime(anime)
             # refresh anime metadata only once a day at a random hour (so we don't DDOS anidb)
             if self.date < datetime.datetime.now():
                 refresher = MetadataRefreshThread(animes)
                 refresher.start()
                 self.setMetadataRefreshDate()
             print "Anorak searcher thread resuming sleep\n"
             # reload settings just in case the search frequency changed
             self.settings = settings.getSettings()
             time.sleep(
                 60 * float(self.settings.get("Anorak", "searchFrequency")))
         except:
             print "Something went wrong with the searching thread. Continuing anyways."
示例#3
0
 def GET(self):
     """ List anime """
     animes = model.get_animes()
     return render.index(animes, getAiring)
示例#4
0
 def GET(self):
     """ List anime """
     animes = model.get_animes()
     return render.index(animes, getAiring)