import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.io.File;
+import java.util.concurrent.FutureTask;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.BorderFactory;
import saccubus.properties.OutputVideoSetting;
import saccubus.util.FileDropTarget;
import saccubus.util.PopupRightClick;
+import saccubus.util.WayBackTimeParser;
+import yukihane.Util;
import yukihane.nicovideo.NicoDBFinder;
/**
if (info != null) {
url = info.getNicoId();
} else {
+ // TODO これはダメ…だけどそのうちこの処理自体削除になる
url = "";
}
} catch (Exception ex) {
}
};
- Converter = new Converter(url, wayBackField.getText(), getSetting().toProfile(), sl,
+ final String id = Util.getVideoId(url);
+ Converter = new Converter(id, getSetting().toProfile(), sl,
new ConvertStopFlag(scl));
doButton.setText(DoButtonStopString);
- new Thread(Converter).start();
+ FutureTask<Boolean> task = new FutureTask<Boolean>(Converter);
+ new Thread(task).start();
}
String folder = savePanel.getCommentSavedFolderField().getText();
boolean adjustNumOfCom = savePanel.getFixCommentNumCheckBox().isSelected();
+ final String txt = wayBackField.getText();
+ long backLogPoint;
+ try {
+ backLogPoint = (StringUtils.isNotBlank(txt)) ? WayBackTimeParser.parse(txt) : -1;
+ } catch (IOException ex) {
+ backLogPoint = -1;
+ }
return new InputCommentSetting(download, autoNaming, new File(folder), new File(file), delete, adjustNumOfCom,
- back_comment, reduceCommentCheckBox.isSelected());
+ back_comment, reduceCommentCheckBox.isSelected(), backLogPoint);
}
/**