hslbck / gnome-shell-extension-radio

Gnome shell extension for listening to internet radio streams
GNU General Public License v3.0
144 stars 43 forks source link

No search provider functionality in GNOME 41 #182

Closed didierm closed 2 years ago

didierm commented 2 years ago

Setup

Issue

Trace

Additional info :

didierm commented 2 years ago

This issue appears to be fixed by wrapping (searchProvider.js) enableProvider() in a delayedRegistration loop. (refence : https://github.com/F-i-f/ssh-search-provider/blob/32daf4d78138ce039253159174cbf05799acc939/src/extension.js#L543)

searchProvider.js :


...
const MainLoop = imports.mainloop;
const Lang = imports.lang;
...
function enableProvider() {
    this._delayedRegistration = MainLoop.idle_add(Lang.bind(this, function() {
        if (!radioSearchProvider) {
            radioSearchProvider = new RadioSearchProvider();
            Main.overview._overview.controls._searchController._searchResults._registerProvider(radioSearchProvider);
        }
        this._delayedRegistration = null;
    }));
}

Note : function disableProvider() should be patched accordingly.

hslbck commented 2 years ago

Can you please make an example what you are searching for? I checked both on Wayland and Xorg and search provider for station name works just fine for me on Arch with GNOME Shell 41.1 and extension version 18

didierm commented 2 years ago
  1. The built-in search function for radio stations (https://www.radio-browser.info) works without issues (e.g. when searching with the string "nws", the radio station "VRT NWS" is found, and can be added to the extension's stations list), as expected.

  2. With the station added, subsequently using the GNOME Shell search function (see screenshot below) and entering the same search string "nws", the station is not found, unless the abovementioned patch is applied.

image

hslbck commented 2 years ago

Followed your steps as described above. Added VRT NWS from built in search to stations. Afterwards searched for it in overview and station was found as expected. No patch needed on my side

didierm commented 2 years ago

Thank you for taking the time to check this. I will try to reproduce on a clean Fedora 35 installation and report back.

didierm commented 2 years ago

Note : I have next to none knowledge of Gnome Shell programming, but superficially looking at the patch, I'd (wildly) guess from the used terminology "delayedRegistration" and "MainLoop.idle", this may be an e.g. timing-dependent, and hence more difficult to reproduce issue ?