vitunes 0.3.6 → 0.3.7

Sign up to get free protection for your applications and to get access to all the features.
data/README.markdown CHANGED
@@ -132,7 +132,14 @@ and let the mix play out automatically.
132
132
 
133
133
  ### Managing playlists
134
134
 
135
- * `:NewPlaylist [new-playlist-name]` creates a new playlist
135
+ * `:NewPlaylist [new playlist name]` creates a new playlist
136
+
137
+ ### Buy more music, support the ViTunes project
138
+
139
+ * `,z` opens Amazon's MP3 Store in your web browser
140
+
141
+ At no additional cost to you, Amazon will give the ViTunes developer a small
142
+ referral bonus (around 6%) when you buy MP3s via `,z`.
136
143
 
137
144
 
138
145
  ## Bug reports and feature requests
@@ -1,3 +1,3 @@
1
1
  module ViTunes
2
- VERSION = '0.3.6'
2
+ VERSION = '0.3.7'
3
3
  end
data/lib/vitunes.vim CHANGED
@@ -27,6 +27,8 @@ let s:currentPlaylist = ''
27
27
  let s:lastPlaylist = ''
28
28
  let s:selectedTrackIds = []
29
29
 
30
+ let s:musicStoreURL = "http://www.amazon.com/gp/redirect.html?ie=UTF8&location=http%3A%2F%2Fwww.amazon.com%2FMP3-Music-Download%2Fb%3Fie%3DUTF8%26node%3D163856011%26ref_%3Dtopnav_storetab_dmusic%23&tag=instantwatche-20&linkCode=ur2&camp=1789&creative=390957"
31
+
30
32
  func! s:trimString(string)
31
33
  let string = substitute(a:string, '\s\+$', '', '')
32
34
  return substitute(string, '^\s\+', '', '')
@@ -85,12 +87,14 @@ function! ViTunes()
85
87
  " noremap <buffer> <BS> :call <SID>deleteTracksFromPlaylist()<CR> "
86
88
  noremap <buffer> <Leader>i :close<CR>
87
89
  noremap <buffer> ? :call <SID>help()<CR>
88
- "noremap <buffer> <cr> <Esc>:call <SID>playTrack()<cr>
90
+ noremap <buffer> <Leader>z :call <SID>musicStore()<CR>
91
+
89
92
  noremap <buffer> <cr> :call <SID>playTrack()<cr>
90
93
  setlocal nomodifiable
91
94
  setlocal statusline=%!ViTunesStatusLine()
92
95
 
93
96
  command! -buffer -bar -nargs=1 NewPlaylist call s:newPlaylist(<f-args>)
97
+ command! -buffer -bar -nargs=0 NewPlaylist call s:newPlaylist(<f-args>)
94
98
 
95
99
  if line('$') == 1 " buffer empty
96
100
  let msg = "Welcome to ViTunes\n\nPress ? for help"
@@ -349,6 +353,10 @@ function! s:newPlaylist(name)
349
353
  echom res
350
354
  endfunction
351
355
 
356
+ function! s:musicStore()
357
+ call system("open ".shellescape(s:musicStoreURL))
358
+ endfunc
359
+
352
360
  nnoremap <silent> <leader>i :call ViTunes()<cr>
353
361
  nnoremap <silent> <leader>I :call ViTunes()<cr>:only<CR>
354
362
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vitunes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.6
4
+ version: 0.3.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: