• R/O
  • HTTP
  • SSH
  • HTTPS

inqubus: Commit

いんきゅばす(仮称; 旧名: さきゅばすのNicoBrowser拡張版)


Commit MetaInfo

Revision96643d75322ce44e55a0ca75d0c3aff95a3d0eed (tree)
Zeit2011-09-11 07:41:44
Autoryukihane <yukihane.feather@gmai...>
Commiteryukihane

Log Message

デバッグ出力を追加

Ändern Zusammenfassung

Diff

--- a/frontend/src/saccubus/MainFrame.java
+++ b/frontend/src/saccubus/MainFrame.java
@@ -46,6 +46,7 @@ import org.apache.commons.lang.StringUtils;
4646 import saccubus.ConvertStopFlag.State;
4747 import saccubus.converter.profile.FfmpegOption;
4848 import saccubus.converter.profile.NgSetting;
49+import saccubus.converter.profile.Profile;
4950 import saccubus.net.TextProgressListener;
5051 import saccubus.properties.BasicSetting;
5152 import saccubus.properties.ConvertSetting;
@@ -83,7 +84,7 @@ public class MainFrame extends JFrame {
8384
8485 private static final long serialVersionUID = 2564486741331062989L;
8586 public static final String PRODUCT_NAME = "いんきゅばす";
86- public static final String VERSION = "1.7.2 (NicoBrowser" + Main.VERSION + ")";
87+ public static final String VERSION = "1.7.3 (NicoBrowser" + Main.VERSION + ")";
8788 public static final Image WinIcon = Toolkit.getDefaultToolkit().createImage(saccubus.MainFrame.class.getResource(
8889 "icon32.png"));
8990 // TODO GUIが無いためフィールドに保持.
@@ -366,6 +367,7 @@ public class MainFrame extends JFrame {
366367 contentPane.setLayout(borderLayout1);
367368 setSize(new Dimension(400, 450));
368369 setTitle(PRODUCT_NAME + " " + VERSION);
370+ System.out.println(getTitle());
369371 this.addWindowListener(new MainFrame_this_windowAdapter(this));
370372 statusBar.setText(" ");
371373 jMenuFile.setText("ファイル");
@@ -896,6 +898,8 @@ public class MainFrame extends JFrame {
896898 private JPanel FFmpegOptionComboBoxPanel = null;
897899
898900 public void DoButton_actionPerformed(ActionEvent e) {
901+ System.out.println("doButton: " + doButton.getText());
902+ System.out.println("Converter: " + (Converter == null ? "null" : Converter.isConverted()));
899903 if (Converter == null || Converter.isConverted()) {
900904 try {
901905 executeConvert();
@@ -910,6 +914,7 @@ public class MainFrame extends JFrame {
910914 } else { /* 開始しているので、ストップする。 */
911915 final ConvertStopFlag flag = Converter.getStopFlag();
912916 if (!flag.needStop()) { /* まだストップしていない。 */
917+ System.out.println("request stop");
913918 flag.requestStop();
914919 }
915920 }
@@ -919,6 +924,7 @@ public class MainFrame extends JFrame {
919924 String url;
920925
921926 // NicoBrowserファイルを利用する場合は、ファイル名からビデオIDを特定.
927+ System.out.println("kind: " + videoSaveInfoPanel.getVideoUseNiBrButton().isSelected());
922928 if (videoSaveInfoPanel.getVideoUseNiBrButton().isSelected()) {
923929 try {
924930 String fileName = videoSaveInfoPanel.getNibrFileField().getText();
@@ -935,6 +941,7 @@ public class MainFrame extends JFrame {
935941 }
936942 } else {
937943 url = videoIdField.getText();
944+ System.out.println("VIDEO ID: " + url);
938945 }
939946
940947 TextProgressListener sl = new TextProgressListener() {
@@ -967,11 +974,14 @@ public class MainFrame extends JFrame {
967974 }
968975 };
969976
970- Converter = new Converter(url, wayBackField.getText(), getSetting().toProfile(), sl,
977+ final Profile profile = getSetting().toProfile();
978+ System.out.println(profile);
979+
980+ Converter = new Converter(url, wayBackField.getText(), profile, sl,
971981 new ConvertStopFlag(scl));
972982 doButton.setText(DoButtonStopString);
973983 new Thread(Converter).start();
974-
984+ System.out.println("Thread invoked");
975985 }
976986
977987 /* FFmpegへのパス */
@@ -1634,6 +1644,7 @@ class MainFrame_DoButton_actionAdapter implements ActionListener {
16341644 private MainFrame adaptee;
16351645
16361646 MainFrame_DoButton_actionAdapter(MainFrame adaptee) {
1647+ System.out.println("MainFrame_DoButton_actionAdapter コンストラクタ");
16371648 this.adaptee = adaptee;
16381649 }
16391650
--- a/frontend/src/saccubus/converter/AbstractCommand.java
+++ b/frontend/src/saccubus/converter/AbstractCommand.java
@@ -25,7 +25,14 @@ public abstract class AbstractCommand {
2525 }
2626
2727 protected void sendText(String text) {
28+ sendText(text, true);
29+ }
30+
31+ protected void sendText(String text, boolean debugOut) {
2832 getListener().setText(text);
33+ if (debugOut) {
34+ System.out.println(text);
35+ }
2936 }
3037
3138 /**
--- a/frontend/src/saccubus/converter/Converter.java
+++ b/frontend/src/saccubus/converter/Converter.java
@@ -48,7 +48,9 @@ public class Converter extends AbstractCommand implements Runnable, Callable<Boo
4848 Setting = setting;
4949 }
5050
51+ @Override
5152 public Boolean call() throws Exception {
53+ System.out.println("Convert Thread Start");
5254 boolean result = false;
5355 try {
5456 result = runConvert();
@@ -58,6 +60,7 @@ public class Converter extends AbstractCommand implements Runnable, Callable<Boo
5860 return Boolean.valueOf(result);
5961 }
6062
63+ @Override
6164 public void run() {
6265 try {
6366 call();
--- a/frontend/src/saccubus/converter/FfmpegCommand.java
+++ b/frontend/src/saccubus/converter/FfmpegCommand.java
@@ -179,7 +179,7 @@ public class FfmpegCommand extends AbstractCommand {
179179 while ((e = ebr.readLine()) != null) {
180180 String state = e;
181181 if (state.startsWith("frame=")) {
182- sendText(state);
182+ sendText(state, false);
183183 } else if (!state.endsWith("No accelerated colorspace conversion found")) {
184184 logger.log(Level.INFO, e);
185185 }
--- a/frontend/src/saccubus/converter/filegetter/LoginInfo.java
+++ b/frontend/src/saccubus/converter/filegetter/LoginInfo.java
@@ -4,6 +4,7 @@
44 */
55 package saccubus.converter.filegetter;
66
7+import org.apache.commons.lang.builder.ToStringBuilder;
78 import saccubus.converter.profile.Proxy;
89
910 /**
@@ -33,4 +34,10 @@ public class LoginInfo {
3334 public Proxy getProxy() {
3435 return proxy;
3536 }
37+
38+ @Override
39+ public String toString() {
40+ return new ToStringBuilder(this).append("mail: " + !mail.isEmpty()).append("pass: " + !pass.isEmpty()).append(
41+ proxy).toString();
42+ }
3643 }
--- a/frontend/src/saccubus/converter/profile/CommentGetInfo.java
+++ b/frontend/src/saccubus/converter/profile/CommentGetInfo.java
@@ -4,6 +4,8 @@
44 */
55 package saccubus.converter.profile;
66
7+import org.apache.commons.lang.builder.ToStringBuilder;
8+
79 /**
810 * コメント取得に関するプロファイルです.
911 * @author yuki
@@ -34,4 +36,9 @@ public class CommentGetInfo {
3436 public boolean isReduceComment() {
3537 return reduceComment;
3638 }
39+
40+ @Override
41+ public String toString() {
42+ return ToStringBuilder.reflectionToString(this);
43+ }
3744 }
--- a/frontend/src/saccubus/converter/profile/Ffmpeg.java
+++ b/frontend/src/saccubus/converter/profile/Ffmpeg.java
@@ -2,6 +2,7 @@
22 package saccubus.converter.profile;
33
44 import java.io.File;
5+import org.apache.commons.lang.builder.ToStringBuilder;
56
67 /**
78 *
@@ -86,4 +87,9 @@ public class Ffmpeg {
8687 public NgSetting getNgSetting() {
8788 return ngSetting;
8889 }
90+
91+ @Override
92+ public String toString() {
93+ return ToStringBuilder.reflectionToString(this);
94+ }
8995 }
--- a/frontend/src/saccubus/converter/profile/GeneralSetting.java
+++ b/frontend/src/saccubus/converter/profile/GeneralSetting.java
@@ -2,6 +2,7 @@
22 package saccubus.converter.profile;
33
44 import java.io.File;
5+import org.apache.commons.lang.builder.ToStringBuilder;
56
67 public class GeneralSetting {
78
@@ -14,4 +15,9 @@ public class GeneralSetting {
1415 public File getTempDir() {
1516 return tempDir;
1617 }
18+
19+ @Override
20+ public String toString() {
21+ return ToStringBuilder.reflectionToString(this);
22+ }
1723 }
--- a/frontend/src/saccubus/converter/profile/InputFileSetting.java
+++ b/frontend/src/saccubus/converter/profile/InputFileSetting.java
@@ -1,6 +1,8 @@
11 /* $Id$ */
22 package saccubus.converter.profile;
33
4+import org.apache.commons.lang.builder.ToStringBuilder;
5+
46 /**
57 *
68 * @author yuki
@@ -33,5 +35,9 @@ public class InputFileSetting {
3335 public boolean isDelete() {
3436 return delete;
3537 }
36-}
3738
39+ @Override
40+ public String toString() {
41+ return ToStringBuilder.reflectionToString(this);
42+ }
43+}
--- a/frontend/src/saccubus/converter/profile/NgSetting.java
+++ b/frontend/src/saccubus/converter/profile/NgSetting.java
@@ -1,6 +1,8 @@
11 /* $Id$ */
22 package saccubus.converter.profile;
33
4+import org.apache.commons.lang.builder.ToStringBuilder;
5+
46 /**
57 * NG設定.
68 * @author yuki
@@ -22,4 +24,9 @@ public class NgSetting {
2224 public String getId() {
2325 return id;
2426 }
27+
28+ @Override
29+ public String toString() {
30+ return ToStringBuilder.reflectionToString(this);
31+ }
2532 }
--- a/frontend/src/saccubus/converter/profile/OutputFileSetting.java
+++ b/frontend/src/saccubus/converter/profile/OutputFileSetting.java
@@ -4,6 +4,8 @@
44 */
55 package saccubus.converter.profile;
66
7+import org.apache.commons.lang.builder.ToStringBuilder;
8+
79 /**
810 *
911 * @author yuki
@@ -44,4 +46,9 @@ public class OutputFileSetting {
4446 public SFile getFile() {
4547 return file;
4648 }
49+
50+ @Override
51+ public String toString() {
52+ return ToStringBuilder.reflectionToString(this);
53+ }
4754 }
--- a/frontend/src/saccubus/converter/profile/Profile.java
+++ b/frontend/src/saccubus/converter/profile/Profile.java
@@ -1,6 +1,7 @@
11 /* $Id$ */
22 package saccubus.converter.profile;
33
4+import org.apache.commons.lang.builder.ToStringBuilder;
45 import saccubus.converter.filegetter.LoginInfo;
56
67 /**
@@ -82,4 +83,9 @@ public class Profile {
8283 public GeneralSetting getGeneralSetting() {
8384 return generalSetting;
8485 }
86+
87+ @Override
88+ public String toString(){
89+ return ToStringBuilder.reflectionToString(this);
90+ }
8591 }
--- a/frontend/src/saccubus/converter/profile/Proxy.java
+++ b/frontend/src/saccubus/converter/profile/Proxy.java
@@ -2,6 +2,7 @@
22 package saccubus.converter.profile;
33
44 import org.apache.commons.lang.StringUtils;
5+import org.apache.commons.lang.builder.ToStringBuilder;
56
67 /**
78 *
@@ -33,4 +34,9 @@ public class Proxy {
3334 public int getPort() {
3435 return port;
3536 }
37+
38+ @Override
39+ public String toString() {
40+ return ToStringBuilder.reflectionToString(this);
41+ }
3642 }
--- a/frontend/src/saccubus/converter/profile/SFile.java
+++ b/frontend/src/saccubus/converter/profile/SFile.java
@@ -2,6 +2,7 @@
22 package saccubus.converter.profile;
33
44 import java.io.File;
5+import org.apache.commons.lang.builder.ToStringBuilder;
56
67 /**
78 * さきゅばすで扱うファイルは、「保存するディレクトリ」と、「保存されたファイルそのもの」の2パターンある。
@@ -40,4 +41,9 @@ public class SFile {
4041 public File getFile() {
4142 return file;
4243 }
44+
45+ @Override
46+ public String toString() {
47+ return ToStringBuilder.reflectionToString(this);
48+ }
4349 }
Show on old repository browser