Skip to content

Commit 2832805

Browse files
committed
Merge branch 'dev' of https://github.com/h4h13/RetroMusicPlayer into dev
2 parents 603bae0 + e483973 commit 2832805

File tree

140 files changed

+2268
-932
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

140 files changed

+2268
-932
lines changed

.editorconfig

Lines changed: 358 additions & 0 deletions
Large diffs are not rendered by default.

FAQ.md

Lines changed: 86 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
1-
### Q: How do I get the beta version of Retro Music?
1+
#### Q: How do I get the beta version of Retro Music?
22
You can opt-in for the beta build by clicking on this link: https://play.google.com/apps/testing/code.name.monkey.retromusic
33

4-
### Q: How do I use offline synced lyrics?
4+
5+
#### Q: How to restore my purchases?
6+
Make sure to switch and use account in the Play Store app through which you purchased before installing Retro music. The account used to install the app is also used to purchase/restore the pro license.
7+
8+
If you already installed, remove all other accounts except the one with which you purchased premium. Then restore the purchase.
9+
10+
11+
#### Q: How do I use offline synced lyrics?
512
There are two methods for how to get offline synced lyrics.
613

714
#### Method 1:-
8-
##### STEP 1:
15+
##### STEP 1:
916
Find the time stamped lyrics for your songs which don't have lyrics already. A time stamped lyrics looks like this, "[00:04:02] Some lyrics text" for example.
1017
##### STEP 2:
1118
Copy these time stamped lyrics.
@@ -26,55 +33,120 @@ Now you have to rename the file you created in this way: <song_name> - <artist_n
2633
##### STEP 4:
2734
You have to copy or move this file into a location on the SD Card: whatever_sdcard/RetroMusic/lyrics/ and paste it there.
2835
Finally you will be able to see the lyrics working.
29-
3036
> If you want to skip to particular time stamp, simply scroll to the time stamp from where you want to start from and a 'Play' icon will appear left to the particular stamp. Tap on play button to play from there.
3137
3238

33-
### Q: Why isn't the artist's image downloading?
34-
Last.fm has disabled the download of artist's images for the time being, whether functionality for this will be restored in future is uncertain.
39+
#### Q: Why isn't the artist's image downloading?
40+
Last.fm has disabled the download of artist's images for the time being, whether functionality for this will be restored in future is uncertain. So we have moved to deezer API for artist images which have very less artists in their database and you might not able to see covers on every artist profiles.
41+
3542

36-
### Q: How do I change the theme?
43+
#### Q: How do I change the theme?
3744
Settings -> Look and feel -> Select your theme.
3845

39-
### Q: Why aren't last added songs showing?
46+
47+
#### Q: Equailizer is very laggy and unstable or I am getting "No equalizer found" error. why?
48+
The Retro music in-built equalizer was removed updates ago so the only equalizer you will have by your OEM or android which aren't made by us and have no control over them. So you can report those issues to your OEM so that they can provide a fix in next updates.
49+
50+
If you are seeing "No Equalizer Found" in your device, this means your device doesn't have stock equalizer MusicFx Equalizer. You can try using this one. Its made by AEX ROM developers.
51+
52+
https://drive.google.com/file/d/1_1bpsn6roeEyElGKikbU39lVKUH8O3xp/view?usp=drivesdk
53+
54+
55+
#### Q: Why aren't last added songs showing?
4056
Settings -> Other -> Last added playlist interval -> Select an option from the list.
4157

42-
### Q: How do I enable fullscreen lockscreen controls?
58+
59+
#### Q: How do I enable fullscreen lockscreen controls?
4360
Settings -> Personalize -> Fullscreen controls -> Enable (this will only be visible when songs are playing from Retro Music).
4461

45-
### Q: Why are gallery or random pictures showing up as album art?
62+
63+
#### Q: Why are gallery or random pictures showing up as album art?
4664
Settings -> Images -> Ignore media store covers -> Enable
4765

48-
### Q: Which file types are supported?
66+
67+
#### Q: Which file types are supported?
4968
Retro Music uses the native media player that comes with your Android phone, so as long as a file type is supported by your phone, it's supported by Retro Music.
5069

51-
### Q: Why is my device slowing down when I'm using the app?
70+
71+
#### Q: Why is my device slowing down when I'm using the app?
5272
Retro Music is image intensive, it keeps images in the cache for quick loading.
5373

54-
### Q: The title "Retro Music" is showing on the top of the app, how can i fix this?
74+
75+
#### Q: The title "Retro Music" is showing on the top of the app, how can i fix this?
5576
Clear the app's cache and data.
5677

78+
5779
#### Q: My app is crashing, how do i fix this? (Sorry, settings have changed internally)
58-
Reinstalling the app should fix this issue.
80+
Please try clear data of the app. If it doesn't work, reinstalling fresh from play store should help.
81+
5982

6083
#### Q: Why has all the text gone white/dissapeared?
6184
Change the theme to Black or Dark and change it back to what you had before.
6285

86+
6387
#### Q: Why some of my songs are not showing in my library?
6488
Try checking up if those songs are not less than 30 seconds, if so head to settings -> other -> filter song duration. Put this to zero and see the songs should start appearimg in the library.
89+
6590
If this doesn't work out for you, re-scanning the media folder should help and subsquently rebooting the device to refresh media store.
91+
6692
At last resort, If nothing worked and your audio files are stored in SD card. Try moving them to internal memory then back to SD card.
6793

94+
95+
#### Q: Why some of my songs are not showing in my library?
96+
1. Try checking up if those songs are not less than 30 seconds, if so head to settings -> other -> filter song duration. Put this to zero and see the songs should start appearimg in the library.
97+
98+
2. If this doesn't work out for you, re-scanning the media folder should help and subsquently rebooting the device to refresh media store.
99+
100+
3. At last resort, If nothing worked and your audio files are stored in SD card. Try moving them to internal memory then back to SD card.
101+
102+
68103
#### Q: Why my playlist/playlist songs keep disappearing?
69104
Playlist/Playlist songs disappearing is based on android media store system. Save those playlist as file(Tap on three dot menu next to available playlist and save as file) and it should get fixed.
70105

106+
71107
#### Q: Why does my library shows song files twice or no song at all?
72108
If you are seeing duplication of songs in the library or no songs at all, then it's because of Media Store issue which got affected by some other app.
109+
73110
To fix this:
111+
74112
• Head to your device settings
113+
75114
• Open up "Apps & notifications" (This name depends from ROM to ROM)
115+
76116
• Find 'Media storage' app and clear storage (both data and cache) of it.
117+
77118
• Then open Retro Music app and manually scan your music from your storage.
119+
78120
• Reboot the device to refresh media store (Not sure if this is necessary)
79121

80122
NOTE: Don't panic when you will open Retro Music and see "Zero" songs there in the library. It's because you cleared Media Store which is responsible for recognising files on your device.
123+
124+
125+
#### Q: I can't find folder menu anymore after latest update?
126+
Head to settings -> personalise. And select folders from "library categories". If there is option of folders, tap on reset and select folders.
127+
128+
129+
#### Q: After updating the app to latest version, font got removed. Why?
130+
Retro Music's font have now been replaced with system font now, which means the default font your system uses will be used by Retro too. It fixes all font related issues you used to face/are facing in the app.
131+
132+
If you think the font looks ugly, then you just need to change the default font from your Android settings (or use any Magisk module). If you can't, there's nothing we can do about it.
133+
134+
135+
#### Q: How to export playlist:
136+
In your built-in music player, there should be an option to save those playlist as file. Save them and import from file manager by opening it into retro music.
137+
138+
Note that those playlist must be of your offline music only since retro music is offline music player not an online music player. So if your playlist are of online music, it can't be opened on other offline players nor can be exported
139+
140+
141+
#### Q: How to restore/import playlist:
142+
Retro Music will automatically detect any playlist file when that playlist file is stored in InternalStorage/Playlist. However, if it doesn't, just open "file manager" and open that playlist file with Retro Music.
143+
144+
For restoring playlists, the location of songs must be same in both Playlist file and in your storage. For example, your music is in "Internalstorage/Music" and playlist file has songs location "Internalstorage/Songs". Then it will not going to work since both these location are different.
145+
146+
147+
#### Q: Adding songs to playlist or marking them as favourite are making app crash. Why?
148+
It's a known issue with only android 10 with its media store API when songs are in SD card due to introduction of Scoped Storage by Google. The issue have been created on Google Issue Tracker by many users. Many other players which doesn't have this issue are using a custom database for storing playlist. We will soon be implementing a custom database for playlist to fix this issue!
149+
150+
Workaround: You can move all songs to internal storage to fix the issue.
151+
152+
ISSUE link: https://issuetracker.google.com/issues/147619577

app/build.gradle

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ apply plugin: 'kotlin-android'
33
apply plugin: 'kotlin-android-extensions'
44
apply plugin: 'kotlin-kapt'
55
apply plugin: "ru.cleverpumpkin.proguard-dictionaries-generator"
6+
apply plugin: "androidx.navigation.safeargs.kotlin"
67

78
proguardDictionaries {
89
dictionaryNames = [
@@ -82,7 +83,7 @@ dependencies {
8283
implementation 'androidx.appcompat:appcompat:1.1.0'
8384
implementation 'androidx.annotation:annotation:1.1.0'
8485
implementation 'androidx.preference:preference-ktx:1.1.1'
85-
implementation 'androidx.core:core-ktx:1.3.0'
86+
implementation 'androidx.core:core-ktx:1.3.1'
8687
implementation 'androidx.fragment:fragment-ktx:1.2.5'
8788
implementation 'androidx.palette:palette-ktx:1.0.0'
8889

@@ -134,6 +135,14 @@ dependencies {
134135

135136
def koin_version = "2.1.5"
136137
implementation "org.koin:koin-core:$koin_version"
137-
implementation "org.koin:koin-android:$koin_version"
138-
implementation "org.koin:koin-android-viewmodel:$koin_version"
138+
implementation "org.koin:koin-core-ext:$koin_version"
139+
implementation "org.koin:koin-androidx-scope:$koin_version"
140+
implementation "org.koin:koin-androidx-viewmodel:$koin_version"
141+
implementation "org.koin:koin-androidx-fragment:$koin_version"
142+
implementation "org.koin:koin-androidx-ext:$koin_version"
143+
144+
def nav_version = "2.3.0"
145+
implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
146+
implementation "androidx.navigation:navigation-ui-ktx:$nav_version"
147+
139148
}

app/proguard-rules.pro

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,6 @@
5959

6060
#-keep class org.jaudiotagger.** { *; }
6161

62-
#For cast
63-
-keep class io.github.muntashirakon.music.cast.CastOptionsProvider { *; }
64-
-keep class android.support.** { *; }
65-
-keep class com.google.** { *; }
66-
-keep class java.nio.file.** { *; }
6762

6863
-obfuscationdictionary build/obfuscation-dictionary.txt
6964
-classobfuscationdictionary build/class-dictionary.txt

app/src/main/assets/oldindex.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626

2727

2828

29+
2930
</style>
3031
</head>
3132

app/src/main/assets/retro-changelog.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
}
5555
{style-placeholder}
5656

57+
5758
</style>
5859
</head>
5960

app/src/main/java/io/github/muntashirakon/music/App.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ import androidx.multidex.MultiDexApplication
1818
import code.name.monkey.appthemehelper.ThemeStore
1919
import code.name.monkey.appthemehelper.util.VersionUtils
2020
import io.github.muntashirakon.music.appshortcuts.DynamicShortcutManager
21-
import io.github.muntashirakon.music.network.networkModule
22-
import io.github.muntashirakon.music.providers.provideModules
2321
import org.koin.android.ext.koin.androidContext
2422
import org.koin.core.context.startKoin
2523

@@ -31,7 +29,7 @@ class App : MultiDexApplication() {
3129

3230
startKoin {
3331
androidContext(this@App)
34-
modules(listOf(mainModule, provideModules, networkModule))
32+
modules(appModules)
3533
}
3634
// default theme
3735
if (!ThemeStore.isConfigured(this, 3)) {

app/src/main/java/io/github/muntashirakon/music/MainModule.kt

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,20 @@ import io.github.muntashirakon.music.activities.search.SearchViewModel
88
import io.github.muntashirakon.music.fragments.LibraryViewModel
99
import io.github.muntashirakon.music.model.Genre
1010
import io.github.muntashirakon.music.model.Playlist
11-
import org.koin.android.viewmodel.dsl.viewModel
11+
import io.github.muntashirakon.music.network.networkModule
12+
import io.github.muntashirakon.music.providers.RepositoryImpl
13+
import org.eclipse.egit.github.core.Repository
14+
import org.koin.androidx.viewmodel.dsl.viewModel
15+
import org.koin.dsl.bind
1216
import org.koin.dsl.module
1317

18+
private val dataModule = module {
19+
single {
20+
RepositoryImpl(get(), get())
21+
} bind Repository::class
22+
}
1423

15-
val mainModule = module {
24+
private val viewModules = module {
1625

1726
viewModel {
1827
LibraryViewModel(get())
@@ -37,4 +46,6 @@ val mainModule = module {
3746
viewModel {
3847
SearchViewModel(get())
3948
}
40-
}
49+
}
50+
51+
val appModules = listOf(dataModule, viewModules, networkModule)

app/src/main/java/io/github/muntashirakon/music/activities/MainActivity.kt

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ import io.github.muntashirakon.music.dialogs.CreatePlaylistDialog.Companion.crea
2020
import io.github.muntashirakon.music.fragments.LibraryViewModel
2121
import io.github.muntashirakon.music.fragments.albums.AlbumsFragment
2222
import io.github.muntashirakon.music.fragments.artists.ArtistsFragment
23-
import io.github.muntashirakon.music.fragments.base.AbsLibraryPagerRecyclerViewCustomGridSizeFragment
23+
import io.github.muntashirakon.music.fragments.base.AbsRecyclerViewCustomGridSizeFragment
24+
import io.github.muntashirakon.music.fragments.folder.FoldersFragment
2425
import io.github.muntashirakon.music.fragments.genres.GenresFragment
2526
import io.github.muntashirakon.music.fragments.home.BannerHomeFragment
26-
import io.github.muntashirakon.music.fragments.mainactivity.FoldersFragment
2727
import io.github.muntashirakon.music.fragments.playlists.PlaylistsFragment
2828
import io.github.muntashirakon.music.fragments.queue.PlayingQueueFragment
2929
import io.github.muntashirakon.music.fragments.songs.SongsFragment
@@ -60,7 +60,7 @@ class MainActivity : AbsSlidingMusicPanelActivity(),
6060
const val EXPAND_PANEL = "expand_panel"
6161
}
6262

63-
val libraryViewModel: LibraryViewModel by inject()
63+
private val libraryViewModel: LibraryViewModel by inject()
6464
private var cab: MaterialCab? = null
6565
private val intentFilter = IntentFilter(Intent.ACTION_SCREEN_OFF)
6666
private lateinit var currentFragment: MainActivityFragmentCallbacks
@@ -157,7 +157,7 @@ class MainActivity : AbsSlidingMusicPanelActivity(),
157157
.setShowAsActionFlags(MenuItem.SHOW_AS_ACTION_IF_ROOM)
158158
}
159159
val fragment: Fragment? = getCurrentFragment()
160-
if (fragment != null && fragment is AbsLibraryPagerRecyclerViewCustomGridSizeFragment<*, *>) {
160+
if (fragment != null && fragment is AbsRecyclerViewCustomGridSizeFragment<*, *>) {
161161
val gridSizeItem: MenuItem = menu.findItem(R.id.action_grid_size)
162162
if (RetroUtil.isLandscape()) {
163163
gridSizeItem.setTitle(R.string.action_grid_size_land)
@@ -187,7 +187,7 @@ class MainActivity : AbsSlidingMusicPanelActivity(),
187187

188188
override fun onOptionsItemSelected(item: MenuItem): Boolean {
189189
val fragment = getCurrentFragment()
190-
if (fragment is AbsLibraryPagerRecyclerViewCustomGridSizeFragment<*, *>) {
190+
if (fragment is AbsRecyclerViewCustomGridSizeFragment<*, *>) {
191191
if (handleGridSizeMenuItem(fragment, item)) {
192192
return true
193193
}
@@ -221,7 +221,7 @@ class MainActivity : AbsSlidingMusicPanelActivity(),
221221
}
222222

223223
private fun handleSortOrderMenuItem(
224-
fragment: AbsLibraryPagerRecyclerViewCustomGridSizeFragment<*, *>,
224+
fragment: AbsRecyclerViewCustomGridSizeFragment<*, *>,
225225
item: MenuItem
226226
): Boolean {
227227
var sortOrder: String? = null
@@ -265,7 +265,7 @@ class MainActivity : AbsSlidingMusicPanelActivity(),
265265
}
266266

267267
private fun handleLayoutResType(
268-
fragment: AbsLibraryPagerRecyclerViewCustomGridSizeFragment<*, *>,
268+
fragment: AbsRecyclerViewCustomGridSizeFragment<*, *>,
269269
item: MenuItem
270270
): Boolean {
271271
var layoutRes = -1
@@ -286,7 +286,7 @@ class MainActivity : AbsSlidingMusicPanelActivity(),
286286
}
287287

288288
private fun handleGridSizeMenuItem(
289-
fragment: AbsLibraryPagerRecyclerViewCustomGridSizeFragment<*, *>,
289+
fragment: AbsRecyclerViewCustomGridSizeFragment<*, *>,
290290
item: MenuItem
291291
): Boolean {
292292
var gridSize = 0
@@ -309,7 +309,7 @@ class MainActivity : AbsSlidingMusicPanelActivity(),
309309
}
310310

311311
private fun setUpGridSizeMenu(
312-
fragment: AbsLibraryPagerRecyclerViewCustomGridSizeFragment<*, *>,
312+
fragment: AbsRecyclerViewCustomGridSizeFragment<*, *>,
313313
gridSizeMenu: SubMenu
314314
) {
315315
when (fragment.getGridSize()) {
@@ -344,7 +344,7 @@ class MainActivity : AbsSlidingMusicPanelActivity(),
344344
}
345345

346346
private fun setupLayoutMenu(
347-
fragment: AbsLibraryPagerRecyclerViewCustomGridSizeFragment<*, *>,
347+
fragment: AbsRecyclerViewCustomGridSizeFragment<*, *>,
348348
subMenu: SubMenu
349349
) {
350350
when (fragment.itemLayoutRes()) {
@@ -366,7 +366,7 @@ class MainActivity : AbsSlidingMusicPanelActivity(),
366366
}
367367

368368
private fun setUpSortOrderMenu(
369-
fragment: AbsLibraryPagerRecyclerViewCustomGridSizeFragment<*, *>,
369+
fragment: AbsRecyclerViewCustomGridSizeFragment<*, *>,
370370
sortOrderMenu: SubMenu
371371
) {
372372
val currentSortOrder = fragment.getSortOrder()
@@ -532,8 +532,13 @@ class MainActivity : AbsSlidingMusicPanelActivity(),
532532
fragment: Fragment,
533533
tag: String
534534
) {
535-
536535
supportFragmentManager.commit {
536+
setCustomAnimations(
537+
R.anim.retro_fragment_open_enter,
538+
R.anim.retro_fragment_open_exit,
539+
R.anim.retro_fragment_fade_enter,
540+
R.anim.retro_fragment_fade_exit
541+
)
537542
replace(R.id.fragment_container, fragment, tag)
538543
}
539544
currentFragment = fragment as MainActivityFragmentCallbacks

0 commit comments

Comments
 (0)