-
-
Notifications
You must be signed in to change notification settings - Fork 217
add podverse search (first page only) #1615
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
5d19d59 to
043b9ba
Compare
share/gpodder/extensions/podverse.py
Outdated
| # see https://api.podverse.fm/api/v1/swagger#operations-podcast-getPodcasts | ||
| json_url = f"https://api.podverse.fm/api/v1/podcast?page=1&searchTitle={quote_plus(query)}&sort=top-past-week" | ||
|
|
||
| json_data = urlopen(json_url, headers={"accept": "application/json"}).json() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One of my searches retried three times, threw an exception to console and displayed a blank results pane with no indication in the UI it timed out. Should we catch the exception and open a dialog?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, but shouldn't it be in the gtkui/desktop/podcastdirectory code?
Really the podcast directory dialog should be reworked to remove the modal progress and display exceptions in place of content when any, don't you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes, we don't want an error dialog active with the progress dialog.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is a POC for a revamped podcast directory dialog:
- get rid of the left/right pane: select a provider full-width, then go to search/results panel full-width
- display any error in a text area in the results
To be discussed:
- provider list seems a bit tiny or too compressed together (alternative UI using buttons or listbox is provided, see it with the glade program)
- I want to get rid of tag cloud support: it has been disabled forever
- should pressing escape bring go back to provider list (currently closes the dialog)?
- better display of errors?
- progressbar only has 3 states: not started / in progress / finished at the moment.
Should we get into progressive results? Then the api for DirectoryProvider should change a bit: maybe yielding results a page at a time? This would be only useful for Podverse search, for result pagination to be honest. - I still got OPDS browser in the back of my mind, but I think a separate UI would be better (how to bolt navigation into the DirectoryProvider api and podcast directory interface?)
- Should we support search from CLI?
- move back/cancel/add buttons in headerbar, leaving select all/none on their own line at the bottom only when displaying results?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also: we should display images
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know how to use glade but do see a window with a button list that looks good, although it has the bottom bar from the query window which doesn't make sense on the provider window.
I don't know what tag cloud is, I'm fine with removing something that is disabled.
Ya, pressing escape could return to the provider list, and pressing it there could then close the window.
I was able to create a JustAWarning exception in directory.py, have podverse raise it for the short query and search error, and then catch it and not log the stacktrace to console. You have a FIXME right below that to suppress the stacktrace in the window, it could detect the JustAWarning exception and only display the error message in window, and display stacktrace for other exceptions.
Three progress states is better than none. Progressive results depends on how much time you want to invest in doing it. The first commit suggests it only fetches the first page, continuing to download pages could result in a lot of requests the user might not look at. Maybe add a button at bottom of list to fetch next page, and append it to list, keeping the button at bottom until no more pages.
Are you referring to #980? I don't see any UI in it.
It would be nice if CLI could do everything the GTK client did, but time...
Buttons can be in headerbar, but remember to detect CSD and keep them in the window if not enabled.
I like the new search UI way more than the old, but the window needs to be larger by default, and maybe save/restore its size.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delayed answer:
here is the flow I implemented:
Alternate to (1.) using buttons (not implemented, just mocked in glade):

ok to remove tag cloud
Implemented JustAWarning exception, used by providers as you suggested.
I'll keep the simple 3 progress states at the moment, so no more than the first page will be loaded from podverse search results.
Regarding opds (#980), it doesn't have a ui yet, but what I meant is that the updated UI I'm building right now is still not suited to it.
ok to implement podcast add later in gpo CLI.
Indeed the window is small. It changes size between states, which is not very smooth.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either listing style is fine, gpodder uses buttons on the first window a new user sees, and it uses a list for channels, episodes and downloads.
Allowing the user to resize the window is nice but it should save that size or just use a larger initial size so resizing isn't needed in most cases.
There is a bug returning to the provider list. Click podverse and do a search, then go back to the providers. The buttons remain along the bottom and I can click select all and add (didn't test what would be added). But clicking podverse again shows an empty query.
|
Moved the new code back to gPodderPodcastDirectory and fixed the Escape key behaviour. |
|
I don't know how to make the window big enough that it won't resize but now it remembers its size... |
auouymous
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, other than those issues. Could you rebase to pull in my commit that fixes linting?
|
Rebased and your remarks taken into account. |
|
Do you want to clean up the patches or just squash them? Edit: And are you ready to merge? |
|
Good idea: I refactored the history in 2 commits: podcastdirectory work and podsearch. |



No description provided.