pillone / usntssearch

NZB Metasearch engine
pillone.github.io/usntssearch
263 stars 79 forks source link

Sickbeard Issue RSS #113

Open d0wnbiz opened 10 years ago

d0wnbiz commented 10 years ago

Getting some problem with sickbeard...

Jan-16 13:36:49 ERROR SEARCHQUEUE-BACKLOG-267970 :: Error trying to load DOMAIN XML data Jan-16 13:36:48 INFO SEARCHQUEUE-BACKLOG-267970 :: Searching for stuff we need from Crossing Lines season 1 Jan-16 13:36:48 INFO CP Server Thread-4 :: Seeing if we need any episodes from Crossing Lines season 1 Jan-16 13:14:02 INFO SEARCHQUEUE-RSS-SEARCH :: No needed episodes found on the RSS feeds Jan-16 13:14:02 ERROR SEARCHQUEUE-RSS-SEARCH :: Error trying to load DOMAIN RSS feed Jan-16 13:14:02 INFO SEARCHQUEUE-RSS-SEARCH :: Clearing DOMAIN cache and updating with new information Jan-16 13:14:02 INFO SEARCHQUEUE-RSS-SEARCH :: Searching all providers for any needed episodes Jan-16 13:14:02 INFO SEARCHQUEUE-RSS-SEARCH :: Beginning search for new episodes on RSS Jan-16 13:14:02 INFO SEARCHQUEUE-RSS-SEARCH :: Changing all old missing episodes to status WANTED Jan-16 13:13:59 INFO CP Server Thread-8 :: Search forced Jan-16 13:13:56 INFO CP Server Thread-8 :: No update needed Jan-16 13:13:54 INFO CP Server Thread-8 :: Checking if git needs an update

Does someone know how to fix?

Kind regards

pillone commented 10 years ago

where is the megasearch related error?

cytec commented 10 years ago

there are several errors with the api as far as i can see that:

  1. ?t=tvsearch&q=xyz always gives back World.NZB.Megasearch.Tour.S01E01
  2. &rid=2204 Rage ID gets ignored completely
  3. &season and &episode also not working in tvsearch

seems like the api isn't SickBeard ready at all...

cytec commented 10 years ago

ok, seems like ive got it some kind of figured out... maybe you should change some stuff in the sickbeard_req()...

  1. it only works if cat = 5030 or 5040 i think it should be up to the user which cat he likes to provide...
  2. i think the search should work for SickBeard also several reasons for this: 2.1 it searches the cache like this: http://myprovider/api?age=1000&apikey=xxxxxxx&t=tvsearch&cat=5000 2.2 sometimes (if there is no rid) SB uses ?q=SHOWNAME to query the results (which is completely ignored by NZBMegasearch) ex: http://myprovider/api?age=1000&apikey=xxxxxxx&t=tvsearch&cat=5000&q=myshowname

Like i said before 2.2 doesn't work for 2 reasons:

  1. it has no rid and is not cat 5030 or 5040
  2. if you change cat to 5030 or 5040 it still gives you back a unfiltered list even if a search query is provided

So here is my solution:

Why not delete the check for the cat? you can still append 5030 and 5040 if none is given, but there are a lot of indexers out there which are useing different cat ids (5010 for example) Also it would be great if the query (&q) would be passsed over the results if no rid is given, so you one gets only what he is looking for ;)

EDIT: Didn't test this but something like that should be fix that issues: ApiModule.py line 207 and following

def sickbeard_req(self):        
        if(self.args.has_key('rid')):
                #~ print 'requested series ID'
                #~ request rage
                tvrage_show = self.tvrage_getshowinfo(self.args['rid'])        
                if(len(tvrage_show['showtitle'])): 
                        return self.generate_tvserie_nabresponse(tvrage_show)                                
                else:
                        return render_template('api_error.html')                                
        elif(self.args.has_key('cat')):
                if self.args.has_key('q'):
                        #if user gives query, search for it
                        query = {'showtitle': self.args['q']} 
                        return self.generate_tvserie_nabresponse(query)
                #search user given categorys
                return self.generate_tvserie_nabresponse_broadcast(self.args["cat"]);
        else:        
                return render_template('api_default.html')

def generate_tvserie_nabresponse_broadcast(self, catIDs):

        addparams = dict(
                age= '1500',
                t='tvsearch',
                cat=catIDs)

        rawResults = SearchModule.performSearch('', self.cfg, self.cfg_ds, addparams)
        #~ rawResults = SearchModule.performSearch('', self.cfg, None, addparams)
        results = []
        #~ no cleaning just flatten in one array
        for provid in xrange(len(rawResults)):
                for z in xrange(len(rawResults[provid])):
                         results.append(rawResults[provid][z])

        self.searchstring = ''
        self.typesearch = 1                
        return self.cleanUpResultsXML(results)