OSDN Git Service

コンフィグにファイル命名規則を追加
authoryuki <yuki@bdf3b611-c98c-6041-8292-703d9c9adbe7>
Mon, 19 Apr 2010 10:33:28 +0000 (10:33 +0000)
committeryuki <yuki@bdf3b611-c98c-6041-8292-703d9c9adbe7>
Mon, 19 Apr 2010 10:33:28 +0000 (10:33 +0000)
git-svn-id: http://192.168.11.7/svn/repository/NicoBrowser/branches/dev20100419_filename@307 bdf3b611-c98c-6041-8292-703d9c9adbe7

src/nicobrowser/Config.java
src/nicobrowser/gui/config/ConfigFrame.form
src/nicobrowser/gui/config/ConfigFrame.java
src/nicobrowser/main/Main.java

index 5b85c6e..6f57508 100644 (file)
@@ -57,6 +57,7 @@ public final class Config {
     private static final File FEEDURL_FILE = new File(APP_HOME, FEEDURL_NAME);
     public static final String P_PATH_DB = "path.db";
     public static final String P_PATH_SAVEFILE = "path.savefile";
+    public static final String P_SAVEFILE_PATTERN = "savefile.pattern";
     public static final String P_FILE_ENCODING = "encoding";
     public static final String P_NICOVIDEO_MAIL = "nicovideo.mail";
     public static final String P_NICOVIDEO_PASSWORD = "nicovideo.password";
@@ -108,6 +109,7 @@ public final class Config {
 
         updatePropertyValue(p, P_PATH_DB);
         updatePropertyValue(p, P_PATH_SAVEFILE);
+        updatePropertyValue(p, P_SAVEFILE_PATTERN);
 
         updatePropertyValue(p, P_DOWNLOAD_RETRY);
         updatePropertyValue(p, P_DOWNLOAD_WAIT);
@@ -156,6 +158,8 @@ public final class Config {
         savepath.append(saveDir.getAbsolutePath().replaceAll("\\\\", "\\\\\\\\"));
         props.add(savepath);
 
+        props.add(P_SAVEFILE_PATTERN + "={title}");
+
         props.add(P_FILE_ENCODING + "=" + System.getProperty("file.encoding"));
 
         props.add(P_NICOVIDEO_MAIL + "=");
@@ -228,6 +232,11 @@ public final class Config {
         return properties.getString(P_PATH_SAVEFILE);
     }
 
+    /**@return 保存ファイル名の命名規則. */
+    public String fileNamePattern() {
+        return properties.getString(P_SAVEFILE_PATTERN, "{title}");
+    }
+
     /** @return feedurl.txtの文字エンコーディング. */
     public String getEncoding() {
         String res = properties.getString(P_FILE_ENCODING, System.getProperty("file.encoding"));
@@ -292,7 +301,7 @@ public final class Config {
         return FEEDURL_FILE;
     }
 
-    public static File getAppHome(){
+    public static File getAppHome() {
         return APP_HOME;
     }
 }
index f6ee04c..7b0e0af 100644 (file)
@@ -8,7 +8,6 @@
   </Properties>
   <SyntheticProperties>
     <SyntheticProperty name="formSizePolicy" type="int" value="1"/>
-    <SyntheticProperty name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,-125,0,0,1,-107"/>
   </SyntheticProperties>
   <AuxValues>
     <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
   <Layout>
     <DimensionLayout dim="0">
       <Group type="103" groupAlignment="0" attributes="0">
-          <Component id="jPanel1" alignment="0" max="32767" attributes="0"/>
-          <Component id="jPanel2" alignment="0" max="32767" attributes="0"/>
-          <Component id="jPanel4" alignment="0" max="32767" attributes="0"/>
-          <Component id="jPanel3" alignment="0" max="32767" attributes="0"/>
-          <Component id="jPanel5" alignment="0" max="32767" attributes="0"/>
+          <Group type="102" alignment="0" attributes="0">
+              <Component id="jPanel5" max="32767" attributes="0"/>
+              <EmptySpace max="-2" attributes="0"/>
+          </Group>
+          <Group type="102" alignment="1" attributes="0">
+              <Group type="103" groupAlignment="1" attributes="0">
+                  <Component id="jPanel1" alignment="0" max="32767" attributes="0"/>
+                  <Component id="jPanel2" alignment="0" max="32767" attributes="0"/>
+                  <Component id="jPanel4" alignment="0" max="32767" attributes="0"/>
+                  <Component id="jPanel6" alignment="0" max="32767" attributes="0"/>
+                  <Component id="jPanel3" alignment="1" max="32767" attributes="0"/>
+              </Group>
+              <EmptySpace max="-2" attributes="0"/>
+          </Group>
       </Group>
     </DimensionLayout>
     <DimensionLayout dim="1">
@@ -41,6 +49,8 @@
               <EmptySpace max="-2" attributes="0"/>
               <Component id="jPanel4" min="-2" max="-2" attributes="0"/>
               <EmptySpace max="-2" attributes="0"/>
+              <Component id="jPanel6" min="-2" max="-2" attributes="0"/>
+              <EmptySpace max="-2" attributes="0"/>
               <Component id="jPanel3" min="-2" max="-2" attributes="0"/>
               <EmptySpace max="-2" attributes="0"/>
               <Component id="jPanel5" min="-2" max="-2" attributes="0"/>
@@ -69,8 +79,8 @@
                   </Group>
                   <EmptySpace max="-2" attributes="0"/>
                   <Group type="103" groupAlignment="0" attributes="0">
-                      <Component id="feedFileField" alignment="0" pref="301" max="32767" attributes="0"/>
-                      <Component id="configFileField" alignment="0" pref="301" max="32767" attributes="0"/>
+                      <Component id="feedFileField" alignment="0" pref="376" max="32767" attributes="0"/>
+                      <Component id="configFileField" alignment="0" pref="376" max="32767" attributes="0"/>
                   </Group>
               </Group>
               <Group type="102" alignment="0" attributes="0">
                   </Group>
                   <EmptySpace max="-2" attributes="0"/>
                   <Group type="103" groupAlignment="0" attributes="0">
-                      <Component id="passField" pref="302" max="32767" attributes="0"/>
-                      <Component id="idField" alignment="0" pref="302" max="32767" attributes="0"/>
+                      <Component id="passField" pref="377" max="32767" attributes="0"/>
+                      <Component id="idField" alignment="0" pref="377" max="32767" attributes="0"/>
                   </Group>
               </Group>
           </Group>
                   </Group>
                   <EmptySpace max="-2" attributes="0"/>
                   <Group type="103" groupAlignment="0" attributes="0">
-                      <Component id="dbPathField" alignment="1" pref="281" max="32767" attributes="0"/>
-                      <Component id="flvPathField" alignment="1" pref="281" max="32767" attributes="0"/>
+                      <Component id="dbPathField" alignment="1" pref="356" max="32767" attributes="0"/>
+                      <Component id="flvPathField" alignment="1" pref="356" max="32767" attributes="0"/>
                   </Group>
                   <EmptySpace max="-2" attributes="0"/>
                   <Group type="103" groupAlignment="0" attributes="0">
                   </Group>
                   <EmptySpace type="separate" max="-2" attributes="0"/>
                   <Component id="lowDownloadCheckBox" min="-2" max="-2" attributes="0"/>
-                  <EmptySpace pref="49" max="32767" attributes="0"/>
+                  <EmptySpace pref="124" max="32767" attributes="0"/>
               </Group>
           </Group>
         </DimensionLayout>
         <DimensionLayout dim="0">
           <Group type="103" groupAlignment="0" attributes="0">
               <Group type="102" alignment="1" attributes="0">
-                  <EmptySpace pref="332" max="32767" attributes="0"/>
+                  <EmptySpace pref="407" max="32767" attributes="0"/>
                   <Component id="savaButton" min="-2" max="-2" attributes="0"/>
               </Group>
           </Group>
         </Component>
       </SubComponents>
     </Container>
+    <Container class="javax.swing.JPanel" name="jPanel6">
+      <Properties>
+        <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
+          <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
+            <TitledBorder title="&#x30d5;&#x30a1;&#x30a4;&#x30eb;&#x540d;&#x898f;&#x5247;"/>
+          </Border>
+        </Property>
+      </Properties>
+
+      <Layout>
+        <DimensionLayout dim="0">
+          <Group type="103" groupAlignment="0" attributes="0">
+              <Group type="102" alignment="1" attributes="0">
+                  <Group type="103" groupAlignment="1" attributes="0">
+                      <Component id="jScrollPane1" alignment="0" pref="452" max="32767" attributes="0"/>
+                      <Component id="jTextField1" alignment="1" pref="452" max="32767" attributes="0"/>
+                  </Group>
+                  <EmptySpace max="-2" attributes="0"/>
+              </Group>
+          </Group>
+        </DimensionLayout>
+        <DimensionLayout dim="1">
+          <Group type="103" groupAlignment="0" attributes="0">
+              <Group type="102" alignment="0" attributes="0">
+                  <Component id="jTextField1" min="-2" max="-2" attributes="0"/>
+                  <EmptySpace max="-2" attributes="0"/>
+                  <Component id="jScrollPane1" min="-2" pref="71" max="-2" attributes="0"/>
+              </Group>
+          </Group>
+        </DimensionLayout>
+      </Layout>
+      <SubComponents>
+        <Component class="javax.swing.JTextField" name="jTextField1">
+        </Component>
+        <Container class="javax.swing.JScrollPane" name="jScrollPane1">
+          <AuxValues>
+            <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
+          </AuxValues>
+
+          <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
+          <SubComponents>
+            <Component class="javax.swing.JTextArea" name="jTextArea1">
+              <Properties>
+                <Property name="columns" type="int" value="20"/>
+                <Property name="editable" type="boolean" value="false"/>
+                <Property name="lineWrap" type="boolean" value="true"/>
+                <Property name="rows" type="int" value="5"/>
+                <Property name="text" type="java.lang.String" value="{title}: &#x52d5;&#x753b;&#x30bf;&#x30a4;&#x30c8;&#x30eb;&#xa;{id}: &#x30cb;&#x30b3;&#x30cb;&#x30b3;&#x52d5;&#x753b;ID&#xa;{low}: &#x30a8;&#x30b3;&#x30ce;&#x30df;&#x30fc;&#x52d5;&#x753b;&#x3067;&#x3042;&#x308c;&#x3070;&quot;low&quot;&#x306e;&#x6587;&#x5b57;&#x5217;&#x3001;&#x901a;&#x5e38;&#x52d5;&#x753b;&#x306f;&#x7a7a;&#x6587;&#x5b57;&#x5217;"/>
+              </Properties>
+            </Component>
+          </SubComponents>
+        </Container>
+      </SubComponents>
+    </Container>
   </SubComponents>
 </Form>
index 55f2456..0ec767c 100644 (file)
@@ -83,6 +83,10 @@ public class ConfigFrame extends javax.swing.JFrame {
         lowDownloadCheckBox = new javax.swing.JCheckBox();
         jPanel5 = new javax.swing.JPanel();
         savaButton = new javax.swing.JButton();
+        jPanel6 = new javax.swing.JPanel();
+        jTextField1 = new javax.swing.JTextField();
+        jScrollPane1 = new javax.swing.JScrollPane();
+        jTextArea1 = new javax.swing.JTextArea();
 
         setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
         setTitle("NicoBrowser - コンフィグ設定");
@@ -110,8 +114,8 @@ public class ConfigFrame extends javax.swing.JFrame {
                     .add(feedFileLabel))
                 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                 .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
-                    .add(feedFileField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 301, Short.MAX_VALUE)
-                    .add(configFileField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 301, Short.MAX_VALUE)))
+                    .add(feedFileField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 376, Short.MAX_VALUE)
+                    .add(configFileField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 376, Short.MAX_VALUE)))
             .add(jPanel1Layout.createSequentialGroup()
                 .add(jLabel5)
                 .addContainerGap())
@@ -147,8 +151,8 @@ public class ConfigFrame extends javax.swing.JFrame {
                     .add(passLabel))
                 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                 .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
-                    .add(passField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 302, Short.MAX_VALUE)
-                    .add(idField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 302, Short.MAX_VALUE)))
+                    .add(passField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 377, Short.MAX_VALUE)
+                    .add(idField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 377, Short.MAX_VALUE)))
         );
         jPanel2Layout.setVerticalGroup(
             jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
@@ -192,8 +196,8 @@ public class ConfigFrame extends javax.swing.JFrame {
                     .add(jLabel3))
                 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                 .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
-                    .add(org.jdesktop.layout.GroupLayout.TRAILING, dbPathField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 281, Short.MAX_VALUE)
-                    .add(org.jdesktop.layout.GroupLayout.TRAILING, flvPathField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 281, Short.MAX_VALUE))
+                    .add(org.jdesktop.layout.GroupLayout.TRAILING, dbPathField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 356, Short.MAX_VALUE)
+                    .add(org.jdesktop.layout.GroupLayout.TRAILING, flvPathField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 356, Short.MAX_VALUE))
                 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                 .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                     .add(org.jdesktop.layout.GroupLayout.TRAILING, flvPathButton)
@@ -237,7 +241,7 @@ public class ConfigFrame extends javax.swing.JFrame {
                         .add(retrySpinner)))
                 .add(18, 18, 18)
                 .add(lowDownloadCheckBox)
-                .addContainerGap(49, Short.MAX_VALUE))
+                .addContainerGap(124, Short.MAX_VALUE))
         );
         jPanel3Layout.setVerticalGroup(
             jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
@@ -266,7 +270,7 @@ public class ConfigFrame extends javax.swing.JFrame {
         jPanel5Layout.setHorizontalGroup(
             jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
             .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel5Layout.createSequentialGroup()
-                .addContainerGap(332, Short.MAX_VALUE)
+                .addContainerGap(407, Short.MAX_VALUE)
                 .add(savaButton))
         );
         jPanel5Layout.setVerticalGroup(
@@ -274,15 +278,48 @@ public class ConfigFrame extends javax.swing.JFrame {
             .add(savaButton)
         );
 
+        jPanel6.setBorder(javax.swing.BorderFactory.createTitledBorder("ファイル名規則"));
+
+        jTextArea1.setColumns(20);
+        jTextArea1.setEditable(false);
+        jTextArea1.setLineWrap(true);
+        jTextArea1.setRows(5);
+        jTextArea1.setText("{title}: 動画タイトル\n{id}: ニコニコ動画ID\n{low}: エコノミー動画であれば\"low\"の文字列、通常動画は空文字列");
+        jScrollPane1.setViewportView(jTextArea1);
+
+        org.jdesktop.layout.GroupLayout jPanel6Layout = new org.jdesktop.layout.GroupLayout(jPanel6);
+        jPanel6.setLayout(jPanel6Layout);
+        jPanel6Layout.setHorizontalGroup(
+            jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+            .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel6Layout.createSequentialGroup()
+                .add(jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
+                    .add(org.jdesktop.layout.GroupLayout.LEADING, jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 452, Short.MAX_VALUE)
+                    .add(jTextField1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 452, Short.MAX_VALUE))
+                .addContainerGap())
+        );
+        jPanel6Layout.setVerticalGroup(
+            jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+            .add(jPanel6Layout.createSequentialGroup()
+                .add(jTextField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+                .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 71, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+        );
+
         org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
         getContentPane().setLayout(layout);
         layout.setHorizontalGroup(
             layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
-            .add(jPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-            .add(jPanel2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-            .add(jPanel4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-            .add(jPanel3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-            .add(jPanel5, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+            .add(layout.createSequentialGroup()
+                .add(jPanel5, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                .addContainerGap())
+            .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
+                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
+                    .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                    .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                    .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                    .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel6, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                    .add(jPanel3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+                .addContainerGap())
         );
         layout.setVerticalGroup(
             layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
@@ -293,6 +330,8 @@ public class ConfigFrame extends javax.swing.JFrame {
                 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                 .add(jPanel4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+                .add(jPanel6, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                 .add(jPanel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                 .add(jPanel5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
@@ -384,6 +423,10 @@ public class ConfigFrame extends javax.swing.JFrame {
     private javax.swing.JPanel jPanel3;
     private javax.swing.JPanel jPanel4;
     private javax.swing.JPanel jPanel5;
+    private javax.swing.JPanel jPanel6;
+    private javax.swing.JScrollPane jScrollPane1;
+    private javax.swing.JTextArea jTextArea1;
+    private javax.swing.JTextField jTextField1;
     private javax.swing.JCheckBox lowDownloadCheckBox;
     private javax.swing.JPasswordField passField;
     private javax.swing.JLabel passLabel;
index 8961bec..1db8ca3 100644 (file)
@@ -18,6 +18,7 @@ import javax.swing.SwingUtilities;
 import nicobrowser.Config;
 import nicobrowser.GetFlvResult;
 import nicobrowser.Config.NicoFeed;
+import nicobrowser.NamePattern;
 import nicobrowser.NicoHttpClient;
 import nicobrowser.ProgressListener;
 import nicobrowser.VideoInfo;
@@ -188,12 +189,12 @@ public class Main {
                     }
                 }
                 prevDate = Calendar.getInstance().getTime();
-                File saveLocation = new File(config.getSrcSaveDir(), c.getFileName());
+                File saveDir = new File(config.getSrcSaveDir());
+                NamePattern np = new NamePattern(config.fileNamePattern(), c.getFileName());
                 log.info("ファイルを取得します: " + c.getNicoId() + " " + c.getTitle());
                 try {
                     VideoInfo vi = instance.getVideoInfo(c.getNicoId());
-                    GetFlvResult result = instance.getFlvFile(vi,
-                            saveLocation.getCanonicalPath(), c.getStatus(), config.needLowFile(),
+                    GetFlvResult result = instance.getFlvFile(vi, saveDir, np, c.getStatus(), config.needLowFile(),
                             ProgressListener.EMPTY_LISTENER);
                     c.setAuthor(result.getAuthor());
                     Status status = result.getStatus();