mirror of
https://github.com/Shabinder/SpotiFlyer.git
synced 2024-11-24 18:04:33 +01:00
Apk size reduced
This commit is contained in:
parent
e1c5e16be2
commit
eecb7c3b43
@ -12,6 +12,7 @@
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
<option value="$PROJECT_DIR$/app" />
|
||||
<option value="$PROJECT_DIR$/mobile-ffmpeg" />
|
||||
</set>
|
||||
</option>
|
||||
<option name="resolveModulePerSourceSet" value="false" />
|
||||
|
@ -71,7 +71,7 @@ android {
|
||||
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: "libs", include: ["*.jar"])
|
||||
implementation fileTree(dir: 'libs', include:['*.jar'])
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation 'androidx.core:core-ktx:1.3.1'
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||
@ -82,12 +82,14 @@ dependencies {
|
||||
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0'
|
||||
implementation 'androidx.navigation:navigation-fragment-ktx:2.3.0'
|
||||
implementation 'androidx.navigation:navigation-ui-ktx:2.3.0'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.1.0'
|
||||
|
||||
implementation 'com.google.android.material:material:1.1.0'
|
||||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.7"
|
||||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.7"
|
||||
|
||||
implementation "androidx.room:room-runtime:2.2.5"
|
||||
implementation project(path: ':mobile-ffmpeg')
|
||||
kapt "androidx.room:room-compiler:2.2.5"
|
||||
implementation "androidx.room:room-ktx:2.2.5"
|
||||
implementation ("com.github.bumptech.glide:recyclerview-integration:4.11.0") {
|
||||
@ -97,7 +99,6 @@ dependencies {
|
||||
transitive = true
|
||||
}
|
||||
|
||||
implementation 'androidx.recyclerview:recyclerview:1.1.0'
|
||||
// Authentication Way Changed!
|
||||
// implementation ('com.google.apis:google-api-services-youtube:v3-rev180-1.22.0'){
|
||||
// exclude module: 'httpclient'
|
||||
@ -115,8 +116,6 @@ dependencies {
|
||||
implementation "com.squareup.retrofit2:converter-moshi:2.9.0"
|
||||
|
||||
implementation 'com.mpatric:mp3agic:0.9.1'
|
||||
implementation 'com.arthenica:mobile-ffmpeg-audio:4.4.LTS'
|
||||
|
||||
implementation 'com.shreyaspatil:EasyUpiPayment:2.2'
|
||||
implementation 'com.github.sealedtx:java-youtube-downloader:2.2.3'
|
||||
implementation "androidx.tonyodev.fetch2:xfetch2:3.1.4"
|
||||
|
@ -28,7 +28,6 @@
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||
|
||||
<!-- <uses-permission android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION" />-->
|
||||
|
||||
|
@ -237,7 +237,6 @@ class ForegroundService : Service(){
|
||||
fList?.let {
|
||||
for (file in fList) {
|
||||
if (file.isDirectory) {
|
||||
Log.i(tag,"Cleaning ${file.path} Directory")
|
||||
deleteFile(file)
|
||||
} else if(file.isFile) {
|
||||
if(file.path.toString().substringAfterLast(".") != "mp3"){
|
||||
@ -294,12 +293,6 @@ class ForegroundService : Service(){
|
||||
}
|
||||
Log.i(tag,"${track?.name} Download Started")
|
||||
updateNotification()
|
||||
|
||||
val link = "https://m.youtube.com/watch?v=shCX5YgU9yc"
|
||||
var result = ""
|
||||
result = link.removePrefix("https://")
|
||||
result = link.removePrefix("http://")
|
||||
|
||||
}
|
||||
|
||||
override fun onWaitingNetwork(download: Download) {
|
||||
@ -325,10 +318,10 @@ class ForegroundService : Service(){
|
||||
Log.i(tag,"${track?.name} Download Failed! Error:Fetch!!!!")
|
||||
Log.i(tag,"${track?.name} Requesting Download thru Android DM")
|
||||
downloadUsingDM(download.request.url,download.request.file, track!!)
|
||||
}
|
||||
}
|
||||
downloaded++
|
||||
requestMap.remove(download.request)
|
||||
}
|
||||
}
|
||||
if(requestMap.keys.toList().isEmpty()) speed = 0
|
||||
updateNotification()
|
||||
}
|
||||
@ -346,12 +339,14 @@ class ForegroundService : Service(){
|
||||
}
|
||||
|
||||
override fun onError(download: Download, error: Error, throwable: Throwable?) {
|
||||
serviceScope.launch {
|
||||
val track = requestMap[download.request]
|
||||
downloaded++
|
||||
Log.i(tag,download.error.throwable.toString())
|
||||
Log.i(tag,"${track?.name} Requesting Download thru Android DM")
|
||||
downloadUsingDM(download.request.url,download.request.file, track!!)
|
||||
downloaded++
|
||||
requestMap.remove(download.request)
|
||||
}
|
||||
updateNotification()
|
||||
}
|
||||
|
||||
|
@ -14,6 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
include ':mobile-ffmpeg'
|
||||
|
||||
include ':app'
|
||||
rootProject.name = "spotiflyer"
|
||||
|
Loading…
Reference in New Issue
Block a user