Browse Source

Small fixes

doc-issue-template
MrS0m30n3 10 years ago
parent
commit
659d7d7ac1
11 changed files with 18 additions and 11 deletions
  1. 2
      setup.py
  2. 2
      youtube_dl_gui/DownloadObject.py
  3. 2
      youtube_dl_gui/DownloadThread.py
  4. 7
      youtube_dl_gui/LogManager.py
  5. 2
      youtube_dl_gui/OptionsHandler.py
  6. 2
      youtube_dl_gui/UpdateThread.py
  7. 2
      youtube_dl_gui/Utils.py
  8. 2
      youtube_dl_gui/YDLOptionsParser.py
  9. 4
      youtube_dl_gui/YoutubeDLGUI.py
  10. 2
      youtube_dl_gui/__init__.py
  11. 2
      youtube_dl_gui/__main__.py

2
setup.py

@ -1,4 +1,4 @@
#! /usr/bin/env python
#!/usr/bin/env python2
import sys
from os import name

2
youtube_dl_gui/DownloadObject.py

@ -1,4 +1,4 @@
#! /usr/bin/env python
#!/usr/bin/env python2
import subprocess

2
youtube_dl_gui/DownloadThread.py

@ -1,4 +1,4 @@
#! /usr/bin/env python
#!/usr/bin/env python2
from time import sleep
from threading import Thread

7
youtube_dl_gui/LogManager.py

@ -1,4 +1,4 @@
#! /usr/bin/env python
#!/usr/bin/env python2
import wx
@ -20,6 +20,7 @@ class LogManager(object):
self.config_path = config_path
self.add_time = add_time
self.log_file = self._get_log_file()
self._init_log()
self._auto_clear_log()
def size(self):
@ -42,6 +43,10 @@ class LogManager(object):
fl.write(t)
fl.write(data)
def _init_log(self):
if not file_exist(self.log_file):
self._write('', 'w')
def _auto_clear_log(self):
if self.size() > self.MAX_FILESIZE:
self.clear()

2
youtube_dl_gui/OptionsHandler.py

@ -1,4 +1,4 @@
#! /usr/bin/env python
#!/usr/bin/env python2
import json

2
youtube_dl_gui/UpdateThread.py

@ -1,4 +1,4 @@
#! /usr/bin/env python
#!/usr/bin/env python2
from wx import CallAfter
from wx.lib.pubsub import setuparg1

2
youtube_dl_gui/Utils.py

@ -1,4 +1,4 @@
#! /usr/bin/env python
#!/usr/bin/env python2
import os
import sys

2
youtube_dl_gui/YDLOptionsParser.py

@ -1,4 +1,4 @@
#! /usr/bin/env python
#!/usr/bin/env python2
from .Utils import (
video_is_dash,

4
youtube_dl_gui/YoutubeDLGUI.py

@ -1,4 +1,4 @@
#! /usr/bin/env python
#!/usr/bin/env python2
from time import time
@ -332,6 +332,8 @@ class MainFrame(wx.Frame):
if self.download_thread is not None:
self.download_thread.close(kill=True)
self.download_thread.join()
if self.update_thread is not None:
self.update_thread.join()
self.save_options()
self.Destroy()

2
youtube_dl_gui/__init__.py

@ -1,4 +1,4 @@
#! /usr/bin/env python
#!/usr/bin/env python2
from sys import exit

2
youtube_dl_gui/__main__.py

@ -1,4 +1,4 @@
#! /usr/bin/env python
#!/usr/bin/env python2
import sys

Loading…
Cancel
Save