Skip to content

Commit

Permalink
playlists can now load more than 200 items
Browse files Browse the repository at this point in the history
  • Loading branch information
Sheikh Haziq committed Oct 27, 2024
1 parent 4f00b36 commit c43d198
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/screens/main_screen/player_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ class NameAndControls extends StatelessWidget {
style: bigTextStyle(context, bold: true),
mode: TextScrollMode.endless,
),
TextScroll(
Text(
song?.artist ??
song?.album ??
song?.extras?['subtitle'] ??
Expand Down
4 changes: 2 additions & 2 deletions lib/ytmusic/mixins/browsing.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import 'dart:core';
import 'dart:math';

import 'package:gyawun/utils/pprint.dart';

import '../helpers.dart';
import '../yt_service_provider.dart';
import 'utils.dart';
Expand Down Expand Up @@ -184,10 +182,12 @@ mixin BrowsingMixin on YTMusicServices {

var response =
await sendRequest(endpoint, body, additionalParams: continuation);
String? continuationString = nav(response,['continuationContents','musicPlaylistShelfContinuation','continuations',0,'nextContinuationData','continuation']);
List contents =
nav(response,['continuationContents','musicPlaylistShelfContinuation','contents'])??[];
return {
'items':handleContents(contents),
'continuation':continuationString!=null ? getContinuationString(continuationString):null,
};
}
int getDatestamp() {
Expand Down
2 changes: 0 additions & 2 deletions lib/ytmusic/mixins/utils.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import 'dart:core';

import 'package:gyawun/utils/pprint.dart';

import '../helpers.dart';

Map<String, dynamic> handlePageHeader(Map<String, dynamic> header,
Expand Down

0 comments on commit c43d198

Please sign in to comment.