diff --git a/cardcreator/src/tutorial/chapter01/CardCreator.java b/cardcreator/src/tutorial/chapter01/CardCreator.java index c1f7c91..1ad7747 100644 --- a/cardcreator/src/tutorial/chapter01/CardCreator.java +++ b/cardcreator/src/tutorial/chapter01/CardCreator.java @@ -34,7 +34,6 @@ public class CardCreator { public static final int slotsPerLine = 9; public static final int cardsPerLine = 7; public static final boolean generateBacksides = true; - public static final boolean retrieveImageFiles = true; public static final String DEST = "results/simple_table.pdf"; public static final PdfNumber INVERTEDPORTRAIT = new PdfNumber(180); @@ -106,7 +105,16 @@ public class CardCreator { card.artist = ""; } else { - card.title = link; + // FIXME dirty cover retrieval hack + // "share/Kinder/Astrid Lindgren - Lotta zieht um" + String path = "/run/user/1000/gvfs/smb-share:server=cubon,share=hidrive/Media/Audio" + link.substring(link.indexOf("/")) + "/cover.jpg"; + + File f = new File(path); + if (f.exists()) { + card.cover = new Image(ImageDataFactory.create(path)); + } + + card.title = link.substring(link.lastIndexOf('/') + 1); card.artist = ""; } } @@ -264,28 +272,37 @@ public class CardCreator { "spotify:album:0YSWLbCg5SpxAb2VOON3mX", "spotify:track:7oolFzHipTMg2nL7shhdz2", "http://streamtdy.ir-media-tec.com/live/mp3-128/web/play.mp3", - "hidrive/Kinder/Astrid Lindgren - Lotta zieht um", - "hidrive/Singles/04 - The Funeral.mp3", - "DUMMY01.mp3", - "DUMMY02.mp3", - "DUMMY03.mp3", - "DUMMY04.mp3", - "DUMMY05.mp3", - "DUMMY06.mp3", - "DUMMY07.mp3", - "DUMMY08.mp3", - "DUMMY09.mp3", - "DUMMY10.mp3", - "DUMMY11.mp3", - "DUMMY12.mp3", - "DUMMY13.mp3", - "DUMMY14.mp3", - "DUMMY15.mp3", - "DUMMY16.mp3", - "DUMMY17.mp3", - "DUMMY18.mp3", - "DUMMY19.mp3", - "DUMMY20.mp3" + "share/Kinder/Astrid Lindgren - Wir Kinder aus Büllerbü", + "share/Kinder/Astrid Lindgren - Die Kinder aus der Krachmacherstraße", + "share/Kinder/Die 30 besten Spiel- und Bewegungslieder", + "share/Kinder/Eddi & Dän - singen Kinderlieder a capella", + "share/Kinder/Karlchen-Geschichten", + "share/Kinder/Lotta kann Radfahren", + "share/Kinder/Neue Karlchen-Geschichten", + "share/Kinder/Janosch - Das Beste von Tiger & Bär", + "share/Kinder/Rabe Socke - Alles Rabenstark!", + "share/Kinder/Astrid Lindgren - Lotta zieht um"/*, + "share/Singles/04 - The Funeral.mp3", + "share/DUMMY01.mp3", + "share/DUMMY02.mp3", + "share/DUMMY03.mp3", + "share/DUMMY04.mp3", + "share/DUMMY05.mp3", + "share/DUMMY06.mp3", + "share/DUMMY07.mp3", + "share/DUMMY08.mp3", + "share/DUMMY09.mp3", + "share/DUMMY10.mp3", + "share/DUMMY11.mp3", + "share/DUMMY12.mp3", + "share/DUMMY13.mp3", + "share/DUMMY14.mp3", + "share/DUMMY15.mp3", + "share/DUMMY16.mp3", + "share/DUMMY17.mp3", + "share/DUMMY18.mp3", + "share/DUMMY19.mp3", + "share/DUMMY20.mp3"*/ ); new CardCreator(links);