fuo-qqmusic 1.0.3__tar.gz → 1.0.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of fuo-qqmusic might be problematic. Click here for more details.
- {fuo_qqmusic-1.0.3 → fuo_qqmusic-1.0.4}/PKG-INFO +1 -1
- {fuo_qqmusic-1.0.3 → fuo_qqmusic-1.0.4}/README.md +4 -0
- {fuo_qqmusic-1.0.3 → fuo_qqmusic-1.0.4}/fuo_qqmusic/api.py +1 -0
- {fuo_qqmusic-1.0.3 → fuo_qqmusic-1.0.4}/fuo_qqmusic/provider.py +34 -5
- {fuo_qqmusic-1.0.3 → fuo_qqmusic-1.0.4}/fuo_qqmusic.egg-info/PKG-INFO +1 -1
- {fuo_qqmusic-1.0.3 → fuo_qqmusic-1.0.4}/setup.py +1 -1
- {fuo_qqmusic-1.0.3 → fuo_qqmusic-1.0.4}/fuo_qqmusic/__init__.py +0 -0
- {fuo_qqmusic-1.0.3 → fuo_qqmusic-1.0.4}/fuo_qqmusic/assets/icon.svg +0 -0
- {fuo_qqmusic-1.0.3 → fuo_qqmusic-1.0.4}/fuo_qqmusic/consts.py +0 -0
- {fuo_qqmusic-1.0.3 → fuo_qqmusic-1.0.4}/fuo_qqmusic/excs.py +0 -0
- {fuo_qqmusic-1.0.3 → fuo_qqmusic-1.0.4}/fuo_qqmusic/provider_ui.py +0 -0
- {fuo_qqmusic-1.0.3 → fuo_qqmusic-1.0.4}/fuo_qqmusic/schemas.py +0 -0
- {fuo_qqmusic-1.0.3 → fuo_qqmusic-1.0.4}/fuo_qqmusic.egg-info/SOURCES.txt +0 -0
- {fuo_qqmusic-1.0.3 → fuo_qqmusic-1.0.4}/fuo_qqmusic.egg-info/dependency_links.txt +0 -0
- {fuo_qqmusic-1.0.3 → fuo_qqmusic-1.0.4}/fuo_qqmusic.egg-info/entry_points.txt +0 -0
- {fuo_qqmusic-1.0.3 → fuo_qqmusic-1.0.4}/fuo_qqmusic.egg-info/requires.txt +0 -0
- {fuo_qqmusic-1.0.3 → fuo_qqmusic-1.0.4}/fuo_qqmusic.egg-info/top_level.txt +0 -0
- {fuo_qqmusic-1.0.3 → fuo_qqmusic-1.0.4}/setup.cfg +0 -0
|
@@ -240,7 +240,7 @@ class QQProvider(AbstractProvider, ProviderV2):
|
|
|
240
240
|
songs = self._model_cache_get_or_fetch(playlist, "songs")
|
|
241
241
|
return create_reader(songs)
|
|
242
242
|
|
|
243
|
-
def
|
|
243
|
+
def __rec_hot_playlists(self):
|
|
244
244
|
user = self.get_current_user()
|
|
245
245
|
if user is None:
|
|
246
246
|
return []
|
|
@@ -253,16 +253,45 @@ class QQProvider(AbstractProvider, ProviderV2):
|
|
|
253
253
|
pl["logo"] = pl["cover"]
|
|
254
254
|
return [_deserialize(playlist, QQPlaylistSchema) for playlist in playlists]
|
|
255
255
|
|
|
256
|
+
def rec_list_daily_playlists(self):
|
|
257
|
+
# TODO: cache API result
|
|
258
|
+
feed = self.api.get_recommend_feed()
|
|
259
|
+
shelf = None
|
|
260
|
+
for shelf_ in feed['v_shelf']:
|
|
261
|
+
# I guess 10046 means 'song'.
|
|
262
|
+
if shelf_['extra_info'].get('moduleID', '').startswith('playlist'):
|
|
263
|
+
shelf = shelf_
|
|
264
|
+
break
|
|
265
|
+
if shelf is None:
|
|
266
|
+
return []
|
|
267
|
+
playlists = []
|
|
268
|
+
for batch in shelf['v_niche']:
|
|
269
|
+
for card in batch['v_card']:
|
|
270
|
+
print(card['title'], card['jumptype'])
|
|
271
|
+
if card['jumptype'] == 10014: # 10014->playlist
|
|
272
|
+
playlists.append(
|
|
273
|
+
PlaylistModel(identifier=str(card['id']),
|
|
274
|
+
source=SOURCE,
|
|
275
|
+
name=card['title'],
|
|
276
|
+
cover=card['cover'],
|
|
277
|
+
description=card['miscellany']['rcmdtemplate'])
|
|
278
|
+
)
|
|
279
|
+
return playlists
|
|
280
|
+
|
|
256
281
|
def rec_a_collection_of_songs(self):
|
|
257
282
|
# TODO: cache API result
|
|
258
283
|
feed = self.api.get_recommend_feed()
|
|
259
284
|
shelf = None
|
|
260
|
-
for
|
|
285
|
+
for shelf_ in feed['v_shelf']:
|
|
261
286
|
# I guess 10046 means 'song'.
|
|
262
|
-
if
|
|
263
|
-
shelf =
|
|
287
|
+
if int(shelf_['miscellany'].get('jumptype', 0)) == 10046:
|
|
288
|
+
shelf = shelf_
|
|
289
|
+
break
|
|
264
290
|
if shelf is None:
|
|
265
|
-
return '',
|
|
291
|
+
return Collection(name='',
|
|
292
|
+
type_=CollectionType.only_songs,
|
|
293
|
+
models=[],
|
|
294
|
+
description='')
|
|
266
295
|
title = shelf['title_content'] or shelf['title_template']
|
|
267
296
|
song_ids = []
|
|
268
297
|
for batch in shelf['v_niche']:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|