From 3be383c750da4d59c0a6862d3908dcca6be312ca Mon Sep 17 00:00:00 2001
From: Jerry Yan <792602257@qq.com>
Date: Fri, 18 Oct 2019 22:37:20 +0800
Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E5=A7=8B=E4=B8=8A=E4=BC=A0=E5=B0=B1?=
 =?UTF-8?q?=E7=99=BB=E9=99=86=E4=B8=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 Common.py         | 11 +++++------
 liveDownloader.py |  1 +
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/Common.py b/Common.py
index 53b074e..5ffb686 100644
--- a/Common.py
+++ b/Common.py
@@ -36,11 +36,6 @@ network = [{
 }]
 
 
-def loginBilibili():
-    res = b.login(config["b_u"], config["b_p"])
-    appendOperation("登陆账号,结果为:["+res+"]")
-
-
 def updateNetwork():
     global network
     network.append({
@@ -147,7 +142,6 @@ downloadStatus = []
 encodeStatus = []
 errors = []
 operations = []
-loginBilibili()
 
 
 def appendOperation(obj):
@@ -265,6 +259,11 @@ def appendError(obj):
     errors = errors[-config["elc"]:]
 
 
+def loginBilibili():
+    res = b.login(config["b_u"], config["b_p"])
+    appendOperation("登陆账号,结果为:["+res+"]")
+
+
 class downloader(XiGuaLiveApi):
     playlist = None
 
diff --git a/liveDownloader.py b/liveDownloader.py
index b27bf4c..69fb4b8 100644
--- a/liveDownloader.py
+++ b/liveDownloader.py
@@ -80,6 +80,7 @@ def encode():
 def upload():
     date=datetime.strftime(datetime.now(), "%Y_%m_%d")
     Common.appendUploadStatus("Upload Daemon Starting")
+    Common.loginBilibili()
     i = Common.uploadQueue.get()
     while True:
         Common.doClean()