poddb_client 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -24,7 +24,7 @@ website or iTunes. Poddb serves these three goals.
24
24
  * Ruby 1.9.x
25
25
  * wget
26
26
  * curl
27
- * mplayer or another media player
27
+ * mplayer, iTunes, or other media player
28
28
 
29
29
  To install Ruby 1.9.2, I recommend using the [RVM Version Manager][rvm].
30
30
 
@@ -277,11 +277,13 @@ Please submit them here:
277
277
  Poddb has two parts, a client and a server. The client is a hybrid
278
278
  Ruby/VimScript program packaged as a Ruby gem. The server is a Ruby
279
279
  [Sinatra][sinatra] app sitting in front of a [PostgreSQL][postgres] database.
280
+ I use the [Sequel][sequel] database toolkit to interface between Ruby and SQL.
280
281
  Podcast feeds are fetched with [curb][curb] and parsed with
281
282
  [nokogiri][nokogiri].
282
283
 
283
284
  [sinatra]:http://www.sinatrarb.com/
284
285
  [postgres]:http://www.google.com/search?aq=f&sourceid=chrome&ie=UTF-8&q=postgresql
286
+ [sequel]:http://sequel.rubyforge.org/
285
287
  [curb]:http://curb.rubyforge.org/
286
288
  [nokogiri]:http://nokogiri.org/
287
289
 
@@ -8,9 +8,11 @@ class PoddbClient
8
8
  'mplayer'
9
9
  elsif ENV['PODDB_MEDIA_PLAYER']
10
10
  ENV['PODDB_MEDIA_PLAYER']
11
- else
11
+ elsif RUBY_PLATFORM =~ /darwin/i
12
12
  # This fallback with open iTunes on OS X
13
13
  'open'
14
+ else
15
+ nil
14
16
  end
15
17
 
16
18
  def titleize(s, maxlength=20)
@@ -55,7 +57,11 @@ class PoddbClient
55
57
  item_id = File.read(DOWNLOAD_AND_PLAY_FILE).strip
56
58
  abort("No item id found") if item_id !~ /\d/
57
59
  download item_id
58
- exec("#{MEDIA_PLAYER} #@filename")
60
+ if MEDIA_PLAYER
61
+ exec("#{MEDIA_PLAYER} #@filename")
62
+ else
63
+ puts "No media player found to play the file!"
64
+ end
59
65
  end
60
66
  end
61
67
  end
@@ -1,3 +1,3 @@
1
1
  class PoddbClient
2
- VERSION = '0.2.3'
2
+ VERSION = '0.2.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: poddb_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: