Giter Site home page Giter Site logo

robut-rdio's People

Contributors

jeremywadsack avatar justinweiss avatar radamant avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

robut-rdio's Issues

Broken specs for Rdio::Server

...............FF

Failures:

  1) Robut::Plugin::Rdio::Server should be able to tell HipChat what song is playing
     Failure/Error: last_response.should be_ok
       expected ok? to return true, got false
     # ./spec/server_spec.rb:19:in `block (2 levels) in <top (required)>'

  2) Robut::Plugin::Rdio::Server should degrade gracefully if a reply_callback has not been defined
     Failure/Error: last_response.should be_ok
       expected ok? to return true, got false
     # ./spec/server_spec.rb:26:in `block (2 levels) in <top (required)>'

Finished in 0.51483 seconds
17 examples, 2 failures

Searches should default to songs only

@dj find radio head

should find only songs that match 'radio head'

@dj find album stop making sense

should find albums matching 'stop making sense'

bonus:

@dj find songs by herbie hancock
@dj find albums by herbie hancock

Queueing a new song will start the web player

if (!callbackObject.playing) {
  element.rdio_play(data[0]);
  data = data.slice(1);
}

When querying the queue if the the player is not playing it will immediately replace the current playing track with the new one being queued.

To resolve this we should likely only start playing when we are stopped and the queue is empty. Not simply just not playing.

Robut::Plugin::Rdio crashes if you try to play an index from a search from a previous server session

  1. Start robut
  2. @dj find panthalassa
  3. Stop robut (Ctrl+C)
  4. Start robut
  5. @dj play 1

Expect it to either say "search results are no longer available; try your search again" or to persist the last results across sessions.

Stack Trace (at 85fdc12):

undefined method `[]' for nil:NilClass (NoMethodError)
robut-rdio-0.1.0/lib/results_manager.rb:24:in `results_for'
robut-rdio-0.1.0/lib/actions/play_results_action.rb:70:in `results_for'
robut-rdio-0.1.0/lib/actions/play_results_action.rb:50:in `handle'
robut-rdio-0.1.0/lib/robut-rdio.rb:117:in `handle'

Searching for an artist causes a crash

Frank   > @wolfman find artist breeders
Wolfman > Opps! I crashed....

This is making a call to Rdio and asking for Artists, however this may not have been implemented right or the value is not supported.

Queueing multiple songs from a stopped position will only play one

Steps To Reproduce

  1. Start the server.
  2. Queue several songs very quickly in a row
  3. Plugin will state that all the songs are queued.
  4. Viewing the queue will only show one of the songs playing and none in the queue.

This does not happen if Rdio is currently playing a track.

Won't play in my Chrome/Mac OS X

I keep getting a jQuery null ref exception whenever it queues up the first song:

Uncaught Error: Error calling method on NPObject.
d.extend._Deferred.f.resolveWith                         jquery.min.js:16
v                                                        jquery.min.js:16
d.support.ajax.d.ajaxTransport.send.c                    jquery.min.js:16

Now Playing - reports the track twice into the chat room

    callback.playingTrackChanged = function(playingTrack, sourcePosition) {
      if (playingTrack) {
        var title = callback.sourceTitle(playingTrack);
        $('#now_playing li').removeClass('playing');
        $('#now_playing li').eq(sourcePosition).addClass('playing');
        $('title').html(title + " - Powered by Rdio");
        $('#current_track').show().html("Now Playing: " + title);
    $.ajax({
           url: '/now_playing/' + escape(title),
           dataType: 'json'
        });
      } else {
        $('#current_track').hide();
      }
    }

This block seems to be called twice whenever a track changes.

When multiple tracks are enqueued only one appears with a count

When the user requests to play multiple tracks, Robut will respond each time for each of the tracks. For something like play all this can be a large wall of text.

  • If a user requests one track or two track, show the tracks that are enqueued.
  • If a user requests more than 2 tracks show the first track and a count of the remaining other tracks that were enqueued.

Now Playing - Artists or Tracks with special characters will not be reported

ArgumentError - invalid byte sequence in UTF-8: /Users/burtlo/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/uri/common.rb:230:in gsub'
/Users/burtlo/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/uri/common.rb:230:in unescape' /Users/burtlo/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/uri/common.rb:531:in unescape'
/Users/burtlo/.rvm/gems/ruby-1.9.2-p290@robut-rdio/gems/robut-rdio-0.1.0/lib/server/server.rb:72:in block in <class:Server>' /Users/burtlo/.rvm/gems/ruby-1.9.2-p290@robut-rdio/gems/sinatra-1.3.1/lib/sinatra/base.rb:1212:in call'
/Users/burtlo/.rvm/gems/ruby-1.9.2-p290@robut-rdio/gems/sinatra-1.3.1/lib/sinatra/base.rb:1212:in block in compile!' /Users/burtlo/.rvm/gems/ruby-1.9.2-p290@robut-rdio/gems/sinatra-1.3.1/lib/sinatra/base.rb:772:in []'
/Users/burtlo/.rvm/gems/ruby-1.9.2-p290@robut-rdio/gems/sinatra-1.3.1/lib/sinatra/base.rb:772:in block (3 levels) in route!' /Users/burtlo/.rvm/gems/ruby-1.9.2-p290@robut-rdio/gems/sinatra-1.3.1/lib/sinatra/base.rb:788:in route_eval'
/Users/burtlo/.rvm/gems/ruby-1.9.2-p290@robut-rdio/gems/sinatra-1.3.1/lib/sinatra/base.rb:772:in block (2 levels) in route!' /Users/burtlo/.rvm/gems/ruby-1.9.2-p290@robut-rdio/gems/sinatra-1.3.1/lib/sinatra/base.rb:821:in block in process_route'
/Users/burtlo/.rvm/gems/ruby-1.9.2-p290@robut-rdio/gems/sinatra-1.3.1/lib/sinatra/base.rb:819:in catch' /Users/burtlo/.rvm/gems/ruby-1.9.2-p290@robut-rdio/gems/sinatra-1.3.1/lib/sinatra/base.rb:819:in process_route'
/Users/burtlo/.rvm/gems/ruby-1.9.2-p290@robut-rdio/gems/sinatra-1.3.1/lib/sinatra/base.rb:771:in block in route!' /Users/burtlo/.rvm/gems/ruby-1.9.2-p290@robut-rdio/gems/sinatra-1.3.1/lib/sinatra/base.rb:770:in each'
/Users/burtlo/.rvm/gems/ruby-1.9.2-p290@robut-rdio/gems/sinatra-1.3.1/lib/sinatra/base.rb:770:in route!' /Users/burtlo/.rvm/gems/ruby-1.9.2-p290@robut-rdio/gems/sinatra-1.3.1/lib/sinatra/base.rb:886:in dispatch!'
/Users/burtlo/.rvm/gems/ruby-1.9.2-p290@robut-rdio/gems/sinatra-1.3.1/lib/sinatra/base.rb:706:in block in call!' /Users/burtlo/.rvm/gems/ruby-1.9.2-p290@robut-rdio/gems/sinatra-1.3.1/lib/sinatra/base.rb:871:in block in invoke'
/Users/burtlo/.rvm/gems/ruby-1.9.2-p290@robut-rdio/gems/sinatra-1.3.1/lib/sinatra/base.rb:871:in catch' /Users/burtlo/.rvm/gems/ruby-1.9.2-p290@robut-rdio/gems/sinatra-1.3.1/lib/sinatra/base.rb:871:in invoke'
/Users/burtlo/.rvm/gems/ruby-1.9.2-p290@robut-rdio/gems/sinatra-1.3.1/lib/sinatra/base.rb:706:in call!' /Users/burtlo/.rvm/gems/ruby-1.9.2-p290@robut-rdio/gems/sinatra-1.3.1/lib/sinatra/base.rb:692:in call'
/Users/burtlo/.rvm/gems/ruby-1.9.2-p290@robut-rdio/gems/rack-protection-1.1.4/lib/rack/protection/xss_header.rb:22:in call' /Users/burtlo/.rvm/gems/ruby-1.9.2-p290@robut-rdio/gems/rack-protection-1.1.4/lib/rack/protection/path_traversal.rb:16:in call'
/Users/burtlo/.rvm/gems/ruby-1.9.2-p290@robut-rdio/gems/rack-protection-1.1.4/lib/rack/protection/json_csrf.rb:17:in call' /Users/burtlo/.rvm/gems/ruby-1.9.2-p290@robut-rdio/gems/rack-protection-1.1.4/lib/rack/protection/base.rb:47:in call'
/Users/burtlo/.rvm/gems/ruby-1.9.2-p290@robut-rdio/gems/rack-protection-1.1.4/lib/rack/protection/xss_header.rb:22:in call' /Users/burtlo/.rvm/gems/ruby-1.9.2-p290@robut-rdio/gems/rack-1.3.5/lib/rack/nulllogger.rb:9:in call'
/Users/burtlo/.rvm/gems/ruby-1.9.2-p290@robut-rdio/gems/rack-1.3.5/lib/rack/head.rb:9:in call' /Users/burtlo/.rvm/gems/ruby-1.9.2-p290@robut-rdio/gems/sinatra-1.3.1/lib/sinatra/showexceptions.rb:21:in call'
/Users/burtlo/.rvm/gems/ruby-1.9.2-p290@robut-rdio/gems/sinatra-1.3.1/lib/sinatra/base.rb:1334:in block in call' /Users/burtlo/.rvm/gems/ruby-1.9.2-p290@robut-rdio/gems/sinatra-1.3.1/lib/sinatra/base.rb:1403:in synchronize'
/Users/burtlo/.rvm/gems/ruby-1.9.2-p290@robut-rdio/gems/sinatra-1.3.1/lib/sinatra/base.rb:1334:in call' /Users/burtlo/.rvm/gems/ruby-1.9.2-p290@robut-rdio/gems/thin-1.2.11/lib/thin/connection.rb:84:in block in pre_process'
/Users/burtlo/.rvm/gems/ruby-1.9.2-p290@robut-rdio/gems/thin-1.2.11/lib/thin/connection.rb:82:in catch' /Users/burtlo/.rvm/gems/ruby-1.9.2-p290@robut-rdio/gems/thin-1.2.11/lib/thin/connection.rb:82:in pre_process'
/Users/burtlo/.rvm/gems/ruby-1.9.2-p290@robut-rdio/gems/eventmachine-0.12.10/lib/eventmachine.rb:1060:in call' /Users/burtlo/.rvm/gems/ruby-1.9.2-p290@robut-rdio/gems/eventmachine-0.12.10/lib/eventmachine.rb:1060:in block in spawn_threadpool'`

Steps to Reproduce

  • @dj play sigur ros

Remove from Rdio results all incomplete songs

Rdio server will return to the user results that contain sample versions or versions that are not playable. These should be removed from the results to ensure that the playback experience is premium.

Queueing multiple songs from one result set

Frank   > @wolfman find breeders - last splash
Wolfman > 0: The Breeders - Last Splash - Cannonball
1: The Breeders - Last Splash - No Aloha
2: The Breeders - Last Splash - Divine Hammer
3: The Breeders - Last Splash - New Year
4: The Breeders - Last Splash - Invisible Man
5: The Breeders - Last Splash - Roi
6: The Breeders - Last Splash - Flipsiide
7: The Breeders - Last Splash - I Just Wanna Get Along
8: The Breeders - Last Splash - Saints
9: The Breeders - Last Splash - S.O.S.
Frank   > @wolfman play 1, 2, 8
Frank   > @wolfman play 3-4 7-9

User is able to queue multiple results at the same time using commas as a separator and dashes to represent ranges.

Frank   > @wolfman play all results

User is able to queue all the results that were returned in a single command

User is able to request the history of previously played songs.

Given the rdio has played the following songs:
  | artist       | album           | track                      |
  | Radiohead    | OK Computer     | No alarms and no surprises |  
  | Beastie Boys | Sabatoge        | Sabotage                   |
  | Liam Lynch   | Fake Songs      | United States of Whatever  |
When I send the message:
  | @dj show me the last 2 songs |
Then I should see the following songs in the history results:
  | Liam Lynch   | Fake Songs      | United States of Whatever  | 
  | Beastie Boys | Sabatoge        | Sabotage                   |

User is able to queue a track that is at the 11th position in a search result set

Currently the search results for an artist - album will show the first 10 tracks in the results. Tracks that are higher are not visible.

It would be useful to be able to see the next set of results

user > @dj find beatles white album
dj > results....
0...
...
10...
user > @dj more
dj > results ...
11...
...
20...

This would find the next 10 results to show but start counting out from 11 to 20.

User is able to request the queue of songs

Given the rdio has queued the following songs:
  | artist       | album           | track                      |
  | Radiohead    | OK Computer     | No alarms and no surprises |  
  | Beastie Boys | Sabatoge        | Sabotage                   |
  | Liam Lynch   | Fake Songs      | United States of Whatever  |
When I send the message:
  | @dj show me the queue |
Then I should see the following songs in the history results:
  | Radiohead    | OK Computer     | No alarms and no surprises |  
  | Beastie Boys | Sabatoge        | Sabotage                   |
  | Liam Lynch   | Fake Songs      | United States of Whatever  |

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.