Skip to content

Commit

Permalink
update v1.1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
tonquer committed Jul 4, 2021
1 parent 82f13e6 commit 7cb4f2b
Show file tree
Hide file tree
Showing 32 changed files with 2,082 additions and 262 deletions.
6 changes: 3 additions & 3 deletions conf/config.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import sys

BaseUrl = "http://68.183.234.72/" # 获得ip列表接口
Url = "https://picaapi.picacomic.com/" # 域名
ApiKey = "C69BAF41DA5ABD1FFEDC6D2FEA56B" # apiKey
Expand Down Expand Up @@ -31,7 +29,9 @@

UpdateUrl = "https://github.com/tonquer/picacg-windows/releases/latest"
UpdateUrl2 = "https://github.com/tonquer/picacg-windows/releases"
UpdateVersion = "v1.1.8"
DatabaseUpdate = "https://raw.githubusercontent.com/tonquer/picacg-database/main/version.txt"
DatabaseDownload = "https://raw.githubusercontent.com/tonquer/picacg-database/main/data/"
UpdateVersion = "v1.1.9"

# waifu2x
CanWaifu2x = True
Expand Down
Binary file modified data/book.db
Binary file not shown.
1 change: 0 additions & 1 deletion qss/build.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import base64
import os
import subprocess

fw = open("qss.py", "w+")
fw.write("import base64\n\n\n")
Expand Down
3 changes: 2 additions & 1 deletion resources/build.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import base64
import os
import subprocess

fw = open("resources.py", "w+")
fw.write("import base64\n\n\n")
Expand All @@ -13,6 +12,8 @@
continue
if len(name.split(".")) >= 3:
continue
if not os.path.isfile(name):
continue
f = open(name, "rb")
# fw.write("def get():\r\n return )
i = 0
Expand Down
10 changes: 9 additions & 1 deletion resources/resources.py

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion src/qt/download/download_info.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import os
import os
import weakref

from conf import config
Expand Down
Empty file added src/qt/game/__init__.py
Empty file.
81 changes: 81 additions & 0 deletions src/qt/game/qt_game.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
import json

from PySide2 import QtWidgets

from src.qt.qtmain import QtOwner
from src.qt.util.qttask import QtTaskBase
from src.server import req
from src.util import Log
from ui.game import Ui_Game


class QtGame(QtWidgets.QWidget, Ui_Game, QtTaskBase):
def __init__(self):
super(self.__class__, self).__init__()
Ui_Game.__init__(self)
QtTaskBase.__init__(self)
self.setupUi(self)
self.bookList.InitBook(self.LoadNextPage)
self.bookList.doubleClicked.connect(self.OpenGameInfo)
self.bookList.InstallCategory()


def OpenGameInfo(self, modelIndex):
index = modelIndex.row()
item = self.bookList.item(index)
if not item:
return
widget = self.bookList.itemWidget(item)
if not widget:
return
bookId = widget.id
if not bookId:
return
QtOwner().owner.gameInfoForm.OpenBook(bookId)

def SwitchCurrent(self):
self.bookList.clear()
self.bookList.page = 1
self.bookList.pages = 1
self.spinBox.setValue(1)
self.spinBox.setMaximum(self.bookList.pages)
self.bookList.UpdateState()
self.UpdatePageLabel()
QtOwner().owner.loadingForm.show()
self.RefreshData()
pass

def RefreshData(self):
self.AddHttpTask(req.GetGameReq(self.bookList.page), callBack=self.InitGameBack)

def InitGameBack(self, data):
QtOwner().owner.loadingForm.close()
self.bookList.UpdateState()
try:
data = json.loads(data)
page = data.get("data").get("games").get("page", 1)
pages = data.get("data").get("games").get("pages", 1)
self.bookList.UpdatePage(page, pages)
self.spinBox.setMaximum(self.bookList.pages)
self.UpdatePageLabel()
for info in data.get("data").get("games").get("docs"):
self.bookList.AddBookItem(info)
except Exception as es:
Log.Error(es)

def JumpPage(self):
page = int(self.spinBox.text())
if page > self.bookList.pages:
return
self.bookList.page = page
self.bookList.clear()
self.UpdatePageLabel()
self.RefreshData()

def LoadNextPage(self):
self.bookList.page += 1
self.RefreshData()
self.UpdatePageLabel()

def UpdatePageLabel(self):
self.pages.setText("页:{}/{}".format(str(self.bookList.page), str(self.bookList.pages)))
Loading

0 comments on commit 7cb4f2b

Please sign in to comment.