Skip to content

Instantly share code, notes, and snippets.

@xhochy
Last active December 16, 2015 02:49
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xhochy/5364976 to your computer and use it in GitHub Desktop.
Save xhochy/5364976 to your computer and use it in GitHub Desktop.
Control API and Tomahawk Apps

Tomahawk Apps

  • Integrate the same concept as Spotify Apps, but a bit more flexible (not only Apps, but more of a plugin-system)
  • HTML5+JavaScript
  • QWebkit View inside Tomahawk
  • Can have an entry in the TreeView on the left side in "Apps -> " and declare subentries
  • Add addtional functionality such as: ** Custom sharing ** Charts ** Loved Tracks
  • "Superresolvers"? -> Extend the current resolver architecture instead of creating a second extension ecosystem for Tomahawk, e.g. a
  • Deployment:
    • Synchotron
    • .axe Bundle (Updates?)
    • RSS Feed containing links to .axe files for autoupdating
  • Use cases:
    • Tighter integration of some services, e.g. a sharemypaylists.com integration
    • Easier addtion of more views, like Statistics about your listening habits

Control/Web API

  • "Web pages that access Tomahawk via Port 60210 (old playdar port).", extend the current QxtWebSlotService listening there
  • A generic REST API for accessing Tomahawk instances via network combined with a JS lib. Additionally some functions may be available through a HTML interface
  • The control function are basically that the same as exported via MPRIS
  • resolving functionality is already provided via Playdar, maybe some updates to this are fine
  • Authentication/Authorization
    • Each app has a (per-device/user) secret which it uses to sign all requests to the API
    • On each new secret, Tomahawk itself asks the user if he allows access for it
  • Use cases:
    • Remote controlling a Tomahawk instance (only need to open a website on an arbitrary device to change the track of your living room sound system)
    • toma.hk ;)
    • better Audio source/support for HTML5-Music-Hacks

What do these both share?

  • Both may have a common API core, like the same Classes/Interfaces for controlling the playback, working with Playlists, ..
  • "Apps" could be either possible as Websites as well as local Tomahawk Apps where the later one could do more things like Crossdomain-Requests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment