mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 18:03:33 +00:00
build: change of package name
This commit is contained in:
parent
49afdbe4eb
commit
b76a38cb30
274 changed files with 1981 additions and 2161 deletions
|
|
@ -0,0 +1,57 @@
|
|||
package com.cappielloantonio.tempo.model
|
||||
|
||||
import androidx.annotation.Keep
|
||||
import androidx.media3.common.MediaItem
|
||||
import androidx.room.ColumnInfo
|
||||
import androidx.room.Entity
|
||||
import androidx.room.PrimaryKey
|
||||
import com.cappielloantonio.tempo.subsonic.models.Child
|
||||
import com.cappielloantonio.tempo.util.Preferences
|
||||
import kotlinx.parcelize.Parcelize
|
||||
import java.util.*
|
||||
|
||||
@Keep
|
||||
@Parcelize
|
||||
@Entity(tableName = "chronology")
|
||||
class Chronology(@PrimaryKey override val id: String) : Child(id) {
|
||||
@ColumnInfo(name = "timestamp")
|
||||
var timestamp: Long = System.currentTimeMillis()
|
||||
|
||||
@ColumnInfo(name = "server")
|
||||
var server: String? = null
|
||||
|
||||
constructor(mediaItem: MediaItem) : this(mediaItem.mediaMetadata.extras!!.getString("id")!!) {
|
||||
parentId = mediaItem.mediaMetadata.extras!!.getString("parentId")
|
||||
isDir = mediaItem.mediaMetadata.extras!!.getBoolean("isDir")
|
||||
title = mediaItem.mediaMetadata.extras!!.getString("title")
|
||||
album = mediaItem.mediaMetadata.extras!!.getString("album")
|
||||
artist = mediaItem.mediaMetadata.extras!!.getString("artist")
|
||||
track = mediaItem.mediaMetadata.extras!!.getInt("track")
|
||||
year = mediaItem.mediaMetadata.extras!!.getInt("year")
|
||||
genre = mediaItem.mediaMetadata.extras!!.getString("genre")
|
||||
coverArtId = mediaItem.mediaMetadata.extras!!.getString("coverArtId")
|
||||
size = mediaItem.mediaMetadata.extras!!.getLong("size")
|
||||
contentType = mediaItem.mediaMetadata.extras!!.getString("contentType")
|
||||
suffix = mediaItem.mediaMetadata.extras!!.getString("suffix")
|
||||
transcodedContentType = mediaItem.mediaMetadata.extras!!.getString("transcodedContentType")
|
||||
transcodedSuffix = mediaItem.mediaMetadata.extras!!.getString("transcodedSuffix")
|
||||
duration = mediaItem.mediaMetadata.extras!!.getInt("duration")
|
||||
bitrate = mediaItem.mediaMetadata.extras!!.getInt("bitrate")
|
||||
path = mediaItem.mediaMetadata.extras!!.getString("path")
|
||||
isVideo = mediaItem.mediaMetadata.extras!!.getBoolean("isVideo")
|
||||
userRating = mediaItem.mediaMetadata.extras!!.getInt("userRating")
|
||||
averageRating = mediaItem.mediaMetadata.extras!!.getDouble("averageRating")
|
||||
playCount = mediaItem.mediaMetadata.extras!!.getLong("playCount")
|
||||
discNumber = mediaItem.mediaMetadata.extras!!.getInt("discNumber")
|
||||
created = Date(mediaItem.mediaMetadata.extras!!.getLong("created"))
|
||||
starred = Date(mediaItem.mediaMetadata.extras!!.getLong("starred"))
|
||||
albumId = mediaItem.mediaMetadata.extras!!.getString("albumId")
|
||||
artistId = mediaItem.mediaMetadata.extras!!.getString("artistId")
|
||||
type = mediaItem.mediaMetadata.extras!!.getString("type")
|
||||
bookmarkPosition = mediaItem.mediaMetadata.extras!!.getLong("bookmarkPosition")
|
||||
originalWidth = mediaItem.mediaMetadata.extras!!.getInt("originalWidth")
|
||||
originalHeight = mediaItem.mediaMetadata.extras!!.getInt("originalHeight")
|
||||
server = Preferences.getServerId()
|
||||
timestamp = Date().time
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
package com.cappielloantonio.tempo.model
|
||||
|
||||
import androidx.annotation.Keep
|
||||
import androidx.room.ColumnInfo
|
||||
import androidx.room.Entity
|
||||
import androidx.room.PrimaryKey
|
||||
import com.cappielloantonio.tempo.subsonic.models.Child
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
@Keep
|
||||
@Parcelize
|
||||
@Entity(tableName = "download")
|
||||
class Download(@PrimaryKey override val id: String) : Child(id) {
|
||||
@ColumnInfo(name = "playlist_id")
|
||||
var playlistId: String? = null
|
||||
|
||||
@ColumnInfo(name = "playlist_name")
|
||||
var playlistName: String? = null
|
||||
|
||||
@ColumnInfo(name = "download_state", defaultValue = "1")
|
||||
var downloadState: Int = 0;
|
||||
|
||||
constructor(child: Child) : this(child.id) {
|
||||
parentId = child.parentId
|
||||
isDir = child.isDir
|
||||
title = child.title
|
||||
album = child.album
|
||||
artist = child.artist
|
||||
track = child.track
|
||||
year = child.year
|
||||
genre = child.genre
|
||||
coverArtId = child.coverArtId
|
||||
size = child.size
|
||||
contentType = child.contentType
|
||||
suffix = child.suffix
|
||||
transcodedContentType = child.transcodedContentType
|
||||
transcodedSuffix = child.transcodedSuffix
|
||||
duration = child.duration
|
||||
bitrate = child.bitrate
|
||||
path = child.path
|
||||
isVideo = child.isVideo
|
||||
userRating = child.userRating
|
||||
averageRating = child.averageRating
|
||||
playCount = child.playCount
|
||||
discNumber = child.discNumber
|
||||
created = child.created
|
||||
starred = child.starred
|
||||
albumId = child.albumId
|
||||
artistId = child.artistId
|
||||
type = child.type
|
||||
bookmarkPosition = child.bookmarkPosition
|
||||
originalWidth = child.originalWidth
|
||||
originalHeight = child.originalHeight
|
||||
}
|
||||
}
|
||||
59
app/src/main/java/com/cappielloantonio/tempo/model/Queue.kt
Normal file
59
app/src/main/java/com/cappielloantonio/tempo/model/Queue.kt
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
package com.cappielloantonio.tempo.model
|
||||
|
||||
import androidx.annotation.Keep
|
||||
import androidx.room.ColumnInfo
|
||||
import androidx.room.Entity
|
||||
import androidx.room.PrimaryKey
|
||||
import com.cappielloantonio.tempo.subsonic.models.Child
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
@Keep
|
||||
@Parcelize
|
||||
@Entity(tableName = "queue")
|
||||
class Queue(override val id: String) : Child(id) {
|
||||
@PrimaryKey
|
||||
@ColumnInfo(name = "track_order")
|
||||
var trackOrder: Int = 0
|
||||
|
||||
@ColumnInfo(name = "last_play")
|
||||
var lastPlay: Long = 0
|
||||
|
||||
@ColumnInfo(name = "playing_changed")
|
||||
var playingChanged: Long = 0
|
||||
|
||||
@ColumnInfo(name = "stream_id")
|
||||
var streamId: String? = null
|
||||
|
||||
constructor(child: Child) : this(child.id) {
|
||||
parentId = child.parentId
|
||||
isDir = child.isDir
|
||||
title = child.title
|
||||
album = child.album
|
||||
artist = child.artist
|
||||
track = child.track
|
||||
year = child.year
|
||||
genre = child.genre
|
||||
coverArtId = child.coverArtId
|
||||
size = child.size
|
||||
contentType = child.contentType
|
||||
suffix = child.suffix
|
||||
transcodedContentType = child.transcodedContentType
|
||||
transcodedSuffix = child.transcodedSuffix
|
||||
duration = child.duration
|
||||
bitrate = child.bitrate
|
||||
path = child.path
|
||||
isVideo = child.isVideo
|
||||
userRating = child.userRating
|
||||
averageRating = child.averageRating
|
||||
playCount = child.playCount
|
||||
discNumber = child.discNumber
|
||||
created = child.created
|
||||
starred = child.starred
|
||||
albumId = child.albumId
|
||||
artistId = child.artistId
|
||||
type = child.type
|
||||
bookmarkPosition = child.bookmarkPosition
|
||||
originalWidth = child.originalWidth
|
||||
originalHeight = child.originalHeight
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.cappielloantonio.tempo.model
|
||||
|
||||
import android.os.Parcelable
|
||||
import androidx.annotation.Keep
|
||||
import androidx.room.ColumnInfo
|
||||
import androidx.room.Entity
|
||||
import androidx.room.PrimaryKey
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
@Keep
|
||||
@Parcelize
|
||||
@Entity(tableName = "recent_search")
|
||||
data class RecentSearch(
|
||||
@PrimaryKey
|
||||
@ColumnInfo(name = "search")
|
||||
var search: String
|
||||
) : Parcelable
|
||||
35
app/src/main/java/com/cappielloantonio/tempo/model/Server.kt
Normal file
35
app/src/main/java/com/cappielloantonio/tempo/model/Server.kt
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
package com.cappielloantonio.tempo.model
|
||||
|
||||
import android.os.Parcelable
|
||||
import androidx.annotation.Keep
|
||||
import androidx.room.ColumnInfo
|
||||
import androidx.room.Entity
|
||||
import androidx.room.PrimaryKey
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
@Keep
|
||||
@Parcelize
|
||||
@Entity(tableName = "server")
|
||||
data class Server(
|
||||
@PrimaryKey
|
||||
@ColumnInfo(name = "id")
|
||||
val serverId: String,
|
||||
|
||||
@ColumnInfo(name = "server_name")
|
||||
val serverName: String,
|
||||
|
||||
@ColumnInfo(name = "username")
|
||||
val username: String,
|
||||
|
||||
@ColumnInfo(name = "password")
|
||||
val password: String,
|
||||
|
||||
@ColumnInfo(name = "address")
|
||||
val address: String,
|
||||
|
||||
@ColumnInfo(name = "timestamp")
|
||||
val timestamp: Long,
|
||||
|
||||
@ColumnInfo(name = "low_security", defaultValue = "false")
|
||||
val isLowSecurity: Boolean
|
||||
) : Parcelable
|
||||
Loading…
Add table
Add a link
Reference in a new issue