This resolver does not work on mac.
Currenly, it does not want to init the logging defined in your script. this is my error message
13:54:50 [0]: SCRIPT_STDERR "/usr/local/bin/gmusic-resolver" " entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/Library/Python/2.7/site-packages/gmusic_resolver-0.1dev-py2.7.egg/gmusic_resolver/gmusic_resolver.py", line 25, in <module>
os.chdir(SHAREPATH)
OSError: [Errno 2] No such file or directory: '/Users/bjare/.local/share/Tomahawk'
You are trying to go into the folder ~/.local/share/Tomahawk which does not exist in the mac version of Tomahawk.
the share folder does exist, so either you do the dirty way and create one even if share folder isn't the logging output folder in mac.
A better solution would be to output it to ~/Library/Logs/gmusic-resolver.log or something like that i think.
Simply changing the sharepath from this
SHAREPATH = os.path.join( os.path.expanduser('~'), '.local', 'share', 'Tomahawk')
to this
SHAREPATH = os.path.join( os.path.expanduser('~'), 'Library', 'Logs')
That made the config button in the resolver list show at least.
Now, i got this error
14:25:18 [0]: SCRIPT_STDERR "/usr/local/bin/gmusic-resolver" " load_entry_point('gmusic-resolver==0.1dev', 'console_scripts', 'gmusic-resolver')()
File "/Library/Python/2.7/site-packages/gmusic_resolver-0.1dev-py2.7.egg/gmusic_resolver/gmusic_resolver.py", line 356, in main
gmLibrary = init(request)
File "/Library/Python/2.7/site-packages/gmusic_resolver-0.1dev-py2.7.egg/gmusic_resolver/gmusic_resolver.py", line 122, in init
userFile = open(os.path.join( CONFPATH, 'username.txt'), 'w')
IOError: [Errno 2] No such file or directory: '/Users/bjare/.config/Tomahawk/username.txt'
"
The .config directory exists in mac but same issue here, the Tomahawk configs are at another location which are ~/Library/Preferences/
Here's a manually written crappy diff
line 23
-- SHAREPATH = os.path.join( os.path.expanduser('~'), '.share', 'Tomahawk')
++ SHAREPATH = os.path.join( os.path.expanduser('~'), 'Library', 'Logs')
line 24
-- CONFPATH = os.path.join( os.path.expanduser('~'), '.config', 'Tomahawk')
++ CONFPATH = os.path.join( os.path.expanduser('~'), 'Library', 'Preferences')
line 106
-- userFile = open(os.path.join( CONFPATH, 'username.txt'))
++ userFile = open(os.path.join( CONFPATH, 'org.tomahawk-player.gmusic-resolver-username.txt'))
line 122
-- userFile = open(os.path.join( CONFPATH, 'username.txt'), 'w')
++ userFile = open(os.path.join( CONFPATH, 'org.tomahawk-player.gmusic-resolver-username.txt'), 'w')
So, now it seems to work!
Here's my gmusic resolver log
2013-05-19 14:59:01,241 INFO login succeeded
2013-05-19 14:59:01,314 INFO retrieving library tracks from google
2013-05-19 14:59:51,100 INFO 9541 tracks in library
2013-05-19 14:59:51,159 INFO Advertising settings
2013-05-19 14:59:51,162 INFO server running on port 8099
i'm very sorry if my post is badly written, this is one of my first github posts.
Atleast it works, and i hope that you are going to fix this :)
The reason why i did not make a push request is because i'm not sure how to nicely write a multi-platform script, so i give you the neccesary changes and you fix it :)
Works great on my linux laptop without any changes which was great!
thanks alot for your work!