Skip to content

Instantly share code, notes, and snippets.

/*
* (c) 2011 Dominik Schmidt <domme@tomahawk-player.org>
*/
var DummyResolver = Tomahawk.extend(TomahawkResolver,
{
settings:
{
name: 'Dummy Resolver',
weight: 75,
<iframe src="http://toma.hk/p/{PLAYLIST_ID}?embed=true" width="550" height="430" scrolling="no" frameborder="0" allowtransparency="true" ></iframe>
<iframe src="http://toma.hk/embed.php?artist={ARTIST_NAME}&title={TRACK_NAME}" width="200" scrolling="no" height="200" frameborder="0" allowtransparency="true" ></iframe>
<iframe src="http://toma.hk/album/{ARTIST_NAME}/{ALBUM_NAME}?embed=true" width="550" height="430" scrolling="no" frameborder="0" allowtransparency="true" ></iframe>
<iframe src="http://toma.hk/album/<artist name>/<album name>?embed=true" width="550" height="430" scrolling="no" frameborder="0" allowtransparency="true" ></iframe>
http://toma.hk/search.php?q=http://www.rdio.com/artist/Various_Artists/album/Project_Bicycle/
Version 0.1.0:
* New station types (mood & style) along with tons of station optimizations
* Add Stations under own node in sidebar (different than playlists)
* Drag song to 'new station' to create song-seeded station
* Fixed stations so they resolve against all available sources (not just local and SIP)
* Added completion for artists with echonest artist/suggest path
* SOCKS5 proxy support. Noproxy hosts are also supported but no wildcard
support (yet).
* Fix issue where track resolving spinner never stopped if tracks were
@jherskowitz
jherskowitz / soundcloud_resolver.py
Created April 27, 2011 17:29
Not yet working Soundcloud resolver
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys, traceback
import os, getopt
from httplib import HTTP
import simplejson as json
from urlparse import urlparse
import urllib, urllib2
import socket
Playgrub.source.url = 'http://.*\.simfy.de.*';
Playgrub.source.error = 'Sorry, no tracks were found.'
Playgrub.source.scrape = function() {
$("ul.track").each(function() {
var artist = $(this).find('li.artist_name > a').text();
var song = $(this).find('li.track_title_and_version_title > span').text();
Playgrub.playlist.add_track(artist, song);
if (window.url.indexOf("pitchfork.com/forkcast") != -1)
{
Playgrub.source.url = 'http://pitchfork\.com.*/forkcast.*';
Playgrub.source.error = 'Tomahawk currently supports the Track Reviews & Forkcast pages only. Please check your url.';
Playgrub.source.scrape = function() {
$("h1.title").each(function () {
var song_result = $($(this).children('a')[1]).text();
song_result = song_result.replace('"', '');
var artist = $($(this).children('a')[0]).text();
Playgrub.playlist.add_track(artist, song_result);