Skip to content

Commit

Permalink
Persepolis version 4.0.0
Browse files Browse the repository at this point in the history
 On branch master
 Changes to be committed:
	modified:   README.md
	modified:   man/persepolis.1
	modified:   persepolis/gui/about_ui.py
	modified:   persepolis/scripts/initialization.py
	modified:   persepolis/scripts/persepolis.py
	modified:   persepolis/scripts/update.py
	modified:   persepolis/scripts/useful_tools.py
	modified:   setup.py
	modified:   uninstall.py
	modified:   xdg/com.github.persepolisdm.persepolis.appdata.xml
  • Loading branch information
alireza-amirsamimi committed Feb 9, 2024
1 parent 3b40506 commit a4c1dc9
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 76 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -18,6 +18,7 @@ Persepolis is a download manager & a GUI for [Aria2](https://github.com/aria2/ar
- Multi-segment downloading
- Scheduling downloads
- Download queuing
- Download video from youtube and ...
- and many more!

### **FAQ**
Expand Down
2 changes: 1 addition & 1 deletion man/persepolis.1
@@ -1,4 +1,4 @@
.TH "Persepolis" "1" "September 16, 2019" "3.2.0" "persepolis"
.TH "Persepolis" "1" "February 9, 2024" "4.0.0" "persepolis"
.SH NAME
persepolis \- Persepolis Download Manager
.
Expand Down
2 changes: 1 addition & 1 deletion persepolis/gui/about_ui.py
Expand Up @@ -204,7 +204,7 @@ def __init__(self, persepolis_setting):

# about_tab
self.title_label.setText(QCoreApplication.translate("about_ui_tr", "Persepolis Download Manager"))
self.version_label.setText(QCoreApplication.translate("about_ui_tr", "Version 3.2.0"))
self.version_label.setText(QCoreApplication.translate("about_ui_tr", "Version 4.0.0"))
self.site2_label.setText(QCoreApplication.translate("about_ui_tr",
"<a href=https://persepolisdm.github.io>https://persepolisdm.github.io</a>",
"TRANSLATORS NOTE: YOU REALLY DON'T NEED TO TRANSLATE THIS PART!"))
Expand Down
4 changes: 2 additions & 2 deletions persepolis/scripts/initialization.py
Expand Up @@ -225,7 +225,7 @@

persepolis_version = 3.1

if persepolis_version < 3.2:
if persepolis_version < 4.0:
persepolis_setting.beginGroup('settings')

for key in default_setting_dict.keys():
Expand All @@ -235,6 +235,6 @@

persepolis_setting.endGroup()

persepolis_setting.setValue('version/version', 3.2)
persepolis_setting.setValue('version/version', 4.0)

persepolis_setting.sync()
2 changes: 1 addition & 1 deletion persepolis/scripts/persepolis.py
Expand Up @@ -167,7 +167,7 @@ def setPersepolisColorScheme(self, color_scheme):
help="Persepolis is starting in tray icon. It's useful when you want to put persepolis in system's startup.")
parser.add_argument('--parent-window', action='store', nargs=1,
help='this switch is used for chrome native messaging in Windows')
parser.add_argument('--version', action='version', version='Persepolis Download Manager 3.2.0')
parser.add_argument('--version', action='version', version='Persepolis Download Manager 4.0.0')


# Clears unwanted args ( like args from Browers via NHM )
Expand Down
4 changes: 2 additions & 2 deletions persepolis/scripts/update.py
Expand Up @@ -55,7 +55,7 @@ def __init__(self, persepolis_setting):
self.setWindowTitle(QCoreApplication.translate("update_src_ui_tr", 'Checking for newer version'))

# installed version
self.client_version = '3.20'
self.client_version = '4.00'

# first line text
self.update_label = QLabel(QCoreApplication.translate(
Expand All @@ -65,7 +65,7 @@ def __init__(self, persepolis_setting):

# second line text
self.version_label = QLabel(QCoreApplication.translate(
"update_src_ui_tr", 'This is Persepolis Download Manager version 3.2.0'))
"update_src_ui_tr", 'This is Persepolis Download Manager version 4.0.0'))
self.version_label.setAlignment(QtCore.Qt.AlignCenter)

# release link
Expand Down
68 changes: 2 additions & 66 deletions persepolis/scripts/useful_tools.py
Expand Up @@ -12,10 +12,6 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
try:
from PySide6.QtWidgets import QStyleFactory
except:
from PyQt5.QtWidgets import QStyleFactory

from persepolis.constants.Os import OS
import urllib.parse
Expand Down Expand Up @@ -162,71 +158,11 @@ def returnDefaultSettings():
# user download folder path
download_path = os.path.join(home_address, 'Downloads', 'Persepolis')

# find available styles(It's depends on operating system and desktop environments).
available_styles = QStyleFactory.keys()
# set dark fusion for default style settings.
style = 'Fusion'
color_scheme = 'Dark Fusion'
icons = 'Breeze-Dark'
if os_type in OS.UNIX_LIKE:
if desktop_env == 'KDE':
if 'Breeze' in available_styles:
style = 'Breeze'
color_scheme = 'System'
else:
# finout user prefers dark theme or light theme :)
# read this links for more information:
# https://wiki.archlinux.org/index.php/GTK%2B#Basic_theme_configuration
# https://wiki.archlinux.org/index.php/GTK%2B#Dark_theme_variant

# find user gtk3 config file path.
gtk3_confing_file_path = os.path.join(home_address, '.config', 'gtk-3.0', 'settings.ini')
if not(os.path.isfile(gtk3_confing_file_path)):
if os.path.isfile('/etc/gtk-3.0/settings.ini'):
gtk3_confing_file_path = '/etc/gtk-3.0/settings.ini'
else:
gtk3_confing_file_path = None

# read this for more information:
dark_theme = False
if gtk3_confing_file_path:
with open(gtk3_confing_file_path) as f:
for line in f:
if "gtk-application-prefer-dark-theme" in line:
if 'true' in line:
dark_theme = True
else:
dark_theme = False

if dark_theme:
icons = 'Breeze-Dark'
if 'Adwaita-Dark' in available_styles:
style = 'Adwaita-Dark'
color_scheme = 'System'

else:
icons = 'Breeze'
if 'Adwaita' in available_styles:
style = 'Adwaita'
color_scheme = 'System'
else:
style = 'Fusion'
color_scheme = 'Light Fusion'

elif os_type == OS.OSX:
if 'macintosh' in available_styles:
style = 'macintosh'
color_scheme = 'System'
icons = 'Breeze'

elif os_type == OS.WINDOWS:
style = 'Fusion'
color_scheme = 'Dark Fusion'
icons = 'Breeze-Dark'

else:
style = 'Fusion'
color_scheme = 'Dark Fusion'
icons = 'Breeze-Dark'
style = 'Fusion'

# keyboard shortcuts
delete_shortcut = "Ctrl+D"
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Expand Up @@ -80,7 +80,7 @@
import yt_dlp as youtube_dl
print('youtube-dl is found')
except:
print('Warning: youtube-dl is not installed!')
print('Warning: yt-dlp is not installed!')
not_installed = not_installed + 'youtube-dl, '

# aria2
Expand Down Expand Up @@ -191,7 +191,7 @@

setup(
name='persepolis',
version='3.2.0',
version='4.0.0',
license='GPL3',
description=DESCRIPTION,
long_description=DESCRIPTION,
Expand Down
2 changes: 1 addition & 1 deletion uninstall.py
Expand Up @@ -46,7 +46,7 @@


# finding persepolis directories in /usr/lib/python3.6/site-packages/
python_version_list = ['python3.5','python3.6', 'python3.7', 'python3.8', 'python3.9']
python_version_list = ['python3.5','python3.6', 'python3.7', 'python3.8', 'python3.9', 'python3.10', 'python3.11']

for python_version in python_version_list:
# for BSD
Expand Down
1 change: 1 addition & 0 deletions xdg/com.github.persepolisdm.persepolis.appdata.xml
Expand Up @@ -30,6 +30,7 @@
<url type="translate">https://www.transifex.com/persepolis/persepolis-translations/</url>
<developer_name>AliReza AmirSamimi</developer_name>
<releases>
<release version="4.0.0" date="2024-02-09"/>
<release version="3.2.0" date="2019-09-17"/>
<release version="3.1.0" date="2018-03-31"/>
<release version="3.0.0" date="2017-12-11"/>
Expand Down

0 comments on commit a4c1dc9

Please sign in to comment.