Skip to content

Commit

Permalink
yt discover playlist update
Browse files Browse the repository at this point in the history
  • Loading branch information
HemantKArya committed Jun 24, 2024
1 parent 41d60a2 commit 2c86da1
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 20 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@ jobs:
run: jarsigner --verify --verbose build/app/outputs/flutter-apk/app-release.apk

- name: Rename APK file
run: mv build/app/outputs/flutter-apk/app-release.apk build/app/outputs/flutter-apk/bloomee_tunes_v2.7.13+${{github.run_number}}.apk
run: mv build/app/outputs/flutter-apk/app-release.apk build/app/outputs/flutter-apk/bloomee_tunes_v2.7.14+${{github.run_number}}.apk

- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: Release
path: |
build/app/outputs/flutter-apk/bloomee_tunes_v2.7.13+${{github.run_number}}.apk
build/app/outputs/flutter-apk/bloomee_tunes_v2.7.14+${{github.run_number}}.apk
- name: Create Release
uses: ncipollo/release-action@v1
with:
artifacts: "build/app/outputs/flutter-apk/bloomee_tunes_v2.7.13+${{github.run_number}}.apk"
tag: v2.7.13+${{github.run_number}}
artifacts: "build/app/outputs/flutter-apk/bloomee_tunes_v2.7.14+${{github.run_number}}.apk"
tag: v2.7.14+${{github.run_number}}
token: ${{secrets.SECRET_KEY}}
49 changes: 37 additions & 12 deletions lib/repository/Youtube/yt_music_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -682,8 +682,16 @@ class YtMusicService {
'text'
]) as String?;
final String subtitle = (nav(response, [
'header',
'musicDetailHeaderRenderer',
'contents',
'twoColumnBrowseResultsRenderer',
'tabs',
0,
'tabRenderer',
'content',
"sectionListRenderer",
'contents',
0,
'musicResponsiveHeaderRenderer',
'subtitle',
'runs',
]) as List? ??
Expand All @@ -692,30 +700,47 @@ class YtMusicService {
.toList()
.join();
final String? description = nav(response, [
'header',
'musicDetailHeaderRenderer',
'contents',
'twoColumnBrowseResultsRenderer',
'tabs',
0,
'tabRenderer',
'content',
"sectionListRenderer",
'contents',
0,
'musicResponsiveHeaderRenderer',
'description',
'musicDescriptionShelfRenderer',
'description',
'runs',
0,
'text'
]) as String?;

final List images = (nav(response, [
'header',
'musicDetailHeaderRenderer',
'contents',
'twoColumnBrowseResultsRenderer',
'tabs',
0,
'tabRenderer',
'content',
"sectionListRenderer",
'contents',
0,
'musicResponsiveHeaderRenderer',
'thumbnail',
'croppedSquareThumbnailRenderer',
'musicThumbnailRenderer',
'thumbnail',
'thumbnails'
]) as List)
.map((e) => e['url'])
.toList();

final List finalResults = nav(response, [
'contents',
'singleColumnBrowseResultsRenderer',
'tabs',
0,
'tabRenderer',
'content',
'twoColumnBrowseResultsRenderer',
'secondaryContents',
'sectionListRenderer',
'contents',
0,
Expand Down
8 changes: 8 additions & 0 deletions lib/screens/screen/audioPlayer_screen.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'dart:developer';
import 'dart:ui';
import 'package:Bloomee/model/songModel.dart';
import 'package:Bloomee/screens/screen/home_views/timer_view.dart';
Expand Down Expand Up @@ -373,6 +374,8 @@ class _AudioPlayerViewState extends State<AudioPlayerView> {
.watch<BloomeePlayerCubit>()
.progressStreams,
builder: (context, snapshot) {
log((snapshot.data?.currentPos).toString(),
name: "Duration");
return ProgressBar(
progress:
snapshot.data?.currentPos ?? Duration.zero,
Expand Down Expand Up @@ -755,6 +758,11 @@ class _AudioPlayerViewState extends State<AudioPlayerView> {
),
);
}

Widget desktopViewPlayer(
BuildContext context, BloomeeMusicPlayer musicPlayer) {
return Text("Desktop View");
}
}

Widget _getAmbientShadowWidget(
Expand Down
1 change: 1 addition & 0 deletions lib/screens/screen/home_views/youtube_views/playlist.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class _YoutubePlaylistState extends State<YoutubePlaylist> {

Future<void> _loadData() async {
final res = await data;
// log(res.toString(), name: "YoutubePlaylist");
items = res["songs"] as List<Map<dynamic, dynamic>>;
mediaitems = fromYtSongMapList2MediaItemList(items);
// for (var i = 0; i < items.length; i++) {
Expand Down
6 changes: 3 additions & 3 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 2.7.13+0
version: 2.7.14+0

environment:
sdk: '>=3.0.6 <4.0.0'
Expand All @@ -40,8 +40,8 @@ dependencies:
carousel_slider: ^4.2.1
palette_generator: ^0.3.3+2
audio_video_progress_bar: ^1.0.1
just_audio: ^0.9.37
just_audio_windows: ^0.2.0
just_audio: ^0.9.38
just_audio_windows: ^0.2.1
audio_service: ^0.18.13
audio_session: ^0.1.16
rxdart: ^0.27.7
Expand Down
7 changes: 6 additions & 1 deletion windows/flutter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ include(${EPHEMERAL_DIR}/generated_config.cmake)
# https://github.com/flutter/flutter/issues/57146.
set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper")

# Set fallback configurations for older versions of the flutter tool.
if (NOT DEFINED FLUTTER_TARGET_PLATFORM)
set(FLUTTER_TARGET_PLATFORM "windows-x64")
endif()

# === Flutter Library ===
set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll")

Expand Down Expand Up @@ -92,7 +97,7 @@ add_custom_command(
COMMAND ${CMAKE_COMMAND} -E env
${FLUTTER_TOOL_ENVIRONMENT}
"${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat"
windows-x64 $<CONFIG>
${FLUTTER_TARGET_PLATFORM} $<CONFIG>
VERBATIM
)
add_custom_target(flutter_assemble DEPENDS
Expand Down

0 comments on commit 2c86da1

Please sign in to comment.