poddb_client 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.markdown CHANGED
@@ -146,6 +146,10 @@ downloads.
146
146
 
147
147
  You can use `-t audio` to limit search results to audio downloads.
148
148
 
149
+ Note that the (video|audio) options don't always filter correctly because some
150
+ feeds give videos the media type 'audio/mpeg'. These videos won't show up in
151
+ the current version of Poddb if you use the `-t video` flag.
152
+
149
153
  Two other command flags that are useful are `-o` and `-d`. `-d n` lets you
150
154
  limit the scope of the search to episodes published in the last _n_ days. So
151
155
 
@@ -207,12 +211,14 @@ Examples:
207
211
  APM-Marketplace.09-14-11-Marketplace.poddb_16_55726.mp3
208
212
 
209
213
  If you press `D`, Poddb will quit the Vim interface immediately and begin
210
- downloading the episode that was under the cursor. After the download is complete,
211
- Poddb will automatically start playing the episode with `mplayer`.
212
-
213
- If you don't want to use `mplayer` or don't have it installed. You can make
214
- Poddb launch a different media player by setting the `PODDB_MEDIA_PLAYER`
215
- environment variable and exporting it. For example, to make Poddb use `totem`:
214
+ downloading the episode that was under the cursor. After the download is
215
+ complete, Poddb will automatically start playing the episode with `mplayer` if
216
+ mplayer is available, and if not, the `open` command, which will play a media
217
+ file with iTunes on OS X.
218
+
219
+ You can force Poddb to launch a specific media player by setting the
220
+ `PODDB_MEDIA_PLAYER` environment variable and exporting it. For example, to
221
+ make Poddb use `totem`:
216
222
 
217
223
  export PODDB_MEDIA_PLAYER=totem
218
224
  poddb
@@ -4,6 +4,14 @@ require 'uri'
4
4
  class PoddbClient
5
5
  module Downloading
6
6
 
7
+ MEDIA_PLAYER = if `which mplayer` =~ /mplayer/
8
+ 'mplayer'
9
+ elsif ENV['PODDB_MEDIA_PLAYER']
10
+ ENV['PODDB_MEDIA_PLAYER']
11
+ else
12
+ # This fallback with open iTunes on OS X
13
+ 'open'
14
+ end
7
15
 
8
16
  def titleize(s, maxlength=20)
9
17
  s.gsub(/\W+/, '-')[0,maxlength].sub(/-$/, '').sub(/^-/, '')
@@ -47,8 +55,7 @@ class PoddbClient
47
55
  item_id = File.read(DOWNLOAD_AND_PLAY_FILE).strip
48
56
  abort("No item id found") if item_id !~ /\d/
49
57
  download item_id
50
- media_player_cmd = ENV['PODDB_MEDIA_PLAYER'] || 'mplayer'
51
- exec("#{media_player_cmd} #@filename")
58
+ exec("#{MEDIA_PLAYER} #@filename")
52
59
  end
53
60
  end
54
61
  end
@@ -1,3 +1,3 @@
1
1
  class PoddbClient
2
- VERSION = '0.2.2'
2
+ VERSION = '0.2.3'
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.2
4
+ version: 0.2.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-09-16 00:00:00.000000000Z
12
+ date: 2011-09-17 00:00:00.000000000Z
13
13
  dependencies: []
14
14
  description: Podcast aggregation from the command line
15
15
  email: