vitunes 0.3.9 → 0.4.0

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.
@@ -133,6 +133,7 @@ and let the mix play out automatically.
133
133
 
134
134
  ### Managing playlists
135
135
 
136
+ * `,P` goes to the current playlist, if there is one
136
137
  * `:NewPlaylist [new playlist name]` creates a new playlist
137
138
 
138
139
  ### Buy more music, support the ViTunes project
@@ -70,6 +70,7 @@ function! ViTunes()
70
70
  noremap <buffer> <Leader>g :call <SID>openGenreDropdown()<cr>
71
71
  noremap <buffer> <Leader>A :call <SID>openAlbumDropdown()<cr>
72
72
  noremap <buffer> <Leader>c :call <SID>openAddToPlaylistDropDown()<cr>
73
+ noremap <buffer> <Leader>P :call <SID>gotoCurrentPlaylist()<cr>
73
74
 
74
75
  noremap <buffer> > :call <SID>nextTrack()<cr>
75
76
  noremap <buffer> < :call <SID>prevTrack()<cr>
@@ -290,7 +291,6 @@ function! s:submitQueryOrSelection(command)
290
291
  close
291
292
  return
292
293
  endif
293
-
294
294
  let query = getline('.')[len(s:selectionPrompt):] " get(split(getline('.'), ':\s*'), 1)
295
295
  close
296
296
  " echom query
@@ -353,6 +353,22 @@ function! s:newPlaylist(name)
353
353
  echom res
354
354
  endfunction
355
355
 
356
+ function! s:gotoCurrentPlaylist()
357
+ let playlist = s:runCommand(s:vitunes_tool . "itunes currentPlaylist")
358
+ if playlist != ''
359
+ let bcommand = s:vitunes_tool.'playlistTracks '.shellescape(playlist)
360
+ let res = s:runCommand(bcommand)
361
+ setlocal modifiable
362
+ silent! 1,$delete
363
+ silent! put =res
364
+ silent! 1delete
365
+ setlocal nomodifiable
366
+ normal 3G
367
+ let s:currentPlaylist = playlist
368
+ let s:lastPlaylist = playlist
369
+ endif
370
+ endfunction
371
+
356
372
  function! s:musicStore()
357
373
  call system("open ".shellescape(s:musicStoreURL))
358
374
  endfunc
@@ -1,3 +1,3 @@
1
1
  module ViTunes
2
- VERSION = '0.3.9'
2
+ VERSION = '0.4.0'
3
3
  end
metadata CHANGED
@@ -1,35 +1,27 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: vitunes
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 3
8
- - 9
9
- version: 0.3.9
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.4.0
5
+ prerelease:
10
6
  platform: ruby
11
- authors:
7
+ authors:
12
8
  - Daniel Choi
13
9
  autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
-
17
- date: 2011-07-07 00:00:00 -04:00
12
+ date: 2011-07-07 00:00:00.000000000 -04:00
18
13
  default_executable:
19
14
  dependencies: []
20
-
21
15
  description: Control iTunes with Vim
22
- email:
16
+ email:
23
17
  - dhchoi@gmail.com
24
- executables:
18
+ executables:
25
19
  - vitunes
26
20
  - vitunes-help
27
21
  - vitunes-install
28
22
  extensions: []
29
-
30
23
  extra_rdoc_files: []
31
-
32
- files:
24
+ files:
33
25
  - .gitignore
34
26
  - MIT-LICENSE.txt
35
27
  - NOTES
@@ -55,39 +47,30 @@ files:
55
47
  has_rdoc: true
56
48
  homepage: http://danielchoi.com/software/vitunes.html
57
49
  licenses: []
50
+ post_install_message: ! '**************************************************************
58
51
 
59
- post_install_message: |-
60
- **************************************************************
61
52
  ** Now please run vitunes-install to install the Vim plugin **
62
- **************************************************************
63
- rdoc_options: []
64
53
 
65
- require_paths:
54
+ **************************************************************'
55
+ rdoc_options: []
56
+ require_paths:
66
57
  - lib
67
- required_ruby_version: !ruby/object:Gem::Requirement
58
+ required_ruby_version: !ruby/object:Gem::Requirement
68
59
  none: false
69
- requirements:
70
- - - ">="
71
- - !ruby/object:Gem::Version
72
- segments:
73
- - 1
74
- - 8
75
- - 6
60
+ requirements:
61
+ - - ! '>='
62
+ - !ruby/object:Gem::Version
76
63
  version: 1.8.6
77
- required_rubygems_version: !ruby/object:Gem::Requirement
64
+ required_rubygems_version: !ruby/object:Gem::Requirement
78
65
  none: false
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- segments:
83
- - 0
84
- version: "0"
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
85
70
  requirements: []
86
-
87
71
  rubyforge_project: vitunes
88
- rubygems_version: 1.3.7
72
+ rubygems_version: 1.6.2
89
73
  signing_key:
90
74
  specification_version: 3
91
75
  summary: A Vim interface to iTunes
92
76
  test_files: []
93
-