vitunes 0.1.3 → 0.1.5
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 +5 -1
- data/lib/vitunes/version.rb +1 -1
- data/lib/vitunes-tool-objc +0 -0
- data/lib/vitunes.vim +0 -2
- data/vitunes/main.m +4 -5
- metadata +2 -2
data/README.markdown
CHANGED
@@ -39,12 +39,16 @@ probably have a `PATH` issue. Try one of these workarounds:
|
|
39
39
|
* Put the directory where Rubygems installs executables on your `PATH`
|
40
40
|
* Try installing with `sudo gem install && vitunes-install`
|
41
41
|
|
42
|
+
To upgrade ViTunes to a newer versoin, just repeat the installation produce.
|
42
43
|
|
43
44
|
## How to use it
|
44
45
|
|
46
|
+
For all the commands below, the mapleader is just assumed to be a `,`. If your
|
47
|
+
mapleader is `\` or something else, use that instead.
|
48
|
+
|
45
49
|
### General commands
|
46
50
|
|
47
|
-
* `,i` invoke or dismiss ViTunes
|
51
|
+
* `,i` invoke or dismiss ViTunes
|
48
52
|
* `?` show help and commands
|
49
53
|
|
50
54
|
### Navigation
|
data/lib/vitunes/version.rb
CHANGED
data/lib/vitunes-tool-objc
CHANGED
Binary file
|
data/lib/vitunes.vim
CHANGED
@@ -166,9 +166,7 @@ function! s:currentTrackAndPlaylist()
|
|
166
166
|
let res1 = s:runCommand(s:vitunes_tool . "itunes currentTrack")
|
167
167
|
" fix this on obj-c side later; we just need to make sure this doesn't
|
168
168
|
" spill over to another line.
|
169
|
-
let res1 = substitute(res1, 'Current track:', '','')
|
170
169
|
let res2 = s:runCommand(s:vitunes_tool . "itunes currentPlaylist")
|
171
|
-
let res2 = substitute(res2, 'Current playlist: ', '','')
|
172
170
|
echo res1[0:60] . ' | '.res2[0:30]
|
173
171
|
endfunction
|
174
172
|
|
data/vitunes/main.m
CHANGED
@@ -192,19 +192,18 @@ void itunes(NSString *command) {
|
|
192
192
|
printf("No current track");
|
193
193
|
return;
|
194
194
|
}
|
195
|
-
s = [NSString stringWithFormat:@"\"%@\" by %@
|
195
|
+
s = [NSString stringWithFormat:@"\"%@\" by %@",
|
196
196
|
[((iTunesTrack *)result) name],
|
197
|
-
[((iTunesTrack *)result) artist]
|
198
|
-
[((iTunesTrack *)result) album]
|
197
|
+
[((iTunesTrack *)result) artist]
|
199
198
|
];
|
200
|
-
printf("
|
199
|
+
printf("%s", [s cStringUsingEncoding: NSUTF8StringEncoding]);
|
201
200
|
} else if ([[result className] isEqual:@"ITunesPlaylist"]) {
|
202
201
|
if ([result name ] == nil) {
|
203
202
|
printf("No current playlist");
|
204
203
|
return;
|
205
204
|
}
|
206
205
|
s = [NSString stringWithFormat:@"%@", [((iTunesPlaylist *)result) name]];
|
207
|
-
printf("
|
206
|
+
printf("%s", [s cStringUsingEncoding: NSUTF8StringEncoding]);
|
208
207
|
} else {
|
209
208
|
s = ((iTunesItem *)result).name;
|
210
209
|
printf("%s\n", [s cStringUsingEncoding: NSUTF8StringEncoding]);
|