-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
250 additions
and
217 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
:: Переход в директорию проекта. | ||
cd ..\ | ||
cd ..\..\ | ||
|
||
:: Сборка приложения. | ||
pyinstaller --distpath %~dp0\Release --i icon.ico --version-file Build\metadata.txt --onefile main.py | ||
pyinstaller --distpath %~dp0\Release --i icon.ico --version-file Build\Windows\metadata.txt --onefile main.py --name pornhub-dl | ||
|
||
:: Копирование в директорию сборки необходимых компонентов приложения. | ||
xcopy /Y /I yt-dlp Build\Release\yt-dlp | ||
xcopy /Y Advertisement.gif Build\Release | ||
xcopy /Y Settings.json Build\Release | ||
xcopy /Y icon.ico Build\Release | ||
xcopy /Y /I Source\GUI\Qt\Locales.json Build\Windows\Release\Source\GUI\Qt\ | ||
xcopy /Y /I yt-dlp Build\Windows\Release\yt-dlp | ||
xcopy /Y Advertisement.gif Build\Windows\Release | ||
xcopy /Y icon.ico Build\Windows\Release | ||
xcopy /Y Settings.json Build\Windows\Release | ||
|
||
:: Удаление файлов сборки приложения. | ||
rmdir /q /s Build\main | ||
rmdir /q /s Build\pornhub-dl |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"sort-by-models": false, | ||
"save-directory": "", | ||
"cuality": 2, | ||
"debug": true, | ||
"downloads-directory": "", | ||
"cuality": 5, | ||
"debug": false, | ||
"advertisement": "https://xn--80aaalhzvfe9b4a.xn--80asehdb/" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
прив |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
from dublib.Methods import ReadJSON | ||
|
||
import ctypes | ||
import locale | ||
import sys | ||
|
||
# Словарь локализаций. | ||
LOCALES = ReadJSON("Source/GUI/Qt/Locales.json") | ||
|
||
# Текущая локализация. | ||
CURRENT_LOCALE = LOCALES["EN"] | ||
# Тег текущего языка. | ||
LanguageTag = None | ||
|
||
# Если устройство работает под управлением ОС семейства Linux. | ||
if sys.platform in ["linux", "linux2"]: | ||
# Получение тега текущего языка. | ||
LanguageTag = locale.getlocale()[0].split('_')[0].upper() | ||
|
||
# Если устройство работает под управлением ОС семейства Windows. | ||
elif sys.platform == "win32": | ||
# Получение сведений о системе Windows. | ||
WinDLL = ctypes.windll.kernel32 | ||
WinDLL.GetUserDefaultUILanguage() | ||
# Получение тега текущего языка. | ||
LanguageTag = locale.windows_locale[WinDLL.GetUserDefaultUILanguage()].split('_')[0].upper() | ||
|
||
# Если существует локализация, переключиться на неё. | ||
if LanguageTag in LOCALES.keys(): | ||
CURRENT_LOCALE = LOCALES[LanguageTag] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"EN": [ | ||
"Advertisement", | ||
"Clear", | ||
"Copy output", | ||
"Download", | ||
"Paste here links to videos", | ||
"Output logs", | ||
"Paste links", | ||
"Settings", | ||
"Cuality", | ||
"Resolution of the downloaded video.", | ||
"Theme", | ||
"Style of the program window.", | ||
"Sort by models" | ||
], | ||
"RU": [ | ||
"Реклама", | ||
"Очистить", | ||
"Копировать логи", | ||
"Скачать", | ||
"Вставьте сюда ссылки на видео", | ||
"Логи", | ||
"Вставить ссылки", | ||
"Настройки", | ||
"Качество", | ||
"Разрешение загружаемого видео.", | ||
"Тема", | ||
"Стиль окна программы.", | ||
"По моделям" | ||
] | ||
} |
File renamed without changes.
Oops, something went wrong.