diff --git a/Gemfile.lock b/Gemfile.lock index 9d4268f..6875dbb 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -148,7 +148,7 @@ GEM net-ssh (2.3.0) net-ssh-gateway (1.1.0) net-ssh (>= 1.99.1) - nokogiri (1.5.2) + nokogiri (1.5.5) oauth2 (0.8.0) faraday (~> 0.8) httpauth (~> 0.1) @@ -163,7 +163,7 @@ GEM omniauth-oauth2 (1.1.1) oauth2 (~> 0.8.0) omniauth (~> 1.0) - pandora_client (0.1.0) + pandora_client (0.1.2) crypt19 (~> 1.2.1) faraday (~> 0.8) nokogiri (~> 1.5.2) diff --git a/README.md b/README.md index 71e65b7..88a2052 100644 --- a/README.md +++ b/README.md @@ -71,6 +71,13 @@ $ echo 'FACEBOOK_APP_ID=111111111111111' >> .env $ echo 'FACEBOOK_APP_SECRET=abcdefabcdefabcdefabcdefabcdefab' >> .env ``` +Add your SoundCloud Client ID. Note that Warble currently exposes this +to end users. Get a new ID from http://soundcloud.com/you/apps/new + +```sh +$ echo 'SOUNDCLOUD_CLIENT_ID=soundcloud_client_id' >> .env +``` + Add credentials for a Pandora partner. Pick one from : diff --git a/app/assets/images/soundcloud.png b/app/assets/images/soundcloud.png new file mode 100644 index 0000000..1eb8c9c Binary files /dev/null and b/app/assets/images/soundcloud.png differ diff --git a/app/assets/javascripts/application.js.coffee b/app/assets/javascripts/application.js.coffee index 97fb17e..d8690c5 100644 --- a/app/assets/javascripts/application.js.coffee +++ b/app/assets/javascripts/application.js.coffee @@ -8,7 +8,6 @@ #= require faye-browser #= require jquery.mapkey #= require tooltip - #= require_self #= require_tree ./components @@ -30,6 +29,7 @@ jQuery(document).ready ($) -> 'hype/popular/3days/:page' : 'hypePopular3Days' 'hype/popular/week/:page' : 'hypePopularWeek' 'hype/:user/:page' : 'hypeUser' + 'soundcloud' : 'soundcloud' '*unmatched' : 'home' initialize: -> @@ -41,15 +41,16 @@ jQuery(document).ready ($) -> @hypeSongs = new Warble.HypeSongList # initialize views - @headerView = new Warble.HeaderView model: @jukebox - @currentPlayView = new Warble.CurrentPlayView model: @jukebox - @playlistView = new Warble.PlaylistView collection: @playlist - @serviceChooserView = new Warble.ServiceChooserView - @pandoraAuthView = new Warble.PandoraCredentialsView - @pandoraStationsView = new Warble.PandoraStationsView collection: @stationList - @youtubeSearchView = new Warble.YoutubeSearchView - @hypeChooserView = new Warble.HypeFeedsView - @hypeSongsView = new Warble.HypeSongsView collection: @hypeSongs + @headerView = new Warble.HeaderView model: @jukebox + @currentPlayView = new Warble.CurrentPlayView model: @jukebox + @playlistView = new Warble.PlaylistView collection: @playlist + @serviceChooserView = new Warble.ServiceChooserView + @pandoraAuthView = new Warble.PandoraCredentialsView + @pandoraStationsView = new Warble.PandoraStationsView collection: @stationList + @youtubeSearchView = new Warble.YoutubeSearchView + @hypeChooserView = new Warble.HypeFeedsView + @hypeSongsView = new Warble.HypeSongsView collection: @hypeSongs + @soundcloudSearchView = new Warble.SoundcloudSearchView # load data @jukebox.fetch() @@ -146,6 +147,9 @@ jQuery(document).ready ($) -> @hypeSongs.url = "/hype?username=#{encodeURIComponent(user)}&page=#{encodeURIComponent(page)}" @hypeSongs.fetch() + soundcloud: -> + #SC.initialize client_id: "dae39b5eb16934e43c93209cb65051ee" + @switchPane @soundcloudSearchView window.workspace = workspace = new Warble.WorkspaceRouter Backbone.history.start pushState: true diff --git a/app/assets/javascripts/templates/soundcloud.jst.hbs b/app/assets/javascripts/templates/soundcloud.jst.hbs new file mode 100644 index 0000000..58bc49e --- /dev/null +++ b/app/assets/javascripts/templates/soundcloud.jst.hbs @@ -0,0 +1,12 @@ + + +

SoundCloud

+ + +Search + +
diff --git a/app/assets/javascripts/templates/soundcloud_preview.jst.hbs b/app/assets/javascripts/templates/soundcloud_preview.jst.hbs new file mode 100644 index 0000000..46c16d6 --- /dev/null +++ b/app/assets/javascripts/templates/soundcloud_preview.jst.hbs @@ -0,0 +1,2 @@ +