Skip to content

Conversation

@elelay
Copy link
Member

@elelay elelay commented Mar 15, 2024

No description provided.

@elelay elelay force-pushed the search-podverse branch 4 times, most recently from 5d19d59 to 043b9ba Compare March 15, 2024 22:49
# 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()
Copy link
Member

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?

Copy link
Member Author

@elelay elelay Apr 16, 2024

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?

Copy link
Member

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.

Copy link
Member Author

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?

Copy link
Member Author

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

Copy link
Member

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.

Copy link
Member Author

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:

  1. select a provider list
  2. example selecting using podvers search podverse search
  3. example selecting using gpodder.net top 50 top50

Alternate to (1.) using buttons (not implemented, just mocked in glade):
buttons

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.

Copy link
Member

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.

@elelay
Copy link
Member Author

elelay commented Jun 18, 2024

Moved the new code back to gPodderPodcastDirectory and fixed the Escape key behaviour.

@elelay
Copy link
Member Author

elelay commented Jun 18, 2024

I don't know how to make the window big enough that it won't resize but now it remembers its size...

Copy link
Member

@auouymous auouymous left a 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?

@elelay elelay force-pushed the search-podverse branch from 85c6027 to 3f093fa Compare June 22, 2024 13:33
@elelay
Copy link
Member Author

elelay commented Jun 22, 2024

Rebased and your remarks taken into account.
Thanks for catching my errors :-)

@auouymous
Copy link
Member

auouymous commented Jun 23, 2024

Do you want to clean up the patches or just squash them?

Edit: And are you ready to merge?

@elelay elelay force-pushed the search-podverse branch from 3f093fa to 2f03a5e Compare June 23, 2024 09:22
@elelay elelay merged commit 73aaeae into master Jun 23, 2024
@elelay
Copy link
Member Author

elelay commented Jun 23, 2024

Good idea: I refactored the history in 2 commits: podcastdirectory work and podsearch.
Thanks

@auouymous auouymous deleted the search-podverse branch June 24, 2024 04:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants