Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Songs downloaded are sorted by their popularity #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion scripts/download_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from .helper import argManager

class Manager():
count = 1
def __init__(self):
self.unicode = str
self.args = argManager()
Expand All @@ -37,6 +38,8 @@ def format_filename(self, filename):
filename = filename.replace("?", "-")
filename = filename.replace("*", "-")
filename = filename.replace("|", "-")
filename = str(Manager.count) + '. ' + filename
Manager.count += 1
return filename

def get_download_location(self, *args):
Expand Down Expand Up @@ -103,4 +106,4 @@ def addtags(self, filename, json_data, playlist_name):
cover = MP4Cover(fd.read(), getattr(MP4Cover, 'FORMAT_PNG' if cover_url.endswith('png') else 'FORMAT_JPEG'))
fd.close()
audio['covr'] = [cover]
audio.save()
audio.save()