Beispiel #1
0
    def _searchBook(self, **kwargs):
        if 'id' not in kwargs:
            self.data = 'Missing parameter: id'
            return
        else:
            self.id = kwargs['id']

        books = [{"bookid": id}]
        if lazylibrarian.USE_RSS():
            if 'wait' in kwargs:
                search_rss_book(books)
            else:
                threading.Thread(target=search_rss_book, name='API-SEARCHRSS', args=[books]).start()
        if lazylibrarian.USE_NZB():
            if 'wait' in kwargs:
                search_nzb_book(books)
            else:
                threading.Thread(target=search_nzb_book, name='API-SEARCHNZB', args=[books]).start()
        if lazylibrarian.USE_TOR():
            if 'wait' in kwargs:
                search_tor_book(books)
            else:
                threading.Thread(target=search_tor_book, name='API-SEARCHTOR', args=[books]).start()
        if not lazylibrarian.USE_RSS() and not lazylibrarian.USE_NZB() and not lazylibrarian.USE_TOR():
            self.data = "No search methods set, check config"
Beispiel #2
0
 def _forceBookSearch(self, **kwargs):
     if lazylibrarian.USE_NZB():
         if 'wait' in kwargs:
             search_nzb_book()
         else:
             threading.Thread(target=search_nzb_book,
                              name='API-SEARCHNZB',
                              args=[]).start()
     if lazylibrarian.USE_TOR():
         if 'wait' in kwargs:
             search_tor_book()
         else:
             threading.Thread(target=search_tor_book,
                              name='API-SEARCHTOR',
                              args=[]).start()
     if lazylibrarian.USE_RSS():
         if 'wait' in kwargs:
             search_rss_book()
         else:
             threading.Thread(target=search_rss_book,
                              name='API-SEARCHRSS',
                              args=[]).start()
     if not lazylibrarian.USE_RSS() and not lazylibrarian.USE_NZB(
     ) and not lazylibrarian.USE_TOR():
         self.data = "No search methods set, check config"
Beispiel #3
0
    def _searchBook(self, **kwargs):
        if 'id' not in kwargs:
            self.data = 'Missing parameter: id'
            return
        else:
            self.id = kwargs['id']

        books = [{"bookid": id}]
        if lazylibrarian.USE_RSS():
            if 'wait' in kwargs:
                search_rss_book()
            else:
                threading.Thread(target=search_rss_book, args=[books]).start()
        if lazylibrarian.USE_NZB():
            if 'wait' in kwargs:
                search_nzb_book()
            else:
                threading.Thread(target=search_nzb_book, args=[books]).start()
        if lazylibrarian.USE_TOR():
            if 'wait' in kwargs:
                search_tor_book()
            else:
                threading.Thread(target=search_tor_book, args=[books]).start()
        if not lazylibrarian.USE_RSS() and not lazylibrarian.USE_NZB(
        ) and not lazylibrarian.USE_TOR():
            self.data = "No search methods set, check config"
Beispiel #4
0
 def _forceRSSSearch(self, **kwargs):
     if lazylibrarian.USE_RSS():
         if 'wait' in kwargs:
             search_rss_book()
         else:
             threading.Thread(target=search_rss_book, name='API-SEARCHRSS', args=[]).start()
     else:
         self.data = 'No rss wishlists set, check config'
Beispiel #5
0
 def _forceBookSearch(self, **kwargs):
     if lazylibrarian.USE_NZB():
         if 'wait' in kwargs:
             search_nzb_book()
         else:
             threading.Thread(target=search_nzb_book, name='API-SEARCHNZB', args=[]).start()
     if lazylibrarian.USE_TOR():
         if 'wait' in kwargs:
             search_tor_book()
         else:
             threading.Thread(target=search_tor_book, name='API-SEARCHTOR', args=[]).start()
     if lazylibrarian.USE_RSS():
         if 'wait' in kwargs:
             search_rss_book()
         else:
             threading.Thread(target=search_rss_book, name='API-SEARCHRSS', args=[]).start()
     if not lazylibrarian.USE_RSS() and not lazylibrarian.USE_NZB() and not lazylibrarian.USE_TOR():
         self.data = "No search methods set, check config"