OSDN Git Service

Fix thread title is not saved to idx file.
authorAiwota Programmer <aiwotaprog@tetteke.tk>
Thu, 17 Aug 2006 04:41:39 +0000 (13:41 +0900)
committerAiwota Programmer <aiwotaprog@tetteke.tk>
Thu, 17 Aug 2006 04:41:39 +0000 (13:41 +0900)
src/Hage1/thread_window.py

index 134e222..39ddc85 100644 (file)
@@ -115,6 +115,11 @@ class WinWrap:
                 etag = headers["Etag"]
 
         if self.num > 0:
                 etag = headers["Etag"]
 
         if self.num > 0:
+            if not self.title:
+                self.title = datfile.get_title_from_dat(
+                    self.bbs, self.board, self.thread)
+                if self.title:
+                    self.window.set_title(self.title)
             # save idx
             idx_dic = {"title": self.title, "lineCount": self.num,
                    "lastModified": lastmod, "etag": etag}
             # save idx
             idx_dic = {"title": self.title, "lineCount": self.num,
                    "lastModified": lastmod, "etag": etag}
@@ -140,12 +145,6 @@ class WinWrap:
         self.http_get_dat(save_line_and_append_to_buffer)
         dat_file.close()
 
         self.http_get_dat(save_line_and_append_to_buffer)
         dat_file.close()
 
-        if not self.title:
-            self.title = datfile.get_title_from_dat(
-                self.bbs, self.board, self.thread)
-            if self.title:
-                self.window.set_title(self.title)
-
     def load_dat(self):
         self.size = 0
         self.num = 0
     def load_dat(self):
         self.size = 0
         self.num = 0