Skip to content

Commit

Permalink
修复名称开头结尾有空格时,无法下载章节
Browse files Browse the repository at this point in the history
  • Loading branch information
tonquer committed Dec 27, 2021
1 parent e21c66c commit ecee400
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
ubuntu:
runs-on: ubuntu-18.04
env:
PACKAGENAME: jmcomic_py37_ubuntu_x86_64
PACKAGENAME: bika_py37_ubuntu_x86_64
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
Expand All @@ -22,6 +22,9 @@ jobs:
python-version: 3.7
- name: Install dependencies
run: |
ldd --version
apt-get install -y libxcb*
apt-get install -y libvulkan1
python -m pip install --upgrade pip
pip install pyinstaller==4.5.1
pip install https://github.com/tonquer/waifu2x-vulkan/releases/download/v1.0.9/waifu2x_vulkan-1.0.9-cp37-cp37m-linux_x86_64.whl
Expand All @@ -38,10 +41,13 @@ jobs:
cp ../data picacg.AppDir/ -r
cp start/* picacg.AppDir/usr/bin -r
mv picacg.AppDir/usr/bin/start picacg.AppDir/usr/bin/PicACG
chmod +x picacg.AppDir/AppRun
chmod +x picacg.AppDir/usr/bin/PicACG
wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
chmod +x appimagetool-x86_64.AppImage
./appimagetool-x86_64.AppImage picacg.AppDir
chmod +x PicACG-x86_64.AppImage
mv PicACG-x86_64.AppImage ../../
cd ../../
- name: Upload
Expand Down
1 change: 1 addition & 0 deletions src/server/sql_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ def Search(wordList, isTitle, isAutor, isDes, isTag, isCategory, isCreator, page
if not word:
continue
if isTitle:
data3 += " title like '%{}%' or ".format(Converter('zh-hans').convert(word).replace("'", "''"))
data3 += " title2 like '%{}%' or ".format(Converter('zh-hans').convert(word).replace("'", "''"))
if isAutor:
data3 += " author like '%{}%' or ".format(Converter('zh-hans').convert(word).replace("'", "''"))
Expand Down
2 changes: 1 addition & 1 deletion src/tools/tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ def GetModelByIndex(noise, scale, index):

@staticmethod
def GetCanSaveName(name):
return re.sub('[\\\/:*?"<>|\0\r\n]', '', name).rstrip(".")
return re.sub('[\\\/:*?"<>|\0\r\n]', '', name).rstrip(".").strip(" ")

@staticmethod
def LoadCachePicture(filePath):
Expand Down

0 comments on commit ecee400

Please sign in to comment.