-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deemon now directly interfaces with deemix which should improve usage on non-Linux OSes
- Loading branch information
Showing
4 changed files
with
73 additions
and
52 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/usr/bin/env python3 | ||
|
||
__version__ = '0.1.5' | ||
__version__ = '0.2.0' |
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,29 @@ | ||
from pathlib import Path | ||
from deemix.app import deemix | ||
|
||
|
||
class DeemixInterface(deemix): | ||
def __init__(self, download_path, config_dir=None): | ||
super().__init__(config_dir, overwriteDownloadFolder=download_path) | ||
|
||
def download_url(self, url, bitrate=None): | ||
for link in url: | ||
if ';' in link: | ||
for l in link.split(";"): | ||
self.qm.addToQueue(self.dz, l, self.set.settings, bitrate) | ||
else: | ||
self.qm.addToQueue(self.dz, link, self.set.settings, bitrate) | ||
|
||
def login(self): | ||
config_dir = Path(self.set.configFolder) | ||
if Path(config_dir).is_dir(): | ||
if Path(config_dir / '.arl').is_file(): | ||
with open(config_dir / '.arl', 'r') as f: | ||
arl = f.readline().rstrip("\n") | ||
if not self.dz.login_via_arl(arl): | ||
return False | ||
else: | ||
return False | ||
else: | ||
return False | ||
return True |
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 was deleted.
Oops, something went wrong.