Skip to content

Commit 51cbf6a

Browse files
Switch from return to yield.
1 parent 91fe4a5 commit 51cbf6a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/gpodder/plugins/podverse.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ def __init__(self):
3737

3838
def on_search(self, query):
3939
page = 1
40-
result_data = []
4140

4241
while True:
4342
json_url = "https://api.podverse.fm/api/v1/podcast?page={}&searchTitle={}&sort=top-past-week".format(page, urllib.parse.quote(query))
@@ -54,11 +53,10 @@ def on_search(self, query):
5453
image = entry["imageUrl"]
5554
description = entry["description"]
5655

57-
result_data.append(directory.DirectoryEntry(title, url, image, -1, description))
56+
yield(directory.DirectoryEntry(title, url, image, -1, description))
5857

5958
if entry_count < PAGE_SIZE:
6059
break
6160

6261
page += 1
6362

64-
return result_data

0 commit comments

Comments
 (0)