File tree Expand file tree Collapse file tree 1 file changed +12
-23
lines changed
Expand file tree Collapse file tree 1 file changed +12
-23
lines changed Original file line number Diff line number Diff line change @@ -122,30 +122,19 @@ def _build_discovery_tasks_phase1(
122122 if top_genres :
123123 genre_ids = "|" .join ([str (g [0 ]) for g in top_genres ])
124124 for page in range (1 , pages_per_query + 1 ):
125- tasks .append (
126- self ._fetch_discovery (
127- content_type ,
128- {
129- "with_genres" : genre_ids ,
130- "sort_by" : "popularity.desc" ,
131- "vote_count.gte" : 500 ,
132- "page" : page ,
133- ** base_params ,
134- },
125+ for sort_by_option in ["popularity.desc" , "vote_average.desc" ]:
126+ tasks .append (
127+ self ._fetch_discovery (
128+ content_type ,
129+ {
130+ "with_genres" : genre_ids ,
131+ "sort_by" : sort_by_option ,
132+ "vote_count.gte" : 500 ,
133+ "page" : page ,
134+ ** base_params ,
135+ },
136+ )
135137 )
136- )
137- tasks .append (
138- self ._fetch_discovery (
139- content_type ,
140- {
141- "with_genres" : genre_ids ,
142- "sort_by" : "vote_average.desc" ,
143- "vote_count.gte" : 500 ,
144- "page" : page ,
145- ** base_params ,
146- },
147- )
148- )
149138
150139 # Query 2: Top Keywords - fetch multiple pages
151140 if top_keywords :
You can’t perform that action at this time.
0 commit comments