diff options
| author | realtradam <[email protected]> | 2020-04-25 18:57:41 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-04-25 18:57:41 -0400 |
| commit | c4ae1b99a2d16f5fc5a2d76c4ec8082c95f3591c (patch) | |
| tree | 6c3616300500af67197d090cd0310fc9741aa956 /musicSorter.rb | |
| parent | 03e17ee820688cfe51513c4c7149463fb93726b1 (diff) | |
| download | musicSorter-c4ae1b99a2d16f5fc5a2d76c4ec8082c95f3591c.tar.gz musicSorter-c4ae1b99a2d16f5fc5a2d76c4ec8082c95f3591c.zip | |
Skips over nil tracks
if the track is nil, code will crash so had to make it skip over files that have nil tracks
Diffstat (limited to 'musicSorter.rb')
| -rw-r--r-- | musicSorter.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/musicSorter.rb b/musicSorter.rb index a7ec6d1..73dcd8b 100644 --- a/musicSorter.rb +++ b/musicSorter.rb @@ -18,7 +18,7 @@ for extension in fileExtensions songData = FFruby::File.new(song) #Checks if any of the fields are not filled out - #If they arent, save the song to an error log and skip it, except for track number + #If they arent, save the song to an error log and skip it if songData.title == nil errors.push("ERROR, TITLE IS NIL FOR: " + song) next @@ -36,7 +36,8 @@ for extension in fileExtensions next end if songData.track == nil - errors.push("WARNING, TRACK NUMBER IS NIL BUT MOVED ANYWAY FOR: " + song) + errors.push("ERROR, TRACK NUMBER IS FOR: " + song) + next end #Loads all the values we will want to use |
