-
Notifications
You must be signed in to change notification settings - Fork 7
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
新增 个人收藏电台 #25
新增 个人收藏电台 #25
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
记了一些后续可以更新的地方。
手动测试的时候发现一些潜在问题,由于 NRadioSongModel 实际上不是 SongModel,所以这些功能有问题:
- 拖动
- 右键:歌曲详情页面;歌手详情等页面
|
||
@fav_djradio.setter | ||
def fav_djradio(self, _): | ||
pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可以用 cached_field
data = dict(radioId=radio_id, limit=limit, offset=offset, asc=asc) | ||
url = uri_e + '/v1/dj/program/byradio' | ||
payload = self.eapi_encrypt(b'/api/v1/dj/program/byradio', data) | ||
return self.request('POST', url, {'params': payload}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可以把 eapi_encrypt + request 两个函数合并成一个函数
@@ -228,6 +231,11 @@ def get_media(self, quality): | |||
return self.q_media_mapping.get(quality) | |||
|
|||
|
|||
class NRadioSongModel(NSongModel): | |||
class Meta: | |||
allow_get = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里理论上是有问题的 :一个 provider 只能有一个 type 为 song 的 model,但是这里定义了两个。
@@ -311,6 +319,33 @@ def desc(self, value): | |||
self._desc = value | |||
|
|||
|
|||
|
|||
class NRadioModel(PlaylistModel, NBaseModel): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这些接口可能可以迁移为 provider 的接口
add netease my radio collection #7
新增 电台个人收藏
新增 电台详情和列表
新增 电台歌曲播放
剩余问题