From f995ea9cec0b4279e4949ba6a9a9952c17cad768 Mon Sep 17 00:00:00 2001 From: antonio Date: Sat, 11 Mar 2023 18:12:46 +0100 Subject: [PATCH] Removed deprecated kotlin-android-extensions --- app/build.gradle | 2 +- .../cappielloantonio/play/model/Chronology.kt | 2 +- .../cappielloantonio/play/model/Download.kt | 2 +- .../com/cappielloantonio/play/model/Queue.kt | 2 +- .../play/model/RecentSearch.kt | 2 +- .../com/cappielloantonio/play/model/Server.kt | 2 +- .../play/subsonic/base/Version.java | 2 +- .../play/subsonic/models/AlbumID3.kt | 2 +- .../play/subsonic/models/AlbumWithSongsID3.kt | 2 +- .../play/subsonic/models/Artist.kt | 60 --------- .../play/subsonic/models/ArtistID3.kt | 2 +- .../subsonic/models/ArtistWithAlbumsID3.kt | 2 +- .../play/subsonic/models/AudioTrack.kt | 36 ------ .../play/subsonic/models/Bookmark.kt | 66 ---------- .../play/subsonic/models/Captions.kt | 24 ---- .../play/subsonic/models/ChatMessage.kt | 30 ----- .../play/subsonic/models/Child.kt | 2 +- .../play/subsonic/models/Directory.kt | 116 +----------------- .../play/subsonic/models/Genre.kt | 2 +- .../subsonic/models/InternetRadioStation.kt | 48 -------- .../play/subsonic/models/JukeboxStatus.kt | 30 ----- .../play/subsonic/models/License.kt | 42 ------- .../play/subsonic/models/NowPlayingEntry.kt | 2 +- .../play/subsonic/models/Playlist.kt | 2 +- .../play/subsonic/models/PlaylistWithSongs.kt | 2 +- .../play/subsonic/models/PodcastChannel.kt | 2 +- .../play/subsonic/models/PodcastEpisode.kt | 2 +- .../play/subsonic/models/SimilarArtistID3.kt | 2 +- .../play/subsonic/models/VideoConversion.kt | 36 ------ .../cappielloantonio/play/util/MusicUtil.java | 15 +-- build.gradle | 6 +- 31 files changed, 22 insertions(+), 525 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 493a00b9..beb8d231 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,6 +1,6 @@ apply plugin: 'com.android.application' apply plugin: 'kotlin-android' -apply plugin: 'kotlin-android-extensions' +apply plugin: 'kotlin-parcelize' android { compileSdkVersion 33 diff --git a/app/src/main/java/com/cappielloantonio/play/model/Chronology.kt b/app/src/main/java/com/cappielloantonio/play/model/Chronology.kt index 7bcacaaf..431a2b77 100644 --- a/app/src/main/java/com/cappielloantonio/play/model/Chronology.kt +++ b/app/src/main/java/com/cappielloantonio/play/model/Chronology.kt @@ -7,7 +7,7 @@ import androidx.room.Entity import androidx.room.PrimaryKey import com.cappielloantonio.play.subsonic.models.Child import com.cappielloantonio.play.util.Preferences -import kotlinx.android.parcel.Parcelize +import kotlinx.parcelize.Parcelize import java.util.* @Keep diff --git a/app/src/main/java/com/cappielloantonio/play/model/Download.kt b/app/src/main/java/com/cappielloantonio/play/model/Download.kt index 45e438f3..800851db 100644 --- a/app/src/main/java/com/cappielloantonio/play/model/Download.kt +++ b/app/src/main/java/com/cappielloantonio/play/model/Download.kt @@ -5,7 +5,7 @@ import androidx.room.ColumnInfo import androidx.room.Entity import androidx.room.PrimaryKey import com.cappielloantonio.play.subsonic.models.Child -import kotlinx.android.parcel.Parcelize +import kotlinx.parcelize.Parcelize @Keep @Parcelize diff --git a/app/src/main/java/com/cappielloantonio/play/model/Queue.kt b/app/src/main/java/com/cappielloantonio/play/model/Queue.kt index 2f69f83a..d3866b0e 100644 --- a/app/src/main/java/com/cappielloantonio/play/model/Queue.kt +++ b/app/src/main/java/com/cappielloantonio/play/model/Queue.kt @@ -5,7 +5,7 @@ import androidx.room.ColumnInfo import androidx.room.Entity import androidx.room.PrimaryKey import com.cappielloantonio.play.subsonic.models.Child -import kotlinx.android.parcel.Parcelize +import kotlinx.parcelize.Parcelize @Keep @Parcelize diff --git a/app/src/main/java/com/cappielloantonio/play/model/RecentSearch.kt b/app/src/main/java/com/cappielloantonio/play/model/RecentSearch.kt index 549a1e83..f538c8b2 100644 --- a/app/src/main/java/com/cappielloantonio/play/model/RecentSearch.kt +++ b/app/src/main/java/com/cappielloantonio/play/model/RecentSearch.kt @@ -5,7 +5,7 @@ import androidx.annotation.Keep import androidx.room.ColumnInfo import androidx.room.Entity import androidx.room.PrimaryKey -import kotlinx.android.parcel.Parcelize +import kotlinx.parcelize.Parcelize @Keep @Parcelize diff --git a/app/src/main/java/com/cappielloantonio/play/model/Server.kt b/app/src/main/java/com/cappielloantonio/play/model/Server.kt index 0cbdace7..93f21bd0 100644 --- a/app/src/main/java/com/cappielloantonio/play/model/Server.kt +++ b/app/src/main/java/com/cappielloantonio/play/model/Server.kt @@ -5,7 +5,7 @@ import androidx.annotation.Keep import androidx.room.ColumnInfo import androidx.room.Entity import androidx.room.PrimaryKey -import kotlinx.android.parcel.Parcelize +import kotlinx.parcelize.Parcelize @Keep @Parcelize diff --git a/app/src/main/java/com/cappielloantonio/play/subsonic/base/Version.java b/app/src/main/java/com/cappielloantonio/play/subsonic/base/Version.java index 6bb1d19c..fb7b447e 100644 --- a/app/src/main/java/com/cappielloantonio/play/subsonic/base/Version.java +++ b/app/src/main/java/com/cappielloantonio/play/subsonic/base/Version.java @@ -4,7 +4,7 @@ import androidx.annotation.NonNull; public class Version implements Comparable { - private static final String VERSION_PATTERN = "[0-9]+(\\.[0-9]+)*"; + private static final String VERSION_PATTERN = "\\d+(\\.\\d+)*"; private final String versionString; public static Version of(String versionString) { diff --git a/app/src/main/java/com/cappielloantonio/play/subsonic/models/AlbumID3.kt b/app/src/main/java/com/cappielloantonio/play/subsonic/models/AlbumID3.kt index 5b603263..f643d02e 100644 --- a/app/src/main/java/com/cappielloantonio/play/subsonic/models/AlbumID3.kt +++ b/app/src/main/java/com/cappielloantonio/play/subsonic/models/AlbumID3.kt @@ -2,7 +2,7 @@ package com.cappielloantonio.play.subsonic.models import android.os.Parcelable import com.google.gson.annotations.SerializedName -import kotlinx.android.parcel.Parcelize +import kotlinx.parcelize.Parcelize import java.util.* @Parcelize diff --git a/app/src/main/java/com/cappielloantonio/play/subsonic/models/AlbumWithSongsID3.kt b/app/src/main/java/com/cappielloantonio/play/subsonic/models/AlbumWithSongsID3.kt index b64d79cf..1d708329 100644 --- a/app/src/main/java/com/cappielloantonio/play/subsonic/models/AlbumWithSongsID3.kt +++ b/app/src/main/java/com/cappielloantonio/play/subsonic/models/AlbumWithSongsID3.kt @@ -2,7 +2,7 @@ package com.cappielloantonio.play.subsonic.models import android.os.Parcelable import com.google.gson.annotations.SerializedName -import kotlinx.android.parcel.Parcelize +import kotlinx.parcelize.Parcelize @Parcelize class AlbumWithSongsID3 : AlbumID3(), Parcelable { diff --git a/app/src/main/java/com/cappielloantonio/play/subsonic/models/Artist.kt b/app/src/main/java/com/cappielloantonio/play/subsonic/models/Artist.kt index 62624833..5a396a4d 100644 --- a/app/src/main/java/com/cappielloantonio/play/subsonic/models/Artist.kt +++ b/app/src/main/java/com/cappielloantonio/play/subsonic/models/Artist.kt @@ -3,69 +3,9 @@ package com.cappielloantonio.play.subsonic.models import java.time.LocalDateTime class Artist { - /** - * Gets the value of the id property. - * - * @return possible object is - * [String] - */ - /** - * Sets the value of the id property. - * - * @param value allowed object is - * [String] - */ var id: String? = null - /** - * Gets the value of the name property. - * - * @return possible object is - * [String] - */ - /** - * Sets the value of the name property. - * - * @param value allowed object is - * [String] - */ var name: String? = null - /** - * Gets the value of the starred property. - * - * @return possible object is - * [String] - */ - /** - * Sets the value of the starred property. - * - * @param value allowed object is - * [String] - */ var starred: LocalDateTime? = null - /** - * Gets the value of the userRating property. - * - * @return possible object is - * [Integer] - */ - /** - * Sets the value of the userRating property. - * - * @param value allowed object is - * [Integer] - */ var userRating: Int? = null - /** - * Gets the value of the averageRating property. - * - * @return possible object is - * [Double] - */ - /** - * Sets the value of the averageRating property. - * - * @param value allowed object is - * [Double] - */ var averageRating: Double? = null } \ No newline at end of file diff --git a/app/src/main/java/com/cappielloantonio/play/subsonic/models/ArtistID3.kt b/app/src/main/java/com/cappielloantonio/play/subsonic/models/ArtistID3.kt index 76ad227e..6a7dc72c 100644 --- a/app/src/main/java/com/cappielloantonio/play/subsonic/models/ArtistID3.kt +++ b/app/src/main/java/com/cappielloantonio/play/subsonic/models/ArtistID3.kt @@ -2,7 +2,7 @@ package com.cappielloantonio.play.subsonic.models import android.os.Parcelable import com.google.gson.annotations.SerializedName -import kotlinx.android.parcel.Parcelize +import kotlinx.parcelize.Parcelize import java.util.* @Parcelize diff --git a/app/src/main/java/com/cappielloantonio/play/subsonic/models/ArtistWithAlbumsID3.kt b/app/src/main/java/com/cappielloantonio/play/subsonic/models/ArtistWithAlbumsID3.kt index 99e134ef..503bfb75 100644 --- a/app/src/main/java/com/cappielloantonio/play/subsonic/models/ArtistWithAlbumsID3.kt +++ b/app/src/main/java/com/cappielloantonio/play/subsonic/models/ArtistWithAlbumsID3.kt @@ -2,7 +2,7 @@ package com.cappielloantonio.play.subsonic.models import android.os.Parcelable import com.google.gson.annotations.SerializedName -import kotlinx.android.parcel.Parcelize +import kotlinx.parcelize.Parcelize @Parcelize class ArtistWithAlbumsID3 : ArtistID3(), Parcelable { diff --git a/app/src/main/java/com/cappielloantonio/play/subsonic/models/AudioTrack.kt b/app/src/main/java/com/cappielloantonio/play/subsonic/models/AudioTrack.kt index 00ae0e90..a499b277 100644 --- a/app/src/main/java/com/cappielloantonio/play/subsonic/models/AudioTrack.kt +++ b/app/src/main/java/com/cappielloantonio/play/subsonic/models/AudioTrack.kt @@ -1,43 +1,7 @@ package com.cappielloantonio.play.subsonic.models class AudioTrack { - /** - * Gets the value of the id property. - * - * @return possible object is - * [String] - */ - /** - * Sets the value of the id property. - * - * @param value allowed object is - * [String] - */ var id: String? = null - /** - * Gets the value of the name property. - * - * @return possible object is - * [String] - */ - /** - * Sets the value of the name property. - * - * @param value allowed object is - * [String] - */ var name: String? = null - /** - * Gets the value of the languageCode property. - * - * @return possible object is - * [String] - */ - /** - * Sets the value of the languageCode property. - * - * @param value allowed object is - * [String] - */ var languageCode: String? = null } \ No newline at end of file diff --git a/app/src/main/java/com/cappielloantonio/play/subsonic/models/Bookmark.kt b/app/src/main/java/com/cappielloantonio/play/subsonic/models/Bookmark.kt index 5f0fbabe..05ebfc64 100644 --- a/app/src/main/java/com/cappielloantonio/play/subsonic/models/Bookmark.kt +++ b/app/src/main/java/com/cappielloantonio/play/subsonic/models/Bookmark.kt @@ -3,76 +3,10 @@ package com.cappielloantonio.play.subsonic.models import java.time.LocalDateTime class Bookmark { - /** - * Gets the value of the entry property. - * - * @return possible object is - * [Child] - */ - /** - * Sets the value of the entry property. - * - * @param value allowed object is - * [Child] - */ var entry: Child? = null - /** - * Gets the value of the position property. - */ - /** - * Sets the value of the position property. - */ var position: Long = 0 - /** - * Gets the value of the username property. - * - * @return possible object is - * [String] - */ - /** - * Sets the value of the username property. - * - * @param value allowed object is - * [String] - */ var username: String? = null - /** - * Gets the value of the comment property. - * - * @return possible object is - * [String] - */ - /** - * Sets the value of the comment property. - * - * @param value allowed object is - * [String] - */ var comment: String? = null - /** - * Gets the value of the created property. - * - * @return possible object is - * [String] - */ - /** - * Sets the value of the created property. - * - * @param value allowed object is - * [String] - */ var created: LocalDateTime? = null - /** - * Gets the value of the changed property. - * - * @return possible object is - * [String] - */ - /** - * Sets the value of the changed property. - * - * @param value allowed object is - * [String] - */ var changed: LocalDateTime? = null } \ No newline at end of file diff --git a/app/src/main/java/com/cappielloantonio/play/subsonic/models/Captions.kt b/app/src/main/java/com/cappielloantonio/play/subsonic/models/Captions.kt index a229f940..9bfd0de5 100644 --- a/app/src/main/java/com/cappielloantonio/play/subsonic/models/Captions.kt +++ b/app/src/main/java/com/cappielloantonio/play/subsonic/models/Captions.kt @@ -1,30 +1,6 @@ package com.cappielloantonio.play.subsonic.models class Captions { - /** - * Gets the value of the id property. - * - * @return possible object is - * [String] - */ - /** - * Sets the value of the id property. - * - * @param value allowed object is - * [String] - */ var id: String? = null - /** - * Gets the value of the name property. - * - * @return possible object is - * [String] - */ - /** - * Sets the value of the name property. - * - * @param value allowed object is - * [String] - */ var name: String? = null } \ No newline at end of file diff --git a/app/src/main/java/com/cappielloantonio/play/subsonic/models/ChatMessage.kt b/app/src/main/java/com/cappielloantonio/play/subsonic/models/ChatMessage.kt index f3e6211e..6866e295 100644 --- a/app/src/main/java/com/cappielloantonio/play/subsonic/models/ChatMessage.kt +++ b/app/src/main/java/com/cappielloantonio/play/subsonic/models/ChatMessage.kt @@ -1,37 +1,7 @@ package com.cappielloantonio.play.subsonic.models class ChatMessage { - /** - * Gets the value of the username property. - * - * @return possible object is - * [String] - */ - /** - * Sets the value of the username property. - * - * @param value allowed object is - * [String] - */ var username: String? = null - /** - * Gets the value of the time property. - */ - /** - * Sets the value of the time property. - */ var time: Long = 0 - /** - * Gets the value of the message property. - * - * @return possible object is - * [String] - */ - /** - * Sets the value of the message property. - * - * @param value allowed object is - * [String] - */ var message: String? = null } \ No newline at end of file diff --git a/app/src/main/java/com/cappielloantonio/play/subsonic/models/Child.kt b/app/src/main/java/com/cappielloantonio/play/subsonic/models/Child.kt index 7a29fd4e..0c91f68b 100644 --- a/app/src/main/java/com/cappielloantonio/play/subsonic/models/Child.kt +++ b/app/src/main/java/com/cappielloantonio/play/subsonic/models/Child.kt @@ -4,7 +4,7 @@ import android.os.Parcelable import androidx.room.ColumnInfo import androidx.room.PrimaryKey import com.google.gson.annotations.SerializedName -import kotlinx.android.parcel.Parcelize +import kotlinx.parcelize.Parcelize import java.util.* @Parcelize diff --git a/app/src/main/java/com/cappielloantonio/play/subsonic/models/Directory.kt b/app/src/main/java/com/cappielloantonio/play/subsonic/models/Directory.kt index 1a5ed477..bcad0470 100644 --- a/app/src/main/java/com/cappielloantonio/play/subsonic/models/Directory.kt +++ b/app/src/main/java/com/cappielloantonio/play/subsonic/models/Directory.kt @@ -3,126 +3,12 @@ package com.cappielloantonio.play.subsonic.models import java.time.LocalDateTime class Directory { - protected var children: List? = null - /** - * Gets the value of the id property. - * - * @return possible object is - * [String] - */ - /** - * Sets the value of the id property. - * - * @param value allowed object is - * [String] - */ + var children: List? = null var id: String? = null - /** - * Gets the value of the parentId property. - * - * @return possible object is - * [String] - */ - /** - * Sets the value of the parentId property. - * - * @param value allowed object is - * [String] - */ var parentId: String? = null - /** - * Gets the value of the name property. - * - * @return possible object is - * [String] - */ - /** - * Sets the value of the name property. - * - * @param value allowed object is - * [String] - */ var name: String? = null - /** - * Gets the value of the starred property. - * - * @return possible object is - * [String] - */ - /** - * Sets the value of the starred property. - * - * @param value allowed object is - * [String] - */ var starred: LocalDateTime? = null - /** - * Gets the value of the userRating property. - * - * @return possible object is - * [Integer] - */ - /** - * Sets the value of the userRating property. - * - * @param value allowed object is - * [Integer] - */ var userRating: Int? = null - /** - * Gets the value of the averageRating property. - * - * @return possible object is - * [Double] - */ - /** - * Sets the value of the averageRating property. - * - * @param value allowed object is - * [Double] - */ var averageRating: Double? = null - /** - * Gets the value of the playCount property. - * - * @return possible object is - * [Long] - */ - /** - * Sets the value of the playCount property. - * - * @param value allowed object is - * [Long] - */ var playCount: Long? = null - - /** - * Gets the value of the children property. - * - * - * - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the children property. - * - * - * - * For example, to add a new item, do as follows: - *
-     * getchildren().add(newItem);
-    
* - * - * - * - * - * Objects of the following type(s) are allowed in the list - * [Child] - */ - fun getchildren(): List? { - if (children == null) { - children = ArrayList() - } - return children - } } \ No newline at end of file diff --git a/app/src/main/java/com/cappielloantonio/play/subsonic/models/Genre.kt b/app/src/main/java/com/cappielloantonio/play/subsonic/models/Genre.kt index 63b1cf97..3172fb49 100644 --- a/app/src/main/java/com/cappielloantonio/play/subsonic/models/Genre.kt +++ b/app/src/main/java/com/cappielloantonio/play/subsonic/models/Genre.kt @@ -2,7 +2,7 @@ package com.cappielloantonio.play.subsonic.models import android.os.Parcelable import com.google.gson.annotations.SerializedName -import kotlinx.android.parcel.Parcelize +import kotlinx.parcelize.Parcelize @Parcelize class Genre : Parcelable { diff --git a/app/src/main/java/com/cappielloantonio/play/subsonic/models/InternetRadioStation.kt b/app/src/main/java/com/cappielloantonio/play/subsonic/models/InternetRadioStation.kt index 6d9d0831..a5164e36 100644 --- a/app/src/main/java/com/cappielloantonio/play/subsonic/models/InternetRadioStation.kt +++ b/app/src/main/java/com/cappielloantonio/play/subsonic/models/InternetRadioStation.kt @@ -1,56 +1,8 @@ package com.cappielloantonio.play.subsonic.models class InternetRadioStation { - /** - * Gets the value of the id property. - * - * @return possible object is - * [String] - */ - /** - * Sets the value of the id property. - * - * @param value allowed object is - * [String] - */ var id: String? = null - /** - * Gets the value of the name property. - * - * @return possible object is - * [String] - */ - /** - * Sets the value of the name property. - * - * @param value allowed object is - * [String] - */ var name: String? = null - /** - * Gets the value of the streamUrl property. - * - * @return possible object is - * [String] - */ - /** - * Sets the value of the streamUrl property. - * - * @param value allowed object is - * [String] - */ var streamUrl: String? = null - /** - * Gets the value of the homePageUrl property. - * - * @return possible object is - * [String] - */ - /** - * Sets the value of the homePageUrl property. - * - * @param value allowed object is - * [String] - */ var homePageUrl: String? = null } \ No newline at end of file diff --git a/app/src/main/java/com/cappielloantonio/play/subsonic/models/JukeboxStatus.kt b/app/src/main/java/com/cappielloantonio/play/subsonic/models/JukeboxStatus.kt index d0bb1f2c..040a633d 100644 --- a/app/src/main/java/com/cappielloantonio/play/subsonic/models/JukeboxStatus.kt +++ b/app/src/main/java/com/cappielloantonio/play/subsonic/models/JukeboxStatus.kt @@ -1,38 +1,8 @@ package com.cappielloantonio.play.subsonic.models open class JukeboxStatus { - /** - * Gets the value of the currentIndex property. - */ - /** - * Sets the value of the currentIndex property. - */ var currentIndex = 0 - /** - * Gets the value of the playing property. - */ - /** - * Sets the value of the playing property. - */ var isPlaying = false - /** - * Gets the value of the gain property. - */ - /** - * Sets the value of the gain property. - */ var gain = 0f - /** - * Gets the value of the position property. - * - * @return possible object is - * [Integer] - */ - /** - * Sets the value of the position property. - * - * @param value allowed object is - * [Integer] - */ var position: Int? = null } \ No newline at end of file diff --git a/app/src/main/java/com/cappielloantonio/play/subsonic/models/License.kt b/app/src/main/java/com/cappielloantonio/play/subsonic/models/License.kt index 4dce074b..e16b199d 100644 --- a/app/src/main/java/com/cappielloantonio/play/subsonic/models/License.kt +++ b/app/src/main/java/com/cappielloantonio/play/subsonic/models/License.kt @@ -3,50 +3,8 @@ package com.cappielloantonio.play.subsonic.models import java.time.LocalDateTime class License { - /** - * Gets the value of the valid property. - */ - /** - * Sets the value of the valid property. - */ var isValid = false - /** - * Gets the value of the email property. - * - * @return possible object is - * [String] - */ - /** - * Sets the value of the email property. - * - * @param value allowed object is - * [String] - */ var email: String? = null - /** - * Gets the value of the licenseExpires property. - * - * @return possible object is - * [String] - */ - /** - * Sets the value of the licenseExpires property. - * - * @param value allowed object is - * [String] - */ var licenseExpires: LocalDateTime? = null - /** - * Gets the value of the trialExpires property. - * - * @return possible object is - * [String] - */ - /** - * Sets the value of the trialExpires property. - * - * @param value allowed object is - * [String] - */ var trialExpires: LocalDateTime? = null } \ No newline at end of file diff --git a/app/src/main/java/com/cappielloantonio/play/subsonic/models/NowPlayingEntry.kt b/app/src/main/java/com/cappielloantonio/play/subsonic/models/NowPlayingEntry.kt index 29870fe8..49ae64e9 100644 --- a/app/src/main/java/com/cappielloantonio/play/subsonic/models/NowPlayingEntry.kt +++ b/app/src/main/java/com/cappielloantonio/play/subsonic/models/NowPlayingEntry.kt @@ -1,7 +1,7 @@ package com.cappielloantonio.play.subsonic.models import com.google.gson.annotations.SerializedName -import kotlinx.android.parcel.Parcelize +import kotlinx.parcelize.Parcelize @Parcelize class NowPlayingEntry( diff --git a/app/src/main/java/com/cappielloantonio/play/subsonic/models/Playlist.kt b/app/src/main/java/com/cappielloantonio/play/subsonic/models/Playlist.kt index 93214c1b..32b96ca6 100644 --- a/app/src/main/java/com/cappielloantonio/play/subsonic/models/Playlist.kt +++ b/app/src/main/java/com/cappielloantonio/play/subsonic/models/Playlist.kt @@ -6,7 +6,7 @@ import androidx.room.Entity import androidx.room.Ignore import androidx.room.PrimaryKey import com.google.gson.annotations.SerializedName -import kotlinx.android.parcel.Parcelize +import kotlinx.parcelize.Parcelize import java.util.* @Parcelize diff --git a/app/src/main/java/com/cappielloantonio/play/subsonic/models/PlaylistWithSongs.kt b/app/src/main/java/com/cappielloantonio/play/subsonic/models/PlaylistWithSongs.kt index 39caa170..793fa06a 100644 --- a/app/src/main/java/com/cappielloantonio/play/subsonic/models/PlaylistWithSongs.kt +++ b/app/src/main/java/com/cappielloantonio/play/subsonic/models/PlaylistWithSongs.kt @@ -2,7 +2,7 @@ package com.cappielloantonio.play.subsonic.models import android.os.Parcelable import com.google.gson.annotations.SerializedName -import kotlinx.android.parcel.Parcelize +import kotlinx.parcelize.Parcelize @Parcelize class PlaylistWithSongs( diff --git a/app/src/main/java/com/cappielloantonio/play/subsonic/models/PodcastChannel.kt b/app/src/main/java/com/cappielloantonio/play/subsonic/models/PodcastChannel.kt index 316682f8..318f6d16 100644 --- a/app/src/main/java/com/cappielloantonio/play/subsonic/models/PodcastChannel.kt +++ b/app/src/main/java/com/cappielloantonio/play/subsonic/models/PodcastChannel.kt @@ -2,7 +2,7 @@ package com.cappielloantonio.play.subsonic.models import android.os.Parcelable import com.google.gson.annotations.SerializedName -import kotlinx.android.parcel.Parcelize +import kotlinx.parcelize.Parcelize @Parcelize class PodcastChannel : Parcelable { diff --git a/app/src/main/java/com/cappielloantonio/play/subsonic/models/PodcastEpisode.kt b/app/src/main/java/com/cappielloantonio/play/subsonic/models/PodcastEpisode.kt index a09bb5fa..8af56379 100644 --- a/app/src/main/java/com/cappielloantonio/play/subsonic/models/PodcastEpisode.kt +++ b/app/src/main/java/com/cappielloantonio/play/subsonic/models/PodcastEpisode.kt @@ -2,7 +2,7 @@ package com.cappielloantonio.play.subsonic.models import android.os.Parcelable import com.google.gson.annotations.SerializedName -import kotlinx.android.parcel.Parcelize +import kotlinx.parcelize.Parcelize import java.util.* @Parcelize diff --git a/app/src/main/java/com/cappielloantonio/play/subsonic/models/SimilarArtistID3.kt b/app/src/main/java/com/cappielloantonio/play/subsonic/models/SimilarArtistID3.kt index 6fea946b..ebc13084 100644 --- a/app/src/main/java/com/cappielloantonio/play/subsonic/models/SimilarArtistID3.kt +++ b/app/src/main/java/com/cappielloantonio/play/subsonic/models/SimilarArtistID3.kt @@ -1,7 +1,7 @@ package com.cappielloantonio.play.subsonic.models import android.os.Parcelable -import kotlinx.android.parcel.Parcelize +import kotlinx.parcelize.Parcelize @Parcelize class SimilarArtistID3 : ArtistID3(), Parcelable \ No newline at end of file diff --git a/app/src/main/java/com/cappielloantonio/play/subsonic/models/VideoConversion.kt b/app/src/main/java/com/cappielloantonio/play/subsonic/models/VideoConversion.kt index eab29085..d6d258fa 100644 --- a/app/src/main/java/com/cappielloantonio/play/subsonic/models/VideoConversion.kt +++ b/app/src/main/java/com/cappielloantonio/play/subsonic/models/VideoConversion.kt @@ -1,43 +1,7 @@ package com.cappielloantonio.play.subsonic.models class VideoConversion { - /** - * Gets the value of the id property. - * - * @return possible object is - * [String] - */ - /** - * Sets the value of the id property. - * - * @param value allowed object is - * [String] - */ var id: String? = null - /** - * Gets the value of the bitRate property. - * - * @return possible object is - * [Integer] - */ - /** - * Sets the value of the bitRate property. - * - * @param value allowed object is - * [Integer] - */ var bitRate: Int? = null - /** - * Gets the value of the audioTrackId property. - * - * @return possible object is - * [Integer] - */ - /** - * Sets the value of the audioTrackId property. - * - * @param value allowed object is - * [Integer] - */ var audioTrackId: Int? = null } \ No newline at end of file diff --git a/app/src/main/java/com/cappielloantonio/play/util/MusicUtil.java b/app/src/main/java/com/cappielloantonio/play/util/MusicUtil.java index 437dc341..ebd4feda 100644 --- a/app/src/main/java/com/cappielloantonio/play/util/MusicUtil.java +++ b/app/src/main/java/com/cappielloantonio/play/util/MusicUtil.java @@ -15,7 +15,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Locale; import java.util.Map; -import java.util.regex.Pattern; import java.util.stream.Collectors; public class MusicUtil { @@ -122,7 +121,7 @@ public class MusicUtil { .replaceAll(""", "\"") .replaceAll("'", "'") .replaceAll("&", "'") - .replaceAll("]+)>((?:.(?!))*.)", ""); + .replaceAll("]+)>((?:.(?!))*.)", ""); } return ""; @@ -140,18 +139,6 @@ public class MusicUtil { return ""; } - public static String normalizedArtistName(String string) { - if (string != null) { - if (string.toLowerCase().contains(" feat.")) - return Pattern.compile(" feat.", Pattern.CASE_INSENSITIVE).split(string)[0].trim(); - else if (string.toLowerCase().contains(" featuring")) - return Pattern.compile(" featuring", Pattern.CASE_INSENSITIVE).split(string)[0].trim(); - else return string; - } - - return ""; - } - public static List getReadableStrings(List strings) { List readableStrings = new ArrayList<>(); diff --git a/build.gradle b/build.gradle index 4a258fba..e4470882 100644 --- a/build.gradle +++ b/build.gradle @@ -1,4 +1,3 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { google() @@ -6,10 +5,7 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:7.4.2' - classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20' - - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files + classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.0' } }