Exaile-Soundmenu-Indicator
Exaile-Soundmenu-Indicator copied to clipboard
Do not use hardcoded paths
The plugin currently uses hardcoded paths in two places in the __init__.py
:
def _clean_tmp(type, exaile, data):
tmpdir = os.path.expanduser('~/.cache/exaile/')
for tmp in os.listdir(tmpdir):
if fnmatch.fnmatch(tmp, 'exaile-soundmenu*'):
os.remove(os.path.join(tmpdir, tmp))
Here xl.xdg.get_cache_dir()
should be used.
def init_indicate():
## for Maverick registration
try:
server = indicate.indicate_server_ref_default()
server.set_type('music.exaile')
server.set_desktop_file('/usr/share/applications/exaile.desktop')
server.show()
except:
pass
Here xl.xdg.get_data_dirs()
could be used to find the most appropriate directory.
Cool. I will fix this when I get time.