poddb_client 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.markdown +12 -6
- data/lib/poddb_client/downloading.rb +9 -2
- data/lib/poddb_client/version.rb +1 -1
- metadata +2 -2
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
|
211
|
-
Poddb will automatically start playing the episode with `mplayer
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
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
|
-
|
51
|
-
exec("#{media_player_cmd} #@filename")
|
58
|
+
exec("#{MEDIA_PLAYER} #@filename")
|
52
59
|
end
|
53
60
|
end
|
54
61
|
end
|
data/lib/poddb_client/version.rb
CHANGED
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.
|
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-
|
12
|
+
date: 2011-09-17 00:00:00.000000000Z
|
13
13
|
dependencies: []
|
14
14
|
description: Podcast aggregation from the command line
|
15
15
|
email:
|