From e50889b1b86fbc937d1ad7ce75b4011ca0374cd1 Mon Sep 17 00:00:00 2001 From: kostas214pro Date: Thu, 4 May 2023 00:07:39 +0300 Subject: [PATCH] Huge Improvements to stability and app function and other updates 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 --- .idea/compiler.xml | 2 +- .idea/deploymentTargetDropDown.xml | 17 - .idea/gradle.xml | 2 +- .idea/kotlinc.xml | 6 + .idea/misc.xml | 3 +- .idea/vcs.xml | 1 - app/build.gradle | 23 +- .../example/spotifydownloader/Application.kt | 11 +- .../Fragments/SongDownloadFragment.kt | 350 +++++ .../Fragments/SongFragment.kt | 230 +++ .../{ => Fragments}/albumFragment.kt | 86 +- .../{ => Fragments}/downloadFragment.kt | 311 ++-- .../{ => Fragments}/playListFragment.kt | 132 +- .../example/spotifydownloader/MainActivity.kt | 6 +- .../example/spotifydownloader/SongFragment.kt | 299 ---- .../SpotifyApi/SpotifyApi.kt | 325 +++++ .../SpotifyApi/api/AuthApi.kt | 17 + .../SpotifyApi/api/RetrofitApiInstance.kt | 18 + .../SpotifyApi/api/RetrofitAuthInstance.kt | 22 + .../SpotifyApi/api/SpotifyAPI.kt | 52 + .../SpotifyApi/model/Album/Album.kt | 23 + .../SpotifyApi/model/Album/Artist.kt | 10 + .../SpotifyApi/model/Album/Copyright.kt | 6 + .../SpotifyApi/model/Album/ExternalIds.kt | 5 + .../SpotifyApi/model/Album/ExternalUrlsX.kt | 5 + .../SpotifyApi/model/Album/Image.kt | 7 + .../SpotifyApi/model/Album/Item.kt | 17 + .../SpotifyApi/model/Album/Tracks.kt | 11 + .../SpotifyApi/model/ApiToken.kt | 10 + .../SpotifyApi/model/Artist/Artist.kt | 14 + .../SpotifyApi/model/Artist/ExternalUrls.kt | 5 + .../SpotifyApi/model/Artist/Followers.kt | 6 + .../SpotifyApi/model/Artist/Image.kt | 7 + .../SpotifyApi/model/ExtractIdResponse.kt | 7 + .../SpotifyApi/model/Search/Album.kt | 17 + .../SpotifyApi/model/Search/ArtistX.kt | 10 + .../SpotifyApi/model/Search/ExternalIds.kt | 5 + .../model/Search/ExternalUrlsXXX.kt | 5 + .../SpotifyApi/model/Search/Image.kt | 7 + .../SpotifyApi/model/Search/Item.kt | 20 + .../SpotifyApi/model/Search/Search.kt | 5 + .../SpotifyApi/model/Search/Tracks.kt | 11 + .../SpotifyApi/model/Track/Album.kt | 17 + .../SpotifyApi/model/Track/ArtistX.kt | 10 + .../SpotifyApi/model/Track/ExternalIds.kt | 5 + .../SpotifyApi/model/Track/ExternalUrlsXXX.kt | 5 + .../SpotifyApi/model/Track/Image.kt | 7 + .../SpotifyApi/model/Track/Track.kt | 20 + .../SpotifyApi/model/playlist/AddedBy.kt | 9 + .../SpotifyApi/model/playlist/Album.kt | 17 + .../SpotifyApi/model/playlist/ArtistX.kt | 10 + .../SpotifyApi/model/playlist/ExternalIds.kt | 5 + .../SpotifyApi/model/playlist/ExternalUrls.kt | 5 + .../SpotifyApi/model/playlist/Image.kt | 7 + .../SpotifyApi/model/playlist/Item.kt | 10 + .../SpotifyApi/model/playlist/Playlist.kt | 11 + .../SpotifyApi/model/playlist/Track.kt | 22 + .../model/playlist/VideoThumbnail.kt | 5 + .../SpotifyApi/util/Constants.kt | 14 + .../example/spotifydownloader/model/Data.kt | 17 +- .../spotifydownloader/model/DataSearch.kt | 22 + .../spotifydownloader/model/songItemData.kt | 1 - .../mp3agic/AbstractID3v2FrameData.java | 59 + .../mp3agic/AbstractID3v2Tag.java | 1251 +++++++++++++++++ .../mp3agic/BaseException.java | 39 + .../mp3agic/BufferTools.java | 285 ++++ .../mp3agic/ByteBufferUtils.java | 25 + .../mp3agic/EncodedText.java | 261 ++++ .../mp3agic/FileWrapper.java | 55 + .../spotifydownloader/mp3agic/ID3Wrapper.java | 304 ++++ .../spotifydownloader/mp3agic/ID3v1.java | 38 + .../mp3agic/ID3v1Genres.java | 173 +++ .../spotifydownloader/mp3agic/ID3v1Tag.java | 285 ++++ .../spotifydownloader/mp3agic/ID3v2.java | 153 ++ .../spotifydownloader/mp3agic/ID3v22Tag.java | 31 + .../spotifydownloader/mp3agic/ID3v23Tag.java | 29 + .../mp3agic/ID3v24Frame.java | 28 + .../spotifydownloader/mp3agic/ID3v24Tag.java | 81 ++ .../mp3agic/ID3v2ChapterFrameData.java | 204 +++ .../mp3agic/ID3v2ChapterTOCFrameData.java | 230 +++ .../mp3agic/ID3v2CommentFrameData.java | 155 ++ .../spotifydownloader/mp3agic/ID3v2Frame.java | 205 +++ .../mp3agic/ID3v2FrameSet.java | 67 + .../mp3agic/ID3v2ObseleteFrame.java | 39 + .../ID3v2ObseletePictureFrameData.java | 39 + .../mp3agic/ID3v2PictureFrameData.java | 164 +++ .../mp3agic/ID3v2PopmFrameData.java | 107 ++ .../mp3agic/ID3v2TagFactory.java | 41 + .../mp3agic/ID3v2TextFrameData.java | 78 + .../mp3agic/ID3v2UrlFrameData.java | 119 ++ .../mp3agic/ID3v2WWWFrameData.java | 59 + .../mp3agic/InvalidDataException.java | 18 + .../spotifydownloader/mp3agic/Mp3File.java | 493 +++++++ .../spotifydownloader/mp3agic/MpegFrame.java | 561 ++++++++ .../mp3agic/MutableInteger.java | 44 + .../mp3agic/NoSuchTagException.java | 18 + .../mp3agic/NotSupportedException.java | 18 + .../mp3agic/UnsupportedTagException.java | 18 + .../spotifydownloader/mp3agic/Version.java | 25 + app/src/main/python/main.py | 1 + app/src/main/res/layout/activity_main.xml | 2 +- app/src/main/res/layout/fragment_album.xml | 2 +- app/src/main/res/layout/fragment_download.xml | 13 +- .../main/res/layout/fragment_play_list.xml | 2 +- app/src/main/res/layout/fragment_song.xml | 2 +- .../res/layout/fragment_song_download.xml | 54 + app/src/main/res/navigation/my_nav.xml | 26 +- build.gradle | 5 +- gradle.properties | 4 +- gradle/wrapper/gradle-wrapper.properties | 2 +- 110 files changed, 7682 insertions(+), 575 deletions(-) delete mode 100644 .idea/deploymentTargetDropDown.xml create mode 100644 .idea/kotlinc.xml create mode 100644 app/src/main/java/com/example/spotifydownloader/Fragments/SongDownloadFragment.kt create mode 100644 app/src/main/java/com/example/spotifydownloader/Fragments/SongFragment.kt rename app/src/main/java/com/example/spotifydownloader/{ => Fragments}/albumFragment.kt (68%) rename app/src/main/java/com/example/spotifydownloader/{ => Fragments}/downloadFragment.kt (59%) rename app/src/main/java/com/example/spotifydownloader/{ => Fragments}/playListFragment.kt (56%) delete mode 100644 app/src/main/java/com/example/spotifydownloader/SongFragment.kt create mode 100644 app/src/main/java/com/example/spotifydownloader/SpotifyApi/SpotifyApi.kt create mode 100644 app/src/main/java/com/example/spotifydownloader/SpotifyApi/api/AuthApi.kt create mode 100644 app/src/main/java/com/example/spotifydownloader/SpotifyApi/api/RetrofitApiInstance.kt create mode 100644 app/src/main/java/com/example/spotifydownloader/SpotifyApi/api/RetrofitAuthInstance.kt create mode 100644 app/src/main/java/com/example/spotifydownloader/SpotifyApi/api/SpotifyAPI.kt create mode 100644 app/src/main/java/com/example/spotifydownloader/SpotifyApi/model/Album/Album.kt create mode 100644 app/src/main/java/com/example/spotifydownloader/SpotifyApi/model/Album/Artist.kt create mode 100644 app/src/main/java/com/example/spotifydownloader/SpotifyApi/model/Album/Copyright.kt create mode 100644 app/src/main/java/com/example/spotifydownloader/SpotifyApi/model/Album/ExternalIds.kt create mode 100644 app/src/main/java/com/example/spotifydownloader/SpotifyApi/model/Album/ExternalUrlsX.kt create mode 100644 app/src/main/java/com/example/spotifydownloader/SpotifyApi/model/Album/Image.kt create mode 100644 app/src/main/java/com/example/spotifydownloader/SpotifyApi/model/Album/Item.kt create mode 100644 app/src/main/java/com/example/spotifydownloader/SpotifyApi/model/Album/Tracks.kt create mode 100644 app/src/main/java/com/example/spotifydownloader/SpotifyApi/model/ApiToken.kt create mode 100644 app/src/main/java/com/example/spotifydownloader/SpotifyApi/model/Artist/Artist.kt create mode 100644 app/src/main/java/com/example/spotifydownloader/SpotifyApi/model/Artist/ExternalUrls.kt create mode 100644 app/src/main/java/com/example/spotifydownloader/SpotifyApi/model/Artist/Followers.kt create mode 100644 app/src/main/java/com/example/spotifydownloader/SpotifyApi/model/Artist/Image.kt create mode 100644 app/src/main/java/com/example/spotifydownloader/SpotifyApi/model/ExtractIdResponse.kt create mode 100644 app/src/main/java/com/example/spotifydownloader/SpotifyApi/model/Search/Album.kt create mode 100644 app/src/main/java/com/example/spotifydownloader/SpotifyApi/model/Search/ArtistX.kt create mode 100644 app/src/main/java/com/example/spotifydownloader/SpotifyApi/model/Search/ExternalIds.kt create mode 100644 app/src/main/java/com/example/spotifydownloader/SpotifyApi/model/Search/ExternalUrlsXXX.kt create mode 100644 app/src/main/java/com/example/spotifydownloader/SpotifyApi/model/Search/Image.kt create mode 100644 app/src/main/java/com/example/spotifydownloader/SpotifyApi/model/Search/Item.kt create mode 100644 app/src/main/java/com/example/spotifydownloader/SpotifyApi/model/Search/Search.kt create mode 100644 app/src/main/java/com/example/spotifydownloader/SpotifyApi/model/Search/Tracks.kt create mode 100644 app/src/main/java/com/example/spotifydownloader/SpotifyApi/model/Track/Album.kt create mode 100644 app/src/main/java/com/example/spotifydownloader/SpotifyApi/model/Track/ArtistX.kt create mode 100644 app/src/main/java/com/example/spotifydownloader/SpotifyApi/model/Track/ExternalIds.kt create mode 100644 app/src/main/java/com/example/spotifydownloader/SpotifyApi/model/Track/ExternalUrlsXXX.kt create mode 100644 app/src/main/java/com/example/spotifydownloader/SpotifyApi/model/Track/Image.kt create mode 100644 app/src/main/java/com/example/spotifydownloader/SpotifyApi/model/Track/Track.kt create mode 100644 app/src/main/java/com/example/spotifydownloader/SpotifyApi/model/playlist/AddedBy.kt create mode 100644 app/src/main/java/com/example/spotifydownloader/SpotifyApi/model/playlist/Album.kt create mode 100644 app/src/main/java/com/example/spotifydownloader/SpotifyApi/model/playlist/ArtistX.kt create mode 100644 app/src/main/java/com/example/spotifydownloader/SpotifyApi/model/playlist/ExternalIds.kt create mode 100644 app/src/main/java/com/example/spotifydownloader/SpotifyApi/model/playlist/ExternalUrls.kt create mode 100644 app/src/main/java/com/example/spotifydownloader/SpotifyApi/model/playlist/Image.kt create mode 100644 app/src/main/java/com/example/spotifydownloader/SpotifyApi/model/playlist/Item.kt create mode 100644 app/src/main/java/com/example/spotifydownloader/SpotifyApi/model/playlist/Playlist.kt create mode 100644 app/src/main/java/com/example/spotifydownloader/SpotifyApi/model/playlist/Track.kt create mode 100644 app/src/main/java/com/example/spotifydownloader/SpotifyApi/model/playlist/VideoThumbnail.kt create mode 100644 app/src/main/java/com/example/spotifydownloader/SpotifyApi/util/Constants.kt create mode 100644 app/src/main/java/com/example/spotifydownloader/model/DataSearch.kt create mode 100644 app/src/main/java/com/example/spotifydownloader/mp3agic/AbstractID3v2FrameData.java create mode 100644 app/src/main/java/com/example/spotifydownloader/mp3agic/AbstractID3v2Tag.java create mode 100644 app/src/main/java/com/example/spotifydownloader/mp3agic/BaseException.java create mode 100644 app/src/main/java/com/example/spotifydownloader/mp3agic/BufferTools.java create mode 100644 app/src/main/java/com/example/spotifydownloader/mp3agic/ByteBufferUtils.java create mode 100644 app/src/main/java/com/example/spotifydownloader/mp3agic/EncodedText.java create mode 100644 app/src/main/java/com/example/spotifydownloader/mp3agic/FileWrapper.java create mode 100644 app/src/main/java/com/example/spotifydownloader/mp3agic/ID3Wrapper.java create mode 100644 app/src/main/java/com/example/spotifydownloader/mp3agic/ID3v1.java create mode 100644 app/src/main/java/com/example/spotifydownloader/mp3agic/ID3v1Genres.java create mode 100644 app/src/main/java/com/example/spotifydownloader/mp3agic/ID3v1Tag.java create mode 100644 app/src/main/java/com/example/spotifydownloader/mp3agic/ID3v2.java create mode 100644 app/src/main/java/com/example/spotifydownloader/mp3agic/ID3v22Tag.java create mode 100644 app/src/main/java/com/example/spotifydownloader/mp3agic/ID3v23Tag.java create mode 100644 app/src/main/java/com/example/spotifydownloader/mp3agic/ID3v24Frame.java create mode 100644 app/src/main/java/com/example/spotifydownloader/mp3agic/ID3v24Tag.java create mode 100644 app/src/main/java/com/example/spotifydownloader/mp3agic/ID3v2ChapterFrameData.java create mode 100644 app/src/main/java/com/example/spotifydownloader/mp3agic/ID3v2ChapterTOCFrameData.java create mode 100644 app/src/main/java/com/example/spotifydownloader/mp3agic/ID3v2CommentFrameData.java create mode 100644 app/src/main/java/com/example/spotifydownloader/mp3agic/ID3v2Frame.java create mode 100644 app/src/main/java/com/example/spotifydownloader/mp3agic/ID3v2FrameSet.java create mode 100644 app/src/main/java/com/example/spotifydownloader/mp3agic/ID3v2ObseleteFrame.java create mode 100644 app/src/main/java/com/example/spotifydownloader/mp3agic/ID3v2ObseletePictureFrameData.java create mode 100644 app/src/main/java/com/example/spotifydownloader/mp3agic/ID3v2PictureFrameData.java create mode 100644 app/src/main/java/com/example/spotifydownloader/mp3agic/ID3v2PopmFrameData.java create mode 100644 app/src/main/java/com/example/spotifydownloader/mp3agic/ID3v2TagFactory.java create mode 100644 app/src/main/java/com/example/spotifydownloader/mp3agic/ID3v2TextFrameData.java create mode 100644 app/src/main/java/com/example/spotifydownloader/mp3agic/ID3v2UrlFrameData.java create mode 100644 app/src/main/java/com/example/spotifydownloader/mp3agic/ID3v2WWWFrameData.java create mode 100644 app/src/main/java/com/example/spotifydownloader/mp3agic/InvalidDataException.java create mode 100644 app/src/main/java/com/example/spotifydownloader/mp3agic/Mp3File.java create mode 100644 app/src/main/java/com/example/spotifydownloader/mp3agic/MpegFrame.java create mode 100644 app/src/main/java/com/example/spotifydownloader/mp3agic/MutableInteger.java create mode 100644 app/src/main/java/com/example/spotifydownloader/mp3agic/NoSuchTagException.java create mode 100644 app/src/main/java/com/example/spotifydownloader/mp3agic/NotSupportedException.java create mode 100644 app/src/main/java/com/example/spotifydownloader/mp3agic/UnsupportedTagException.java create mode 100644 app/src/main/java/com/example/spotifydownloader/mp3agic/Version.java create mode 100644 app/src/main/res/layout/fragment_song_download.xml diff --git a/.idea/compiler.xml b/.idea/compiler.xml index fb7f4a8..b589d56 100644 --- a/.idea/compiler.xml +++ b/.idea/compiler.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/.idea/deploymentTargetDropDown.xml b/.idea/deploymentTargetDropDown.xml deleted file mode 100644 index 5380a26..0000000 --- a/.idea/deploymentTargetDropDown.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml index a2d7c21..f01eec3 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -5,8 +5,8 @@