Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added bundler for gem dependency, added some installation & usage notes.

  • Loading branch information...
commit ac3073c584bffa75772161460c1ec6b458f5e5de 1 parent 6535ea6
@ndbroadbent ndbroadbent authored committed
Showing with 54 additions and 19 deletions.
  1. +2 −0  .gitignore
  2. +5 −0 Gemfile
  3. +23 −0 README.md
  4. +24 −19 remora
View
2  .gitignore
@@ -0,0 +1,2 @@
+.bundle
+
View
5 Gemfile
@@ -0,0 +1,5 @@
+source "http://rubygems.org"
+gem "luck"
+gem "eventmachine"
+gem "json"
+
View
23 README.md
@@ -11,6 +11,28 @@ has a chance of working under Windows, provided that you have installed
Ruby and MPlayer. This is also better than using a temporary file on the
hard disk because Remora will never store any song to disk.
+Installation / Usage
+--------------------
+
+1. Clone the git repository
+
+ $ git clone http://github.com/danopia/remora.git
+
+ $ cd remora/
+
+2. Install bundler
+
+ $ sudo gem install bundler
+
+3. Install bundled gem dependencies
+
+ $ bundle install
+
+4. Start remora
+
+ $ ./remora
+
+
Legal
-----
Unfortunately, the public API no longer provides stream access. Remora
@@ -34,3 +56,4 @@ below attempt at legalese.
THIS APPLICATION DOES NOT COME WITH ANY WARRANT WHATSOEVER. This application IS NOT to be used for downloading copyrighted works. ANY CHANGES TO THE SOURCE CODE BY THE END-USER MAY CAUSE LEGAL VIOLATIONS! THIS APPLICATION IS STRICTLY MEANT TO PROVIDE AN ALTERNATIVE TO THE FLASH CLIENT. This application may be illegal in some countries. If you are unsure, please contact your lawyer for legal advice. NEITHER THE AUTHOR OR ANY OTHER PARTY RELATED TO THIS APPLICATION IS RESPONSIBLE FOR YOUR MISUSE AND/OR ILLEGAL USAGE! Remora is not associated with Grooveshark, EMG, Escape Media Group, Inc, any of their partners, SharkByte, GitHub, RIAA, or grooveshark.com in any way.
YOU EXPRESSLY ACKNOWLEDGE THAT YOU HAVE READ THIS AGREEMENT AND UNDERSTAND THE RIGHTS, OBLIGATIONS, TERMS AND CONDITIONS SET FORTH HEREIN. BY CONTINUING TO DOWNLOAD THIS SOFTWARE, YOU EXPRESSLY CONSENT TO BE BOUND BY ITS TERMS AND CONDITIONS.
+
View
43 remora
@@ -1,5 +1,9 @@
#!/usr/bin/env ruby
+require 'rubygems'
+require 'bundler'
+Bundler.setup
+
disable_dbus = ARGV.delete '--no-dbus'
disable_drb = ARGV.delete '--no-drb'
@@ -67,25 +71,25 @@ trap 'INT' do
end
begin
-
+
def show_login display
display.focus :login, :user
display[:login].show!
display.dirty! :login
end
-
+
display.pane :queue, 1, 1, 20, -15, 'Queue' do
control :songs, Luck::ListBox, 1, 1, -1, -1 do
number!
-
+
on_submit do |list, title| # TODO: Song is a String here, of just the title
index = list.data.index(title)
song = client.queue[index]
-
+
if client.now_playing
client.player.stop
end
-
+
Thread.new do
begin
client.queue.play_radio index
@@ -95,9 +99,9 @@ begin
exit
end
end
-
+
#~ next unless song.is_a? GrooveShark::Song
- #~
+ #~
#~ pane = Remora::SongInfoPane.new(display, song)
#~ display.pane :songinfo, pane
#~ display.modal = pane
@@ -105,13 +109,13 @@ begin
end
end
end
-
+
display.pane :threads, 1, -15, 20, -1, 'Threads' do
control :list, Luck::ListBox, 1, 1, -1, -1 do
number!
end
end
-
+
Thread.new {
loop {
display[:threads, :list].data = Thread.list.map {|t| t.object_id }
@@ -124,7 +128,7 @@ begin
control :search, Luck::CommandBox, 2, 1, -2, 1 do
self.label = 'Search'
self.text = ''
-
+
focus!
end
control :results, Luck::ListBox, 1, 2, -1, -1 do
@@ -145,12 +149,12 @@ begin
end
control :position, Luck::Label, 1, 3, -1, 3
end
-
+
display[:main, :results].on_submit do |list, song|
next unless song.is_a? GrooveShark::Song
-
+
client.queue << song
-
+
unless client.now_playing
Thread.new do
begin
@@ -163,18 +167,18 @@ begin
end
end
end
-
+
$results = nil
display[:main, :search].on_submit do |box, query|
next if query.empty?
-
+
if query.to_i.to_s == query && $results
index = query.to_i - 1
next if index < 0 || index > $results.size
-
+
song = $results[index]
client.queue << song
-
+
unless client.now_playing
Thread.new do
begin
@@ -189,9 +193,9 @@ begin
elsif query =~ /^\/info ([0-9]+)$/ && $results
index = $1.to_i - 1
next if index < 0 || index > $results.size
-
+
song = $results[index]
-
+
pane = Remora::SongInfoPane.new(display, song)
display.pane :songinfo, pane
display.modal = pane
@@ -227,3 +231,4 @@ rescue => ex
puts ex.class, ex.message, ex.backtrace
exit
end
+
Please sign in to comment.
Something went wrong with that request. Please try again.