Beispiel #1
0
 def start():
     """Start of the program"""
     print("LOADING Config...", end=" ")
     CONFIG.load()
     print("DONE")
     print("SETTING UP DATABASE...", end=" ")
     Database.setup()
     print("DONE")
     print("LOADING AUTHENTICATION...", end=" ")
     Auth.start()
     print("DONE")
     print("LOADING SCRAPER...", end=" ")
     Scraper.start()
     print("DONE")
     print("LOADING LIBRARIES...", end=" ")
     Library.start()
     print("DONE")
     if Ripper.enabled:
         print("STARTING RIPPER...", end=" ")
         Ripper.start()
         print("DONE")
     print("STARTING WEBSERVICES...", end=" ")
     Webserver.start()
     print("DONE")
     print("TACKEM HAS STARTED")
 def exit_on_cr(self,input):
     if input == 'enter':
         url = self.listbox.get_focus()[0].get_attr_map()['url']
         self.show_status.set_text("Ripping from %s" % self.listbox.get_focus()[0].get_attr_map()['title'])
         logging.warn(url)
         Ripper.start(url)
     elif input == 'p':
         Player.start()
     elif input == ' ':
         Player.pause()
     elif input in ['/','-']:
         Player.voldown()
     elif input in ['*','+']:
         Player.volup()
     elif input == 'q':
         raise urwid.ExitMainLoop()
Beispiel #3
0
    def check(self):
        now = time.localtime(time.time())
        #print now[4], self.__last_check[4]
        if now[4] != self.__last_check[4]: #if not the same minute   
            for name, params in self.__podcasts_conf.items():
                #print "DAY", now[6], params[DAY]
                timeshift = self.__getTimeShift(params)
                now_adjusted = time.localtime(time.time() + (timeshift*3600))
                if not ( (now_adjusted[6]) in params[DAY]): 
                    continue
                dec_time = now_adjusted[3]*100+now_adjusted[4]
                #print "TIME", dec_time, params[TIME]
                if not dec_time in params[TIME]: continue
                LOG.msg("SHD: Scheduling activated for %s %d" % (name, dec_time), 2)                    
                ripper = Ripper(name, params, self.__settings, self.__updated_q, self.__ev_terminate)
                ripper.start()

            self.__last_check = now