cover.jpg retrieval hack
This commit is contained in:
@@ -34,7 +34,6 @@ public class CardCreator {
|
|||||||
public static final int slotsPerLine = 9;
|
public static final int slotsPerLine = 9;
|
||||||
public static final int cardsPerLine = 7;
|
public static final int cardsPerLine = 7;
|
||||||
public static final boolean generateBacksides = true;
|
public static final boolean generateBacksides = true;
|
||||||
public static final boolean retrieveImageFiles = true;
|
|
||||||
|
|
||||||
public static final String DEST = "results/simple_table.pdf";
|
public static final String DEST = "results/simple_table.pdf";
|
||||||
public static final PdfNumber INVERTEDPORTRAIT = new PdfNumber(180);
|
public static final PdfNumber INVERTEDPORTRAIT = new PdfNumber(180);
|
||||||
@@ -106,7 +105,16 @@ public class CardCreator {
|
|||||||
card.artist = "";
|
card.artist = "";
|
||||||
}
|
}
|
||||||
else {
|
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 = "";
|
card.artist = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -264,28 +272,37 @@ public class CardCreator {
|
|||||||
"spotify:album:0YSWLbCg5SpxAb2VOON3mX",
|
"spotify:album:0YSWLbCg5SpxAb2VOON3mX",
|
||||||
"spotify:track:7oolFzHipTMg2nL7shhdz2",
|
"spotify:track:7oolFzHipTMg2nL7shhdz2",
|
||||||
"http://streamtdy.ir-media-tec.com/live/mp3-128/web/play.mp3",
|
"http://streamtdy.ir-media-tec.com/live/mp3-128/web/play.mp3",
|
||||||
"hidrive/Kinder/Astrid Lindgren - Lotta zieht um",
|
"share/Kinder/Astrid Lindgren - Wir Kinder aus Büllerbü",
|
||||||
"hidrive/Singles/04 - The Funeral.mp3",
|
"share/Kinder/Astrid Lindgren - Die Kinder aus der Krachmacherstraße",
|
||||||
"DUMMY01.mp3",
|
"share/Kinder/Die 30 besten Spiel- und Bewegungslieder",
|
||||||
"DUMMY02.mp3",
|
"share/Kinder/Eddi & Dän - singen Kinderlieder a capella",
|
||||||
"DUMMY03.mp3",
|
"share/Kinder/Karlchen-Geschichten",
|
||||||
"DUMMY04.mp3",
|
"share/Kinder/Lotta kann Radfahren",
|
||||||
"DUMMY05.mp3",
|
"share/Kinder/Neue Karlchen-Geschichten",
|
||||||
"DUMMY06.mp3",
|
"share/Kinder/Janosch - Das Beste von Tiger & Bär",
|
||||||
"DUMMY07.mp3",
|
"share/Kinder/Rabe Socke - Alles Rabenstark!",
|
||||||
"DUMMY08.mp3",
|
"share/Kinder/Astrid Lindgren - Lotta zieht um"/*,
|
||||||
"DUMMY09.mp3",
|
"share/Singles/04 - The Funeral.mp3",
|
||||||
"DUMMY10.mp3",
|
"share/DUMMY01.mp3",
|
||||||
"DUMMY11.mp3",
|
"share/DUMMY02.mp3",
|
||||||
"DUMMY12.mp3",
|
"share/DUMMY03.mp3",
|
||||||
"DUMMY13.mp3",
|
"share/DUMMY04.mp3",
|
||||||
"DUMMY14.mp3",
|
"share/DUMMY05.mp3",
|
||||||
"DUMMY15.mp3",
|
"share/DUMMY06.mp3",
|
||||||
"DUMMY16.mp3",
|
"share/DUMMY07.mp3",
|
||||||
"DUMMY17.mp3",
|
"share/DUMMY08.mp3",
|
||||||
"DUMMY18.mp3",
|
"share/DUMMY09.mp3",
|
||||||
"DUMMY19.mp3",
|
"share/DUMMY10.mp3",
|
||||||
"DUMMY20.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);
|
new CardCreator(links);
|
||||||
|
|||||||
Reference in New Issue
Block a user