mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-02 18:31:40 +00:00
- Removed middle layer of abstraction for subsonic classes
- Used kotlin for classes
This commit is contained in:
parent
917c0839de
commit
ca15f51c85
168 changed files with 2026 additions and 6588 deletions
|
|
@ -1,55 +1,19 @@
|
|||
package com.cappielloantonio.play.model
|
||||
|
||||
import android.os.Parcelable
|
||||
import androidx.annotation.Keep
|
||||
import androidx.room.ColumnInfo
|
||||
import androidx.room.Entity
|
||||
import androidx.room.PrimaryKey
|
||||
import com.cappielloantonio.play.subsonic.models.Child
|
||||
import kotlinx.android.parcel.Parcelize
|
||||
|
||||
@Keep
|
||||
@Parcelize
|
||||
@Entity(tableName = "chronology")
|
||||
data class Chronology(
|
||||
@ColumnInfo(name = "id")
|
||||
val trackId: String,
|
||||
|
||||
@ColumnInfo(name = "title")
|
||||
val title: String,
|
||||
|
||||
@ColumnInfo(name = "albumId")
|
||||
val albumId: String,
|
||||
|
||||
@ColumnInfo(name = "albumName")
|
||||
val albumName: String,
|
||||
|
||||
@ColumnInfo(name = "artistId")
|
||||
val artistId: String,
|
||||
|
||||
@ColumnInfo(name = "artistName")
|
||||
val artistName: String,
|
||||
|
||||
@ColumnInfo(name = "cover_art_id")
|
||||
val coverArtId: String,
|
||||
|
||||
@ColumnInfo(name = "duration")
|
||||
val duration: Long,
|
||||
|
||||
@ColumnInfo(name = "container")
|
||||
val container: String,
|
||||
|
||||
@ColumnInfo(name = "bitrate")
|
||||
val bitrate: Int,
|
||||
|
||||
@ColumnInfo(name = "extension")
|
||||
val extension: String,
|
||||
|
||||
@ColumnInfo(name = "server")
|
||||
val server: String,
|
||||
) : Parcelable {
|
||||
@PrimaryKey(autoGenerate = true)
|
||||
var uuid: Int = 0
|
||||
|
||||
class Chronology(@PrimaryKey override val id: String) : Child(id) {
|
||||
@ColumnInfo(name = "timestamp")
|
||||
var timestamp: Long = System.currentTimeMillis()
|
||||
|
||||
@ColumnInfo(name = "server")
|
||||
var server: String? = null
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue