playListOut);
final BufferedWriter bw = new BufferedWriter(
new OutputStreamWriter(fos));
final String header = "Title, Artist, Time, Date Added, User, Album, ALBUMART_INDEX, link";
int iterations = 0;
final ImporterWidget importWidget = UISession
.getImporterWidget();
final DiscoWidget discoWidget = UISession
.getDiscoWidget();
bw.write(header);
bw.newLine();
for (final Element link : links) {
if (((importWidget != null) && importWidget
.isOpen())
|| ((discoWidget != null) && discoWidget
.isOpen())) {
if ((discoWidget != null)
&& (discoWidget.getDiscoProgressBar() != null)) {
iterations += 1;
final int percent = (int) ((iterations * 100.0f) / links
.size());
discoWidget.getDiscoProgressBar().setValue(
percent);
PlayListUtils.disableDiscoInterface();
} else if ((importWidget != null)
&& (importWidget.getImportProgressBar() != null)) {
iterations += 1;
final int percent = (int) ((iterations * 100.0f) / links
.size());
importWidget.getImportProgressBar()
.setValue(percent);
PlayListUtils.disableImporterInterface();
}
if (link.attr("abs:href").contains("watch?v=")
&& (link.text().length() > 0)