A lot of the unity-scopes do not work in ubuntu (for example the unity-scope-gmusicbrowser
), thus I've tried to "correct" them in order to get results in the dash.
Ok, I succeeded in doing this (for the file: /usr/share/unity-scopes/gmusicbrowser/unity_gmusicbrowser_deamon.py
: the "corrected" code: https://gist.github.com/wa4557/d6cc4ec5354bbb95042b (is it ok to post it here, even if the main part is not from me?)). This works flawlessly, and results from gmusicbrowser are now visible in the music-dash, like I want them to show up.
But I have still one small problem: How can i implement the available filters in the scopes? I think the relevant lines in the code are (line 372 ff):
def do_get_filters(self):
'''
Adds filters
'''
fs = Unity.FilterSet.new()
#if FILTERS:
#
return fs
Unfortunately however there's everything commented out, and there is no serious documentation or something similar
Filters in the scope would let me to filter Music, so for example to select only Rock music etc.; I think the screenshot explains what I mean (it's german).
As you can see, there are no results even though I have a lot of music from the 00s in my collection...
EDIT: I have found a scope with a similar loader (unity-gdrive-scope) : https://gist.github.com/wa4557/e3a9cdef5806dc3c13c9, where the filters are added. Frankly I don't understand how this works. But there is definitely something in the do_get_filters
function...