[Bug fix][Refactor] Course scores & Download

- Fix a bug that scores in course mode cannot calculate rating
- Make some optimization for downloading songs
This commit is contained in:
Lost-MSth
2022-11-07 21:14:05 +08:00
parent e22485e4e0
commit 7cc17181e1
7 changed files with 84 additions and 55 deletions

View File

@@ -1,6 +1,5 @@
from core.constant import Constant
from core.course import UserCourseList
from core.error import ArcError
from core.item import ItemCore
from core.sql import Connect
from core.user import UserOnline

View File

@@ -35,8 +35,6 @@ def download_song(user_id):
x.url_flag = json.loads(request.args.get('url', 'true'))
if x.url_flag and x.is_limited:
raise RateLimit('You have reached the download limit.', 903)
if x.url_flag:
x.clear_download_token()
x.add_songs()
return success_return(x.urls)