movie-renamer 0.0.18 → 0.0.19

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/movie-renamer.rb +6 -0
  2. metadata +4 -4
data/lib/movie-renamer.rb CHANGED
@@ -67,6 +67,11 @@ module MovieRenamer
67
67
  @renamepattern = $config['filename']
68
68
  end
69
69
 
70
+ if $config['savepath']
71
+ @newpath = File.expand_path($config['savepath'])
72
+ puts @newpath
73
+ end
74
+
70
75
  class Movie
71
76
 
72
77
  def initialize(filename,opts={})
@@ -141,6 +146,7 @@ module MovieRenamer
141
146
  r2 = %r{\s*\[?\(?\s*(x|X)(v|V)(i|I)(d|D)\s?(-|_)?\s?\w+\s*\)?\]?\s*}
142
147
  r3 = %r{\s*\[?\(?\s*(d|D)(v|V)(d|D)(r|R)(i|I)(p|P)\s?(-|_)?\s*\)?\]?\s*}
143
148
  r = /(#{r1}|#{r2}|#{r3})/
149
+ filename.gsub!(/-.*/,'')
144
150
  filename.gsub(r,'').gsub(/\s?(-|_)\s?/,' ').gsub(/^\s/,'')
145
151
  end
146
152
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: movie-renamer
3
3
  version: !ruby/object:Gem::Version
4
- hash: 59
4
+ hash: 57
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 18
10
- version: 0.0.18
9
+ - 19
10
+ version: 0.0.19
11
11
  platform: ruby
12
12
  authors:
13
13
  - ghedamat
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-10-07 00:00:00 +02:00
18
+ date: 2010-10-09 00:00:00 +02:00
19
19
  default_executable: movie-renamer
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency