Coder Social home page Coder Social logo

google-music-resolver's Introduction

Google-Music-Resolver

A resolver for the Tomahawk music player, based on Simon Weber's Unofficial Google Music API.

The resolver is under heavy develpoment and might crash, corrupt your data or even eat your hamster. Use at your own risk!

Please report bugs, wishes and issues here.

##Usage

###Installation

Requirements:

  • Unofficial Google Music API Unofficial Google Music API, currently only version < 2012.11.09 supported. Check Morguls repo for a branch that works with the lastest API.
  • keyring
  • Python 2.7 or 3.3 (other versions might work, but are untested
  • Tomahawk

###Getting Started

Start Tomahawk, open setting, go to "Resolvers", click "add from file" and choose the gmusic-resolver.py script (on linux systems /usr/bin/gmusic-resolver.py). Notice the hypen, not an underscore!

If a little wrench appears on the right hand side at the bottom of the list, the resolver is running. Click the wrench, enter your credentials and hit OK. Your password is stored in your operating systems password storage, which might ask for permission now. On every start, the resolver fetches your library information which may take a few seconds before its ready to resolve.

Tomahawk does not provide a way to tell if the login was succesful or not. Check the logfile under ~/.local/share/Tomahawk/gmusic-resolver.log for warnings and errors in case it doesnt work correctly.


Copyright 2013 Kilian Lackhove [email protected].

Licensed under the GPLv2. See LICENSE.txt

google-music-resolver's People

Contributors

lackhove avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

google-music-resolver's Issues

No mac support

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!

debug help

Hi, I've tried this and not getting the little gear icon appear in the listing in tomahawk. tried the logs you mentioned and the tomahawk debug and log, nothing there either, any ideas how I can debug further?

ImportError: gmusicapi.Api is deprecated

Unable to get this working on Mac OSX 10.9. Tried troubleshooting the missing ~/.local/share folder in the script, but now seeing an import error and gmusicapi method deprecation notice.

Have you tried installing lately with success?

--Alex

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.