moviesort 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/moviesort/sorter.rb +6 -5
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.7
|
data/lib/moviesort/sorter.rb
CHANGED
@@ -22,11 +22,12 @@ module Moviesort
|
|
22
22
|
end
|
23
23
|
|
24
24
|
def sort_file(path)
|
25
|
-
tv_show = Moviesort::TVShow.parse(File.basename(path))
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
25
|
+
if tv_show = Moviesort::TVShow.parse(File.basename(path))
|
26
|
+
target_path = File.join(@output_dir, tv_show.target_path)
|
27
|
+
FileUtils.mkdir_p(target_path)
|
28
|
+
FileUtils.mv(path, File.join(target_path, tv_show.target_filename))
|
29
|
+
notify(tv_show)
|
30
|
+
end
|
30
31
|
end
|
31
32
|
|
32
33
|
private
|