Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added multiple QoL improvements + fixed slow download speeds #112

Merged
merged 4 commits into from
Jan 28, 2024

Conversation

rursache
Copy link
Contributor

@rursache rursache commented Jan 23, 2024

  • Added "Bypass SSL" option to ignore the weird Sony SSL when grabbing update meta file (without this sometimes Windows would not load the meta file)
  • Added "Add all updates to queue automatically" option to more quickly search for a title id and add all the updates to queue without opening the additional window
  • Exported links will contain #name and #folder to easily import them in jDownloader. The format for the folder is GAME [TITLEID] and the update files will be renamed to GAME [TITLEID] VERSION.pkg (make sure to import the jDownloader packagizer rule)
  • Fixed slow download speeds (Is it multi-threaded to download the update file? #7)
  • Folder and file names are now using the same format as the exported URL params
  • Improved title id detection (eg. BLES01807 was working but BLES-01807 was not. The dashes are now ignored)

…g update meta file (without this sometimes Windows would not load the meta file)

- Added "Add all updates to queue automatically" option to more quickly search for a title id and add all the updates to queue without opening the additional window
- Exported links will contain `#name` and `#folder` to easily import them in jDownloader. The format for the folder is `GAME [TITLEID]` and the update files will be renamed to `GAME [TITLEID] VERSION.pkg` (make sure to import the jDownloader packagizer rule
- Improved title id detection (eg. "BLES01807" was working but "BLES-01807" was not. The dashes are now ignored)
- Folder and file names are now using the same format as the exported URL params
@rursache rursache changed the title Added multiple QoL improvements Added multiple QoL improvements + fixed slow download speeds Jan 23, 2024
@shinrax2
Copy link
Owner

overall looks good
but gotta take a closer look before i merge it

@@ -256,9 +269,9 @@ def downloadFiles(self, window):
sha1 = dl["sha1"]
size = dl["size"]
id = dl["gameid"]
fdir = os.path.join(self.getConfig("dldir")+"/", utils.filterIllegalCharsFilename(self.getTitleNameFromId(id))+"["+id+"]/")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since some linux tools have problems with spaces in filenames/paths its preferable to use an underscore

if self.getConfig("rename_pkgs") == True:
fname = os.path.join(fdir, utils.filterIllegalCharsFilename(self.getTitleNameFromId(id)+"_["+id+"]_"+dl["version"]+".pkg"))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since some linux tools have problems with spaces in filenames/paths its preferable to use an underscore

except requests.exceptions.ConnectionError:
self.logger.log(self.loc.getKey("msg_metaNotAvailable"), "e")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add "e" back in as second parameter

@@ -31,6 +31,8 @@
import requests.adapters
import keyring

requests.packages.urllib3.disable_warnings(category=InsecureRequestWarning)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove this
atleast the user should be informed that bypassing ssl checks are insecure

@@ -1,3 +1,3 @@
[
{"filetypeFilter":{"customs":null,"matchType":"IS","archivesEnabled":false,"audioFilesEnabled":false,"docFilesEnabled":false,"exeFilesEnabled":false,"hashEnabled":false,"imagesEnabled":false,"subFilesEnabled":false,"useRegex":false,"videoFilesEnabled":false,"enabled":false},"originFilter":{"matchType":"IS","origins":[],"enabled":false},"hosterURLFilter":{"matchType":"CONTAINS","regex":"","useRegex":false,"enabled":false},"onlineStatusFilter":{"matchType":"IS","onlineStatus":"OFFLINE","enabled":false},"chunks":-1,"created":1706014137186,"sourceURLFilter":{"matchType":"CONTAINS","regex":".*ww.np.dl.playstation.net.*#name=(.+)","useRegex":true,"enabled":true},"conditionFilter":{"conditions":[],"matchType":"IS_TRUE","enabled":false},"testUrl":"","enabled":true,"filename":"<jd:source:1>","packagenameFilter":{"matchType":"CONTAINS","regex":"","useRegex":false,"enabled":false},"filenameFilter":{"matchType":"CONTAINS","regex":"","useRegex":false,"enabled":false},"name":"rename ps3 pkg","matchAlwaysFilter":{"enabled":false},"pluginStatusFilter":{"matchType":"IS","pluginStatus":"PREMIUM","enabled":false},"filesizeFilter":{"from":0,"matchType":"BETWEEN","to":0,"enabled":false}}
{"filetypeFilter":{"customs":null,"matchType":"IS","archivesEnabled":false,"audioFilesEnabled":false,"docFilesEnabled":false,"exeFilesEnabled":false,"hashEnabled":false,"imagesEnabled":false,"subFilesEnabled":false,"useRegex":false,"videoFilesEnabled":false,"enabled":false},"originFilter":{"matchType":"IS","origins":[],"enabled":false},"hosterURLFilter":{"matchType":"CONTAINS","regex":"","useRegex":true,"enabled":false},"onlineStatusFilter":{"matchType":"IS","onlineStatus":"OFFLINE","enabled":false},"chunks":10,"created":1706018868842,"sourceURLFilter":{"matchType":"CONTAINS","regex":".*ww.np.dl.playstation.net.*#folder=(.+)#name=(.+)","useRegex":true,"enabled":true},"conditionFilter":{"conditions":[],"matchType":"IS_TRUE","enabled":false},"testUrl":"http://b0.ww.np.dl.playstation.net/tppkg/np/BLES01807/BLES01807_T29/45755cadf6f036f0/EP1004-BLES01807_00-GTAVTITLEUPDATER-A0106-V0100-PE.pkg#folder=Grand%20Theft%20Auto%20V%20%28PAL%29%20%5BBLES01807%5D#name=Grand%20Theft%20Auto%20V%20%28PAL%29_%5BBLES01807%5D_01.06.pkg","enabled":true,"autoForcedStartEnabled":true,"filename":"<jd:source:2>","packagenameFilter":{"matchType":"CONTAINS","regex":"","useRegex":false,"enabled":false},"filenameFilter":{"matchType":"CONTAINS","regex":"","useRegex":false,"enabled":false},"name":"PS3 Updates","matchAlwaysFilter":{"enabled":false},"packageName":"<jd:source:1>","pluginStatusFilter":{"matchType":"IS","pluginStatus":"PREMIUM","enabled":false},"autoStartEnabled":true,"filesizeFilter":{"from":0,"matchType":"BETWEEN","to":0,"enabled":false}}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think we might have to change the regex
does it work like this?

@@ -57,6 +55,8 @@ def __init__(self, window=None):
self.configDefaults["storageThresholdNew"] = 5
self.configDefaults["currentLoc"] = "en"
self.configDefaults["checkForNewRelease"] = True
self.configDefaults["bypass_ssl"] = True
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please default ssl bypass to false since its an insecure option

@shinrax2
Copy link
Owner

thanks for your contribution

@shinrax2 shinrax2 merged commit 524905d into shinrax2:master Jan 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants