aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2014-05-27 21:59:14 -0700
committerScott Jackson <daneren2005@gmail.com>2014-05-27 21:59:14 -0700
commit108feea089881e4f9d29cd3e938d03e2e353f289 (patch)
tree46d9643315e50f36c1512df82880b1123e34c467 /src
parente2742428339a32831f4cf007bbbf4c9de2372acf (diff)
downloaddsub-108feea089881e4f9d29cd3e938d03e2e353f289.tar.gz
dsub-108feea089881e4f9d29cd3e938d03e2e353f289.tar.bz2
dsub-108feea089881e4f9d29cd3e938d03e2e353f289.zip
#351 Don't include folders in rebase
Diffstat (limited to 'src')
-rw-r--r--src/github/daneren2005/dsub/service/parser/MusicDirectoryParser.java25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/github/daneren2005/dsub/service/parser/MusicDirectoryParser.java b/src/github/daneren2005/dsub/service/parser/MusicDirectoryParser.java
index d968f82e..e705c54d 100644
--- a/src/github/daneren2005/dsub/service/parser/MusicDirectoryParser.java
+++ b/src/github/daneren2005/dsub/service/parser/MusicDirectoryParser.java
@@ -61,18 +61,21 @@ public class MusicDirectoryParser extends MusicDirectoryEntryParser {
Entry entry = parseEntry(artist);
entry.setGrandParent(dir.getParent());
- // Check if duplicates
- Entry duplicate = titleMap.get(entry.getTitle());
- if(duplicate != null) {
- // Check if the first already has been rebased or not
- if(duplicate.getTitle().equals(entry.getTitle())) {
- duplicate.rebaseTitleOffPath();
+ // Only check for songs
+ if(!entry.isDirectory()) {
+ // Check if duplicates
+ Entry duplicate = titleMap.get(entry.getTitle());
+ if (duplicate != null) {
+ // Check if the first already has been rebased or not
+ if (duplicate.getTitle().equals(entry.getTitle())) {
+ duplicate.rebaseTitleOffPath();
+ }
+
+ // Rebase if this is the second instance of this title found
+ entry.rebaseTitleOffPath();
+ } else {
+ titleMap.put(entry.getTitle(), entry);
}
-
- // Rebase if this is the second instance of this title found
- entry.rebaseTitleOffPath();
- } else {
- titleMap.put(entry.getTitle(), entry);
}
dir.addChild(entry);