summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgeronimo <geronimo013@gmx.de>2012-08-16 17:30:58 (GMT)
committergeronimo <geronimo013@gmx.de>2012-08-16 17:30:58 (GMT)
commit4866f2c251513937ec7745eda248b5ee8e6d083b (patch)
treeb8bff3dd50672525b0daefa0de55095f028d2912
parent9281227e493f7970821aa0065aeff002f29d32f3 (diff)
downloadcmp-4866f2c251513937ec7745eda248b5ee8e6d083b.tar.gz
cmp-4866f2c251513937ec7745eda248b5ee8e6d083b.tar.bz2
fixed mistake at generating audio name from meta-tags, which broke dnd of most audio
-rw-r--r--cmpcj/src/de/schwarzrot/control/dnd/TreeSourceAndDestTransferHandler.java19
-rw-r--r--cmps/tests/MetaScanTest.cc4
-rw-r--r--libs/mediaScan/src/Audio.cc2
3 files changed, 3 insertions, 22 deletions
diff --git a/cmpcj/src/de/schwarzrot/control/dnd/TreeSourceAndDestTransferHandler.java b/cmpcj/src/de/schwarzrot/control/dnd/TreeSourceAndDestTransferHandler.java
index e400cea..4c481f2 100644
--- a/cmpcj/src/de/schwarzrot/control/dnd/TreeSourceAndDestTransferHandler.java
+++ b/cmpcj/src/de/schwarzrot/control/dnd/TreeSourceAndDestTransferHandler.java
@@ -114,15 +114,10 @@ public class TreeSourceAndDestTransferHandler extends TransferHandler {
Genre target = (Genre) targetNode.getUserObject();
Genre transfer = (Genre) transferNode.getUserObject();
- // System.out.println("importData() targetPath: " + targetPath);
- // System.out.println("importData() sourcePath: " + sourcePath);
-
sourceParentNode.remove(transferNode);
targetNode.add(transferNode);
nodeCache.remove(transfer.getRealPath());
- // System.out.println("old path of genre to move: " + transfer.getRealPath().getAbsolutePath());
transfer.setParent(target);
- // System.out.println("new path of moved genre: " + transfer.getRealPath().getAbsolutePath());
nodeCache.put(transfer.getRealPath(), transferNode);
transfer.update();
refreshNodeCache();
@@ -181,27 +176,13 @@ public class TreeSourceAndDestTransferHandler extends TransferHandler {
}
if (transferMedia != null) {
- System.out.println("old path of media to transfer: " + transferMedia.getRealPath().getAbsolutePath());
transferMedia.setParent(targetGenre);
- System.out.println("new path of transferred media: " + transferMedia.getRealPath().getAbsolutePath());
if (!changes.contains(transferMedia)) {
changes.getReadWriteLock().writeLock().lock();
changes.add(transferMedia);
changes.getReadWriteLock().writeLock().unlock();
}
}
- // } else {
- // if (targetGenre == null)
- // System.err.println("failed to determine target genre!");
- // if (node == null)
- // System.err.println("failed to determine source parent of media: <|" + mediaPath.getAbsolutePath()
- // + "|>");
- // for (File f : nodeCache.keySet()) {
- // String ap = f.getAbsolutePath();
- //
- // if (ap.startsWith("/audio/in/"))
- // System.out.println("nodeCache contains: " + ap);
- // }
}
}
diff --git a/cmps/tests/MetaScanTest.cc b/cmps/tests/MetaScanTest.cc
index c207d5c..f8ae7b2 100644
--- a/cmps/tests/MetaScanTest.cc
+++ b/cmps/tests/MetaScanTest.cc
@@ -140,8 +140,8 @@ int main()
std::cout << std::endl << "===========================================" << std::endl << std::endl;
testCommandReader();
-// std::cout << std::endl << "===========================================" << std::endl << std::endl;
-// testMediaFiles("testMedia.txt");
+ std::cout << std::endl << "===========================================" << std::endl << std::endl;
+ testMediaFiles("testMedia.txt");
cFile::Cleanup();
return 0;
diff --git a/libs/mediaScan/src/Audio.cc b/libs/mediaScan/src/Audio.cc
index 62e9379..074129f 100644
--- a/libs/mediaScan/src/Audio.cc
+++ b/libs/mediaScan/src/Audio.cc
@@ -106,7 +106,7 @@ const char *cAudio::Name(void) const
if (performer) {
tmp = std::get<1>(*performer);
- sb.Append(" / ").Append(tmp.c_str());
+ sb.Append(" - ").Append(tmp.c_str());
}
if (album) {
tmp = std::get<1>(*album);