Skip to content

Commit

Permalink
update v1.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tonquer committed Jul 14, 2024
1 parent 5f8e5fb commit 5459355
Show file tree
Hide file tree
Showing 72 changed files with 4,744 additions and 892 deletions.
37 changes: 12 additions & 25 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,21 @@ on:
jobs:

macos:
runs-on: macos-11
runs-on: macos-12
env:
PACKAGENAME: bika_py37_macos_x86_64
PACKAGENAME: bika_py37_macos
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python 3.7
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyinstaller==4.5.1
pip install PySide6==6.1.3
pip install websocket-client==0.59.0
pip install requests==2.26.0
pip install urllib3==1.25.11
pip install pillow==8.3.2
pip install Pysocks==1.7.1
pip install natsort==8.2.0
pip install pyinstaller==4.6
pip install https://github.com/tonquer/waifu2x-vulkan/releases/download/v1.1.6/waifu2x_vulkan-1.1.6-cp37-cp37m-macosx_10_15_x86_64.whl
pip install -r src/requirements_macos.txt
brew install create-dmg
- name: Build
run: |
Expand Down Expand Up @@ -114,24 +108,17 @@ jobs:
env:
PACKAGENAME: bika_py37_windows7_x64
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python 3.7
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyinstaller==4.5.1
pip install pyinstaller==4.6
pip install pywin32==302
pip install PySide6==6.1.3
pip install websocket-client==0.59.0
pip install requests==2.26.0
pip install urllib3==1.25.11
pip install pillow==8.3.2
pip install Pysocks==1.7.1
pip install natsort==8.2.0
pip install waifu2x-vulkan==1.1.6
pip install -r src\requirements_win7.txt
- name: Build
run: |
cd src
Expand All @@ -157,9 +144,9 @@ jobs:
env:
PACKAGENAME: bika_py37_linux
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python 3.7
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.7
- name: Install dependencies
Expand Down
37 changes: 12 additions & 25 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,24 +47,18 @@ jobs:
env:
PACKAGENAME: ${{ needs.setup.outputs.PACKAGE_PREFIX }}_macos_x64
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python 3.7
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.7

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyinstaller==4.5.1
pip install PySide6==6.1.3
pip install websocket-client==0.59.0
pip install requests==2.26.0
pip install urllib3==1.25.11
pip install pillow==8.3.2
pip install Pysocks==1.7.1
pip install natsort==8.2.0
pip install pyinstaller==4.6
pip install https://github.com/tonquer/waifu2x-vulkan/releases/download/v1.1.6/waifu2x_vulkan-1.1.6-cp37-cp37m-macosx_10_15_x86_64.whl
pip install -r src/requirements_macos.txt
brew install create-dmg
- name: Build
run: |
Expand Down Expand Up @@ -118,9 +112,9 @@ jobs:
env:
PACKAGENAME: ${{ needs.setup.outputs.PACKAGE_PREFIX }}_windows_x64
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python 3.7
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.7

Expand Down Expand Up @@ -164,25 +158,18 @@ jobs:
env:
PACKAGENAME: ${{ needs.setup.outputs.PACKAGE_PREFIX }}_windows7_x64
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python 3.7
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.7

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyinstaller==4.5.1
pip install pyinstaller==4.6
pip install pywin32==302
pip install PySide6==6.1.3
pip install websocket-client==0.59.0
pip install requests==2.26.0
pip install urllib3==1.25.11
pip install pillow==8.3.2
pip install waifu2x-vulkan==1.1.6
pip install Pysocks==1.7.1
pip install natsort==8.2.0
pip install -r src\requirements_win7.txt
- name: Build
run: |
cd src
Expand Down Expand Up @@ -217,9 +204,9 @@ jobs:
env:
PACKAGENAME: ${{ needs.setup.outputs.PACKAGE_PREFIX }}_linux_x64
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python 3.7
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.7
- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions res/appimage/AppRun
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ if [ ! -f ~/.picacg/db/version ];then
echo "mkdir version"
fi

if [ ! -f ~/.picacg/db/book.db ] || [ "`cat ~/.picacg/db/version`" != "v1.4.9" ] ; then
if [ ! -f ~/.picacg/db/book.db ] || [ "`cat ~/.picacg/db/version`" != "v1.5.0" ] ; then
cp ${HERE}/db/book.db ~/.picacg/db/
echo "v1.4.9" > ~/.picacg/db/version
echo "v1.5.0" > ~/.picacg/db/version
echo "copy db"
fi

Expand Down
1 change: 1 addition & 0 deletions res/icon/shiled.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions res/icon/upload.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions res/images.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@
<file>icon/icon_picacg.png</file>
<file>icon/clear_on.png</file>
<file>icon/clear_off.png</file>
<file>icon/upload.svg</file>
<file>icon/shiled.svg</file>
</qresource>
<qresource prefix="icon">
<file>theme/dark_pink/disabled/base.svg</file>
Expand Down
42 changes: 36 additions & 6 deletions src/component/list/comic_list_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,19 @@ def SelectMenuBook(self, pos):
if not self.isLocal:
action = popMenu.addAction(Str.GetStr(Str.Open))
action.triggered.connect(partial(self.OpenBookInfoHandler, index))

nas = QMenu(Str.GetStr(Str.NetNas))
nasDict = QtOwner().owner.nasView.nasDict
if not nasDict:
action = nas.addAction(Str.GetStr(Str.CvSpace))
action.setEnabled(False)
else:
for k, v in nasDict.items():
action = nas.addAction(v.showTitle)
if QtOwner().nasView.IsInUpload(k, widget.id):
action.setEnabled(False)
action.triggered.connect(partial(self.NasUploadHandler, k, index))
popMenu.addMenu(nas)

action = popMenu.addAction(Str.GetStr(Str.LookCover))
action.triggered.connect(partial(self.OpenPicture, index))
action = popMenu.addAction(Str.GetStr(Str.ReDownloadCover))
Expand Down Expand Up @@ -100,7 +112,8 @@ def AddBookByDict(self, v):
likesCount = str(v.get("totalLikes", ""))
finished = v.get("finished")
pagesCount = v.get("pagesCount")
self.AddBookItem(_id, title, categoryStr, url, path, likesCount, "", pagesCount, finished)
isShiled = QtOwner().IsInFilter(categoryStr, "", title)
self.AddBookItem(_id, title, categoryStr, url, path, likesCount, "", pagesCount, finished, isShiled=isShiled)

def AddBookByLocal(self, v, category=""):
from task.task_local import LocalData
Expand Down Expand Up @@ -160,7 +173,14 @@ def AddBookItemByBook(self, v, isShowHistory=False, isShowToolButton=False):
isShowToolButton = True

categories = Str.GetStr(Str.LastLook) + str(info.epsId + 1) + Str.GetStr(Str.Chapter) + "/" + str(v.epsCount) + Str.GetStr(Str.Chapter)
self.AddBookItem(_id, title, categories, url, path, likesCount, updated_at, pagesCount, finished, isShowToolButton=isShowToolButton)
if hasattr(v, "tags") and isinstance(v.tags, list):
tags = ",".join(v.tags)
elif hasattr(v, "tags") and isinstance(v.tags, str):
tags = v.tags
else:
tags = ""
isShiled = QtOwner().IsInFilter(categories, tags, title)
self.AddBookItem(_id, title, categories, url, path, likesCount, updated_at, pagesCount, finished, isShowToolButton=isShowToolButton, isShiled=isShiled)

def AddBookItemByHistory(self, v):
_id = v.bookId
Expand All @@ -170,9 +190,9 @@ def AddBookItemByHistory(self, v):
categories = "{} {}".format(ToolUtil.GetUpdateStrByTick(v.tick), Str.GetStr(Str.Looked))
self.AddBookItem(_id, title, categories, url, path)

def AddBookItem(self, _id, title, categoryStr="", url="", path="", likesCount="", updated_at="", pagesCount="", finished="", isShowToolButton=False):
def AddBookItem(self, _id, title, categoryStr="", url="", path="", likesCount="", updated_at="", pagesCount="", finished="", isShowToolButton=False, isShiled=False):
index = self.count()
widget = ComicItemWidget()
widget = ComicItemWidget(isShiled=isShiled)
widget.setFocusPolicy(Qt.NoFocus)
widget.id = _id
widget.title = title
Expand Down Expand Up @@ -215,7 +235,8 @@ def AddBookItem(self, _id, title, categoryStr="", url="", path="", likesCount=""
item.setFlags(item.flags() & ~Qt.ItemIsSelectable)
item.setSizeHint(widget.sizeHint())
self.setItemWidget(item, widget)
widget.picLabel.setText(Str.GetStr(Str.LoadingPicture))
if not isShiled:
widget.picLabel.setText(Str.GetStr(Str.LoadingPicture))
widget.PicLoad.connect(self.LoadingPicture)
# if url and config.IsLoadingPicture:
# self.AddDownloadTask(url, path, completeCallBack=self.LoadingPictureComplete, backParam=index)
Expand Down Expand Up @@ -261,6 +282,9 @@ def SelectItem(self, item):
assert isinstance(item, QListWidgetItem)
widget = self.itemWidget(item)
assert isinstance(widget, ComicItemWidget)
if widget.isShiled:
QtOwner().ShowError(Str.GetStr(Str.Hidden))
return
if self.isGame:
QtOwner().OpenGameInfo(widget.id)
elif self.isLocalEps:
Expand Down Expand Up @@ -355,5 +379,11 @@ def DownloadHandler(self, index):
def MoveHandler(self, index):
return

def NasUploadHandler(self, nasId, index):
widget = self.indexWidget(index)
if widget:
QtOwner().nasView.AddNasUpload(nasId, widget.id)
pass

def OpenDirHandler(self, index):
return
Loading

0 comments on commit 5459355

Please sign in to comment.