toname 0.1.0 → 0.1.1

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/to_name.rb +3 -3
  2. metadata +2 -2
data/lib/to_name.rb CHANGED
@@ -5,7 +5,7 @@ class ToName
5
5
  FILE_SEP_REGEX = /\//
6
6
  FILE_EXT_SEP_REGEX = /\./
7
7
  CD_FOLDER_REGEX = /\/CD(\d)\//
8
- #Chars used in file names as a subsitude for spaces
8
+ #Chars used in filenames as a substitute for spaces
9
9
  SPACE_SUB_REGEX = /(\.|_|\-)/
10
10
  VIDEO_TYPE_NAMES = ['DVDRIP', '1080p', '720p','R5', 'DVDSCR', 'BDRip', 'CAM', 'TS', 'PPV', 'Xvid', 'divx', 'DVDSCREENER']
11
11
  CONTENT_SOURCE_FOLDER_TEST_REGEX = /#{VIDEO_TYPE_NAMES.join('|')}/i
@@ -42,12 +42,12 @@ class ToName
42
42
  #Extract year if it's in the filename
43
43
  if name =~ YEAR_REGEX && name.index(YEAR_REGEX) > 0
44
44
  name = $`
45
- #Strip any surronding brackets and convert to int
45
+ #Strip any surrounding brackets and convert to int
46
46
  year = $&.gsub(/\(|\)|\[|\]/, '').to_i
47
47
  end
48
48
 
49
49
  #Strip LIMITED off the end. Note: This is NOT case sensitive
50
- name = $` if name =~ /LIMITED$/
50
+ name = $` if name =~ /LIMITED|LiMiTED$/
51
51
 
52
52
  #Try to extract the session and episode
53
53
  session = nil
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 0
9
- version: 0.1.0
8
+ - 1
9
+ version: 0.1.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Sam Cavenagh