Skip to content

Commit

Permalink
Huge Improvements to stability and app function and other updates
Browse files Browse the repository at this point in the history
The app doesnt use the chaquopy library no more cause it was causing many problems and it was slow, also i rewrote many parts of the code to minimize on api calls and improve performance. I used the retrofit library for all my api calls simplifing the process. Also i used the mp3agic library to update the metadata on the downloaded songs instead of the mutagen library which was used with chaquopy. Last but not least i redisgned the song download tab with an new download screen
  • Loading branch information
kostas214 committed May 3, 2023
1 parent 32a7240 commit e50889b
Show file tree
Hide file tree
Showing 110 changed files with 7,682 additions and 575 deletions.
2 changes: 1 addition & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 0 additions & 17 deletions .idea/deploymentTargetDropDown.xml

This file was deleted.

2 changes: 1 addition & 1 deletion .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 4 additions & 19 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'com.chaquo.python'
id 'androidx.navigation.safeargs.kotlin'
id 'kotlin-parcelize'

Expand All @@ -16,25 +15,7 @@ android {
ndk {
abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
}
python {
pyc{
src false
}

version "3.8"

pip{
install "spotipy"
install "youtube-search-python"
install "music-tag"
install "Pillow"
install "mutagen"



}

}
applicationId "com.example.spotifydownloader"
minSdk 24
targetSdk 33
Expand Down Expand Up @@ -107,6 +88,10 @@ dependencies {

implementation "io.coil-kt:coil:2.3.0"

implementation "com.squareup.retrofit2:retrofit:2.9.0"
implementation "com.squareup.retrofit2:converter-gson:2.9.0"
implementation "com.squareup.okhttp3:logging-interceptor:4.5.0"



}
11 changes: 5 additions & 6 deletions app/src/main/java/com/example/spotifydownloader/Application.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ package com.example.spotifydownloader

import android.app.Application
import android.widget.Toast
import com.chaquo.python.Python
import com.chaquo.python.android.AndroidPlatform
import com.google.android.material.color.DynamicColors
import com.yausername.ffmpeg.FFmpeg
import com.yausername.youtubedl_android.YoutubeDL
Expand All @@ -24,7 +22,10 @@ class SpotifyDownloaderApplication : Application(){
withContext(Dispatchers.IO) {
YoutubeDL.getInstance().init(this@SpotifyDownloaderApplication)
FFmpeg.getInstance().init(this@SpotifyDownloaderApplication)
YoutubeDL.getInstance().updateYoutubeDL(applicationContext)

YoutubeDL.getInstance().updateYoutubeDL(this@SpotifyDownloaderApplication)
println(YoutubeDL.getInstance().version(this@SpotifyDownloaderApplication))
//YoutubeDL.getInstance().updateYoutubeDL(applicationContext)
}
} catch (e: Exception) {
withContext(Dispatchers.Main) {
Expand All @@ -35,9 +36,7 @@ class SpotifyDownloaderApplication : Application(){
).show()
}
}
if (!Python.isStarted()) {
Python.start(AndroidPlatform(this@SpotifyDownloaderApplication))
}


}
}
Expand Down
Loading

0 comments on commit e50889b

Please sign in to comment.