dhun 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +29 -5
- data/dhun.gemspec +2 -2
- data/ext/query.c +3 -4
- data/lib/dhun.rb +1 -1
- data/lib/dhun/handler.rb +1 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -33,9 +33,25 @@ I have implemented some logging capabilities.
|
|
33
33
|
### Playing Files
|
34
34
|
|
35
35
|
Dhun uses Spotlight to query for music files. Just specify a keyword, and Dhun
|
36
|
-
will look for files matching that keyword and start playing them
|
36
|
+
will look for files matching that keyword and start playing them.
|
37
37
|
|
38
|
-
|
38
|
+
You can also query the Spotlight database before playing the files.
|
39
|
+
|
40
|
+
$ dhun query here
|
41
|
+
9 Results
|
42
|
+
/Users/deepak/Music/iTunes/iTunes Media/Music/Edward Sharpe & The Magnetic Zeros/Here Comes/01 40 Day Dream.mp3
|
43
|
+
/Users/deepak/Music/iTunes/iTunes Media/Music/Edward Sharpe & The Magnetic Zeros/Here Comes/02 Janglin.mp3
|
44
|
+
/Users/deepak/Music/iTunes/iTunes Media/Music/Edward Sharpe & The Magnetic Zeros/Here Comes/03 Carries On.mp3
|
45
|
+
/Users/deepak/Music/Amazon MP3/Edward Sharpe & The Magnetic Zeros/Here Comes/01 - 40 Day Dream.mp3
|
46
|
+
/Users/deepak/Music/Amazon MP3/Edward Sharpe & The Magnetic Zeros/Here Comes/02 - Janglin.mp3
|
47
|
+
/Users/deepak/Music/Amazon MP3/Edward Sharpe & The Magnetic Zeros/Here Comes/03 - Carries On.mp3
|
48
|
+
/Users/deepak/Dropbox/shared/music/Here Comes/02 - Janglin.mp3
|
49
|
+
/Users/deepak/Dropbox/shared/music/Here Comes/01 - 40 Day Dream.mp3
|
50
|
+
/Users/deepak/Dropbox/shared/music/Here Comes/03 - Carries On.mp3
|
51
|
+
|
52
|
+
And then, when you are ready to play the files.
|
53
|
+
|
54
|
+
$ dhun play here
|
39
55
|
9 files queued for playing
|
40
56
|
/Users/deepak/Music/iTunes/iTunes Media/Music/Edward Sharpe & The Magnetic Zeros/Here Comes/01 40 Day Dream.mp3
|
41
57
|
/Users/deepak/Music/iTunes/iTunes Media/Music/Edward Sharpe & The Magnetic Zeros/Here Comes/02 Janglin.mp3
|
@@ -56,7 +72,9 @@ Pausing playback.
|
|
56
72
|
$ dhun pause
|
57
73
|
Dhun is paused. Next track is /Users/deepak/Music/iTunes/iTunes Media/Music/Edward Sharpe & The Magnetic Zeros/Here Comes/02 Janglin.mp3
|
58
74
|
|
59
|
-
Resuming playback
|
75
|
+
Resuming playback. Currently, playback resumes from the next track in the
|
76
|
+
queue. Ability to pause and play from the middle of a track is a bit tricky to
|
77
|
+
implement, so it will be there in a future version.
|
60
78
|
|
61
79
|
$ dhun resume
|
62
80
|
Dhun is playing. Next track is /Users/deepak/Music/iTunes/iTunes Media/Music/Edward Sharpe & The Magnetic Zeros/Here Comes/02 Janglin.mp3
|
@@ -89,6 +107,8 @@ before adding new files.
|
|
89
107
|
|
90
108
|
### Stopping Dhun
|
91
109
|
|
110
|
+
This will exit the process.
|
111
|
+
|
92
112
|
$ dhun stop
|
93
113
|
|
94
114
|
## Coming Soon
|
@@ -100,9 +120,13 @@ These features are planned in the next few releases
|
|
100
120
|
* Playing previous song, using something like `dhun prev`
|
101
121
|
* Skipping ahead by more than one file, like `dhun next 2` or `dhun prev 2`
|
102
122
|
* Advanced querying support with filters, like `dhun play "artist:Rahman"`
|
123
|
+
* Ability to pause and play in the middle of music files.
|
103
124
|
|
104
125
|
And someday..
|
105
126
|
|
106
127
|
* iTunes integration
|
107
|
-
*
|
108
|
-
|
128
|
+
* Displaying IDv3 information instead of just file names
|
129
|
+
|
130
|
+
## Feedback
|
131
|
+
|
132
|
+
email me at deepak DOT jois AT gmail DOT com
|
data/dhun.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'dhun'
|
3
|
-
s.version = '0.5.
|
4
|
-
s.summary = "Minimalist music for OS X"
|
3
|
+
s.version = '0.5.3'
|
4
|
+
s.summary = "Minimalist music player for OS X"
|
5
5
|
s.date = '2009-12-08'
|
6
6
|
s.email = 'deepak.jois@gmail.com'
|
7
7
|
s.homepage = 'http://github.com/deepakjois/dhun'
|
data/ext/query.c
CHANGED
@@ -30,10 +30,9 @@ void notificationCallback(CFNotificationCenterRef center,
|
|
30
30
|
//attributes = MDItemCopyAttributes(itemRef, attributeNames);
|
31
31
|
attrName = CFStringCreateWithCString(NULL,
|
32
32
|
"kMDItemPath", encoding);
|
33
|
-
attrValue = MDItemCopyAttribute(itemRef, attrName);
|
34
|
-
|
35
|
-
queryResults.files[idx]
|
36
|
-
strcpy(queryResults.files[idx],convertedString);
|
33
|
+
attrValue = MDItemCopyAttribute(itemRef, attrName);
|
34
|
+
queryResults.files[idx] = malloc(1000);
|
35
|
+
CFStringGetCString((CFStringRef)attrValue, queryResults.files[idx],1000, kCFStringEncodingUTF8);
|
37
36
|
//CFShow(attrValue);
|
38
37
|
//CFRelease(attributes);
|
39
38
|
//CFRelease(attributeNames);
|
data/lib/dhun.rb
CHANGED
data/lib/dhun/handler.rb
CHANGED
@@ -57,7 +57,7 @@ module Dhun
|
|
57
57
|
def next(*args)
|
58
58
|
@player = Player.instance
|
59
59
|
next_track = @player.next
|
60
|
-
result = Result.new :success, ("Dhun is playing #{next_track}"
|
60
|
+
result = Result.new :success, (next_track ? "Dhun is playing #{next_track}" : "No More Tracks")
|
61
61
|
return result.to_json
|
62
62
|
end
|
63
63
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dhun
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Deepak Jois
|
@@ -91,6 +91,6 @@ rubyforge_project: dhun
|
|
91
91
|
rubygems_version: 1.3.5
|
92
92
|
signing_key:
|
93
93
|
specification_version: 3
|
94
|
-
summary: Minimalist music for OS X
|
94
|
+
summary: Minimalist music player for OS X
|
95
95
|
test_files: []
|
96
96
|
|