diff --git a/README.md b/README.md index a0ae084c..c3a5b90c 100644 --- a/README.md +++ b/README.md @@ -17,18 +17,17 @@ A simple music app using YouTube Music for backend - Play music from YouTube Music or YouTube free without ads in the background - Browsing Home, Charts, Moods & Genre with YouTube Music data with high speed - Search everything on YouTube -- Analyze your playing data and create custom playlists ... +- Analyze your playing data, create custom playlists and sync with YouTube Music ... - Caching and can save data for offline playback -- Synced lyrics (log in to Spotify to get lyrics) -- Sleep Timer +- Synced lyrics from Musixmatch - Support SponsorBlock -- Google Login -- And many more ... +- Sleep Timer +- And many more ## Screenshot

- +

@@ -36,7 +35,7 @@ A simple music app using YouTube Music for backend

- +

@@ -44,7 +43,7 @@ A simple music app using YouTube Music for backend More [screenshot](https://photos.app.goo.gl/AbieoXG5ctDrpwzp7) here. ## Data -- This app using public api from YouTube Music with some tricks to get data from YouTube Music. +- This app using hidden API from YouTube Music with some tricks to get data from YouTube Music. - Thanks for [InnerTune](https://github.com/z-huang/InnerTune/) for the idea to get data from YouTube Music. This repo is my inspiration to create this app. - My app is using [@SponsorBlock](https://sponsor.ajay.app/) to skip sponsor in YouTube videos. Thanks for this great service. ## Translation diff --git a/app/src/main/java/com/maxrave/simpmusic/service/SimpleMediaServiceHandler.kt b/app/src/main/java/com/maxrave/simpmusic/service/SimpleMediaServiceHandler.kt index 0ae1f99d..9e8e0969 100644 --- a/app/src/main/java/com/maxrave/simpmusic/service/SimpleMediaServiceHandler.kt +++ b/app/src/main/java/com/maxrave/simpmusic/service/SimpleMediaServiceHandler.kt @@ -167,11 +167,11 @@ class SimpleMediaServiceHandler @Inject constructor( player.removeMediaItem(position) } - fun addMediaItem(mediaItem: MediaItem) { + fun addMediaItem(mediaItem: MediaItem, playWhenReady: Boolean = true) { player.clearMediaItems() player.setMediaItem(mediaItem) player.prepare() - player.playWhenReady = true + player.playWhenReady = playWhenReady } fun addMediaItemNotSet(mediaItem: MediaItem) { diff --git a/app/src/main/java/com/maxrave/simpmusic/ui/fragment/home/SettingsFragment.kt b/app/src/main/java/com/maxrave/simpmusic/ui/fragment/home/SettingsFragment.kt index 7c4f6a62..bf82e2e9 100644 --- a/app/src/main/java/com/maxrave/simpmusic/ui/fragment/home/SettingsFragment.kt +++ b/app/src/main/java/com/maxrave/simpmusic/ui/fragment/home/SettingsFragment.kt @@ -199,6 +199,12 @@ class SettingsFragment : Fragment() { } else { Toast.makeText(requireContext(), getString(R.string.no_update), Toast.LENGTH_SHORT).show() + viewModel.getLastCheckForUpdate() + viewModel.lastCheckForUpdate.observe(viewLifecycleOwner) { + binding.tvCheckForUpdate.text = getString(R.string.last_checked_at, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss") + .withZone(ZoneId.systemDefault()) + .format(Instant.ofEpochMilli(it.toLong()))) + } } } } diff --git a/app/src/main/java/com/maxrave/simpmusic/ui/fragment/other/PlaylistFragment.kt b/app/src/main/java/com/maxrave/simpmusic/ui/fragment/other/PlaylistFragment.kt index 00354ad6..9d6f6124 100644 --- a/app/src/main/java/com/maxrave/simpmusic/ui/fragment/other/PlaylistFragment.kt +++ b/app/src/main/java/com/maxrave/simpmusic/ui/fragment/other/PlaylistFragment.kt @@ -107,10 +107,9 @@ class PlaylistFragment: Fragment() { playlistItemAdapter = PlaylistItemAdapter(arrayListOf()) binding.rvListSong.apply { adapter = playlistItemAdapter - layoutManager = LinearLayoutManager(requireContext()).also { - it.initialPrefetchItemCount = 20 - } + layoutManager = LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false) setHasFixedSize(false) + isNestedScrollingEnabled = false } var id = requireArguments().getString("id") val downloaded = arguments?.getInt("downloaded") diff --git a/app/src/main/java/com/maxrave/simpmusic/viewModel/SharedViewModel.kt b/app/src/main/java/com/maxrave/simpmusic/viewModel/SharedViewModel.kt index 331d0811..2cba2c09 100644 --- a/app/src/main/java/com/maxrave/simpmusic/viewModel/SharedViewModel.kt +++ b/app/src/main/java/com/maxrave/simpmusic/viewModel/SharedViewModel.kt @@ -539,7 +539,8 @@ class SharedViewModel @Inject constructor(private var dataStoreManager: DataStor .setAlbumTitle(track.album?.name) .build() ) - .build() + .build(), + type != RECOVER_TRACK_QUEUE ) _nowPlayingMediaItem.value = getCurrentMediaItem() Log.d( @@ -582,7 +583,8 @@ class SharedViewModel @Inject constructor(private var dataStoreManager: DataStor .setAlbumTitle(track.album?.name) .build() ) - .build() + .build(), + type != RECOVER_TRACK_QUEUE ) _nowPlayingMediaItem.value = getCurrentMediaItem() Log.d( diff --git a/app/src/main/res/layout/fragment_playlist.xml b/app/src/main/res/layout/fragment_playlist.xml index cab7717f..a0b74617 100644 --- a/app/src/main/res/layout/fragment_playlist.xml +++ b/app/src/main/res/layout/fragment_playlist.xml @@ -207,6 +207,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/rvListSong" + android:overScrollMode="never" tools:listitem="@layout/item_popular_song" android:layout_marginStart="10sp" android:layout_marginEnd="10sp"> diff --git a/app/src/main/res/values-vi/strings.xml b/app/src/main/res/values-vi/strings.xml index 5e189d53..8150ad8d 100644 --- a/app/src/main/res/values-vi/strings.xml +++ b/app/src/main/res/values-vi/strings.xml @@ -175,7 +175,7 @@ Lưu chế độ trộn và phát lại Bỏ qua im lặng Bỏ qua phần không có nhạc - Quá thời gian, kiểm qua kết nối internet + Quá thời gian, kiểm tra kết nối internet Lưu phiên phát lại cuối cùng Lưu bài hát đang phát và danh sách chờ cuối cùng Phiên bản mới có sẵn diff --git a/asset/screenshot/artist_top.jpg b/asset/screenshot/artist_top.jpg index ff52a2c4..bd07e55d 100644 Binary files a/asset/screenshot/artist_top.jpg and b/asset/screenshot/artist_top.jpg differ diff --git a/asset/screenshot/new_home_ui.jpg b/asset/screenshot/new_home_ui.jpg new file mode 100644 index 00000000..401e77ac Binary files /dev/null and b/asset/screenshot/new_home_ui.jpg differ diff --git a/asset/screenshot/radio.jpg b/asset/screenshot/radio.jpg new file mode 100644 index 00000000..935f6630 Binary files /dev/null and b/asset/screenshot/radio.jpg differ diff --git a/asset/screenshot/search_suggest.jpg b/asset/screenshot/search_suggest.jpg index c3953a99..b4dfb106 100644 Binary files a/asset/screenshot/search_suggest.jpg and b/asset/screenshot/search_suggest.jpg differ diff --git a/asset/screenshot/sync_youtube.jpg b/asset/screenshot/sync_youtube.jpg new file mode 100644 index 00000000..1ce1746d Binary files /dev/null and b/asset/screenshot/sync_youtube.jpg differ diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/13.jpg b/fastlane/metadata/android/en-US/images/phoneScreenshots/13.jpg new file mode 100644 index 00000000..1ce1746d Binary files /dev/null and b/fastlane/metadata/android/en-US/images/phoneScreenshots/13.jpg differ diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/14.jpg b/fastlane/metadata/android/en-US/images/phoneScreenshots/14.jpg new file mode 100644 index 00000000..935f6630 Binary files /dev/null and b/fastlane/metadata/android/en-US/images/phoneScreenshots/14.jpg differ diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/3.jpg b/fastlane/metadata/android/en-US/images/phoneScreenshots/3.jpg index 09db1526..401e77ac 100644 Binary files a/fastlane/metadata/android/en-US/images/phoneScreenshots/3.jpg and b/fastlane/metadata/android/en-US/images/phoneScreenshots/3.jpg differ diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/6.jpg b/fastlane/metadata/android/en-US/images/phoneScreenshots/6.jpg index c3953a99..b4dfb106 100644 Binary files a/fastlane/metadata/android/en-US/images/phoneScreenshots/6.jpg and b/fastlane/metadata/android/en-US/images/phoneScreenshots/6.jpg differ diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/8.jpg b/fastlane/metadata/android/en-US/images/phoneScreenshots/8.jpg index ff52a2c4..bd07e55d 100644 Binary files a/fastlane/metadata/android/en-US/images/phoneScreenshots/8.jpg and b/fastlane/metadata/android/en-US/images/phoneScreenshots/8.jpg differ diff --git a/fastlane/metadata/android/vi-VN/images/phoneScreenshots/13.jpg b/fastlane/metadata/android/vi-VN/images/phoneScreenshots/13.jpg new file mode 100644 index 00000000..1ce1746d Binary files /dev/null and b/fastlane/metadata/android/vi-VN/images/phoneScreenshots/13.jpg differ diff --git a/fastlane/metadata/android/vi-VN/images/phoneScreenshots/14.jpg b/fastlane/metadata/android/vi-VN/images/phoneScreenshots/14.jpg new file mode 100644 index 00000000..935f6630 Binary files /dev/null and b/fastlane/metadata/android/vi-VN/images/phoneScreenshots/14.jpg differ diff --git a/fastlane/metadata/android/vi-VN/images/phoneScreenshots/3.jpg b/fastlane/metadata/android/vi-VN/images/phoneScreenshots/3.jpg index 09db1526..401e77ac 100644 Binary files a/fastlane/metadata/android/vi-VN/images/phoneScreenshots/3.jpg and b/fastlane/metadata/android/vi-VN/images/phoneScreenshots/3.jpg differ diff --git a/fastlane/metadata/android/vi-VN/images/phoneScreenshots/6.jpg b/fastlane/metadata/android/vi-VN/images/phoneScreenshots/6.jpg index c3953a99..b4dfb106 100644 Binary files a/fastlane/metadata/android/vi-VN/images/phoneScreenshots/6.jpg and b/fastlane/metadata/android/vi-VN/images/phoneScreenshots/6.jpg differ diff --git a/fastlane/metadata/android/vi-VN/images/phoneScreenshots/8.jpg b/fastlane/metadata/android/vi-VN/images/phoneScreenshots/8.jpg index ff52a2c4..bd07e55d 100644 Binary files a/fastlane/metadata/android/vi-VN/images/phoneScreenshots/8.jpg and b/fastlane/metadata/android/vi-VN/images/phoneScreenshots/8.jpg differ