Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
deeffest authored May 8, 2024
1 parent 70f76c9 commit e658d6b
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 22 deletions.
14 changes: 3 additions & 11 deletions core/css/main.css
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
QMenuBar{
background-color: rgb(43,43,43);
color: white;
}
QMenuBar::item:selected{
background-color: rgb(60,60,60);
}

QMenu {
background-color: rgb(43,43,43);
color: white;
border: 1px solid rgb(29,29,29);
border: 1px solid rgb(93,93,93);
padding: 2px 2px;
}
QMenu::icon {
Expand All @@ -33,13 +25,13 @@ QMenu::item:disabled {
}
QMenu::separator {
height: 1px;
background-color: rgb(64,64,64);
background-color: rgb(93,93,93);
margin: 3px 3px;
}

QToolTip {
background-color: rgb(44,44,44);
border: 1px solid rgb(29,29,29);
border: 1px solid rgb(93,93,93);
color: white;
padding: 3px;
}
Binary file modified core/download_script.exe
Binary file not shown.
27 changes: 26 additions & 1 deletion core/download_script.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,33 @@
import sys
from pytube import YouTube, Playlist
from pytube import YouTube, Playlist, cipher
from typing import List
from pytube.exceptions import RegexMatchError
import subprocess
import os

def fix(self, js: str):
import re
self.transform_plan: List[str] = cipher.get_transform_plan(js)
var_regex = re.compile(r"^[\w\$_]+\W")
var_match = var_regex.search(self.transform_plan[0])
if not var_match:
raise RegexMatchError(
caller="__init__", pattern=var_regex.pattern
)
var = var_match.group(0)[:-1]
self.transform_map = cipher.get_transform_map(js, var)
self.js_func_patterns = [
r"\w+\.(\w+)\(\w,(\d+)\)",
r"\w+\[(\"\w+\")\]\(\w,(\d+)\)"
]

self.throttling_plan = cipher.get_throttling_plan(js)
self.throttling_array = cipher.get_throttling_function_array(js)

self.calculated_n = None

cipher.Cipher.__init__=fix

def download_track(url, download_path, download_type):
if download_type == "track":
yt = YouTube(url)
Expand Down
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from core.main_window import Window

name = "Youtube Music Desktop Player"
version = "1.2"
version = "1.2.1"
current_dir = os.path.dirname(os.path.abspath(__file__))
username = getpass.getuser()

Expand Down
11 changes: 2 additions & 9 deletions notes.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
1.2 Update!
1.2.1 Update!

- Changed the way message boxes are displayed, they are now frameless.
- The download finish info bar and download errors now contain buttons such as "Download Path" and "Error Message" for a more user-friendly app interface.
- The download process indicator is now in the status bar.
- The mini player is now not displayed in the taskbar and cannot be minimized to it.
- App settings are now only applied when the save button is pressed.
- The ffmpeg to convert a downloaded song to mp3 format is now bundled with the app and is not automatically downloaded.
- Added the ability to view the changelog of the latest available version.
- Now you can highlight web content again.
- Fixed "RegexMatchError: __init__: could not find match for ^\w+\W" error when downloading.
- Other changes and improvements.

0 comments on commit e658d6b

Please sign in to comment.