🐛 Bug fixes of querying backend
This commit is contained in:
@ -5,8 +5,10 @@ import 'package:rhythm_box/platform.dart';
|
||||
class AutoCacheImage extends StatelessWidget {
|
||||
final String url;
|
||||
final double? width, height;
|
||||
final BoxFit? fit;
|
||||
|
||||
const AutoCacheImage(this.url, {super.key, this.width, this.height});
|
||||
const AutoCacheImage(this.url,
|
||||
{super.key, this.width, this.height, this.fit});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -15,12 +17,14 @@ class AutoCacheImage extends StatelessWidget {
|
||||
imageUrl: url,
|
||||
width: width,
|
||||
height: height,
|
||||
fit: fit,
|
||||
);
|
||||
}
|
||||
return Image.network(
|
||||
url,
|
||||
width: width,
|
||||
height: height,
|
||||
fit: fit,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -116,11 +116,10 @@ class _SiblingTracksState extends State<SiblingTracks> {
|
||||
);
|
||||
} else if (preferences.audioSource == AudioSource.netease) {
|
||||
final client = NeteaseSourcedTrack.getClient();
|
||||
final resp = await client
|
||||
.get('/search?keywords=${Uri.encodeComponent(searchTerm)}');
|
||||
final resp = await client.get(
|
||||
'/search?keywords=${Uri.encodeComponent(searchTerm)}&realIP=${NeteaseSourcedTrack.lookupRealIp()}');
|
||||
final searchResults = resp.body['result']['songs']
|
||||
.map(NeteaseSourcedTrack.toSiblingType)
|
||||
.map((x) => x.info)
|
||||
.map(NeteaseSourcedTrack.toSourceInfo)
|
||||
.toList();
|
||||
|
||||
final activeSourceInfo = (_activeTrack! as SourcedTrack).sourceInfo;
|
||||
|
Reference in New Issue
Block a user