~davidc3/onehundredscopes/deviantart

« back to all changes in this revision

Viewing changes to src/unity-scope-deviantart

  • Committer: David Callé
  • Date: 2012-05-19 23:54:28 UTC
  • Revision ID: davidc@framli.eu-20120519235428-5ridc1jc19lwlnv8
Fix categories messed up

Show diffs side-by-side

added added

removed removed

Lines of Context:
72
72
                search.finished()
73
73
 
74
74
    def update_results_model(self, search, model, page):
75
 
        cat = 0
76
 
        if len(search) > 0:
77
 
            cat = 3
78
 
        else:
79
 
            cat = 0
80
75
        if self.check_filters("art_categories") == "brushes" or self.check_filters("art_categories") is None:
81
76
            i = None
82
77
            for i in self.deviantart(search, page):
84
79
                comment = i[1]
85
80
                uri = i[2]
86
81
                icon_hint = i[3]
87
 
                model.append (uri, icon_hint, cat,"text/html", title, comment, uri)
 
82
                model.append (uri, icon_hint, 3,"text/html", title, comment, uri)
88
83
            if i:
89
84
                if not search:
90
85
                    search = ''
91
86
                page = int(page)+24
92
 
                model.append ("more__"+search+"__"+str(page), "add", cat,"text/html", "More results", '', '')
 
87
                model.append ("more__"+search+"__"+str(page), "add", 3,"text/html", "More results", '', '')
93
88
 
94
89
    def check_filters(self, filter_name):
95
90
        try: