🐛 Will throw track not found when has no privilege to play on netease cloud music
This commit is contained in:
parent
de3ad4b21e
commit
6cdc025c40
@ -75,7 +75,12 @@ class NeteaseSourcedTrack extends SourcedTrack {
|
||||
throw TrackNotFoundError(track);
|
||||
}
|
||||
|
||||
await db.database.into(db.database.sourceMatchTable).insert(
|
||||
final client = getClient();
|
||||
final checkResp =
|
||||
await client.get('/check/music?id=${siblings.first.info.id}');
|
||||
if (checkResp.body['success'] != true) throw TrackNotFoundError(track);
|
||||
|
||||
await await db.database.into(db.database.sourceMatchTable).insert(
|
||||
SourceMatchTableCompanion.insert(
|
||||
trackId: track.id!,
|
||||
sourceId: siblings.first.info.id,
|
||||
|
Loading…
Reference in New Issue
Block a user