diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b726b42..c4937f5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -103,12 +103,10 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: v2.1.11 - release_name: v2.1.11 + tag_name: v2.1.12 + release_name: v2.1.12 body: | - Removes search for Chinese PS3 firmware, as it is no longer hosted. - - Fixes handling of South Asia PS3 firmware (it used to show up as "SO" rather than "SA") + Truncates japanese titles further. Fixes some bugs with titles which use full-width characters. draft: false prerelease: false diff --git a/PySN.py b/PySN.py index a63ae99..7914b22 100644 --- a/PySN.py +++ b/PySN.py @@ -218,7 +218,8 @@ def add_item(self, name, title_id, ver, url, console, update_size, sha1, index, #Truncates the name depending on it's length. Assigns the title id, version, and name to a label on the left side of the frame. if len(title_id) == 2 and sha1 == 'N/A': title_label = customtkinter.CTkLabel(self, text= title_id + ver + ' - ' + name, anchor='w') - elif ver.startswith(' D') and len(name)>9 and not name.startswith('Invalid ID') and not name.startswith('No updates available for') and name != 'No updates found': + elif ((ver.startswith(' DRM-Free') and len(name)>9 and not name.startswith('Invalid ID') and not name.startswith('No updates available for') and name != 'No updates found') or + ('\u3040' <= name[0] <= '\u30FF' or '\u4E00' <= name[0] <= '\u9FFF' or '\uFF65' <= name[0] <= '\uFF9F')): title_label = customtkinter.CTkLabel(self, text= title_id + ver + ' - ' + name[:9] + '...', anchor='w') elif len(name)>18 and not name.startswith('Invalid ID') and not name.startswith('No updates available for') and name != 'No updates found': title_label = customtkinter.CTkLabel(self, text= title_id + ver + ' - ' + name[:18] + '...', anchor='w') @@ -226,7 +227,7 @@ def add_item(self, name, title_id, ver, url, console, update_size, sha1, index, title_label = customtkinter.CTkLabel(self, text= title_id + ver + ' - ' + name, anchor='w') else: title_label = customtkinter.CTkLabel(self, text= title_id + ver + name, anchor='center') - + #Creates labels for size and status, buttons for downloading and opening the file, a progress bar, and establishes the queue for threading. size = str(round((update_size/1024000),2)) + ' MB' size_label = customtkinter.CTkLabel(self, text=size, anchor='e', width = 70)