Added Cover downloader tool

This commit is contained in:
xlenore
2023-05-08 12:26:56 -04:00
parent e91764f25c
commit 8276b9cba3
9 changed files with 22 additions and 8 deletions

2
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
tools

View File

@@ -1 +0,0 @@
1.0

View File

@@ -26,9 +26,9 @@ import urllib.request
import os, sys
COVERS_URL = 'https://github.com/LouiseSulyvahn/DuckStation_Cover_Downloader/raw/main/covers/'
VERSION_URL = 'https://raw.githubusercontent.com/LouiseSulyvahn/DuckStation_Cover_Downloader/main/version'
VERSION = 1.0
COVERS_URL = 'https://raw.githubusercontent.com/xlenore/psx-covers/main/covers/'
VERSION_URL = 'https://raw.githubusercontent.com/xlenore/psx-covers/main/DuckStation-cover-downloader/version'
VERSION = 1.1
def path():
@@ -73,19 +73,20 @@ def download_covers(serial_list:list): # Download Covers
print('[LOG]:',colored(f'Downloading {game_serial} cover...', 'green'))
try:
urllib.request.urlretrieve(f'{COVERS_URL}{game_serial}.jpg', f'covers/{game_serial}.jpg')
sleep(1)
sleep(0.1)
except HTTPError:
print('[WARNING]',colored(f'{game_serial} Not found. Report it in GitHub please...','yellow'))
print('[WARNING]',colored(f'{game_serial} Not found. Skipping...','yellow'))
else:
print('[WARNING]:',colored(f'{game_serial} already exist in \covers. Skipping...','yellow'))
def run():
check_version()
#check_version()
download_covers(serial_list())
print('[LOG]:', colored(f'Done!', 'green'))
print('[LOG]:', colored(f'Done!, please report Not found | Low quality | Wrong covers in GitHub.', 'green'))
input()
os.system(f'title DuckStation Cover Downloader {VERSION}')
init()
run()

View File

@@ -0,0 +1,2 @@
pyinstaller "DuckStation cover downloader.py" --onefile --clean --distpath ""
@RD /S /Q "build"

View File

@@ -0,0 +1 @@
1.1

View File

@@ -2,6 +2,7 @@
- [PSX Covers](https://github.com/xlenore/psx-covers#psx-covers "PSX Covers")
- [Duckstation Setup](https://github.com/xlenore/psx-covers#duckstation-setup "Duckstation Setup")
- [Duckstation Cover Downloader](https://github.com/xlenore/psx-covers#duckstation-Cover-Downloader "Duckstation Setup")
## PSX Covers
| Serial | Available/Total | Percentage |
@@ -46,6 +47,14 @@ DuckStation has its own cover downloader, upgrade to version **0.1-5227** or hig
[![](https://i.imgur.com/FJWeE0e.gif)](https://i.imgur.com/jTGL0HH.gif)
## Duckstation Cover Downloader
This is an alternative in case you don't want to be copying and pasting the repository url every time you want to download a cover.
- Download [Duckstation Cover Downloader](https://github.com/xlenore/psx-covers/raw/main/Duckstation-cover-downloader/Duckstation%20cover%20downloader.exe) | ([Source Code](https://raw.githubusercontent.com/xlenore/psx-covers/main/Duckstation-cover-downloader/Duckstation%20cover%20downloader.py))
- Put **Duckstation Cover Downloader.exe** in **Documents\DuckStation** folder
- Run the App every time you want to download covers
- Enjoy :)
## Credits
* psxdatacenter.com
* duckstation.org