Skip to content

Commit

Permalink
Remove unused import
Browse files Browse the repository at this point in the history
  • Loading branch information
justin025 committed Nov 7, 2024
1 parent c8b5cc8 commit a371ee9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/onthespot/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import subprocess
import threading
import requests
from requests.exceptions import MissingSchema
from PyQt6.QtCore import QObject, pyqtSignal
from librespot.audio.decoders import AudioQuality, VorbisOnlyAudioQuality
from librespot.metadata import TrackId, EpisodeId
Expand All @@ -17,7 +16,6 @@
from .accounts import get_account_token
from .utils import sanitize_data, format_track_path


logger = get_logger("downloader")


Expand Down Expand Up @@ -173,9 +171,10 @@ def run(self):
audio_key = EpisodeId.from_base62(item_id)

quality = AudioQuality.HIGH
bitrate = "160k"
if account.get_user_attribute("type") == "premium" and item_type == 'track':
quality = AudioQuality.VERY_HIGH
bitrate = "320k" if quality == AudioQuality.VERY_HIGH else "160k"
bitrate = "320k"

stream = account.content_feeder().load(audio_key, VorbisOnlyAudioQuality(quality), False, None)

Expand Down
1 change: 0 additions & 1 deletion src/onthespot/gui/dl_progressbtn.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ def open_file(self):
file = os.path.abspath(file_path)
open_item(file)


def locate_file(self):
file_path = download_queue[self.item_id]['file_path']
file_dir = os.path.dirname(file_path)
Expand Down

0 comments on commit a371ee9

Please sign in to comment.