mirror of
https://github.com/NiciDieNase/chaosflix
synced 2024-11-23 04:43:07 +00:00
start integrating 2.0.0 into touch
This commit is contained in:
parent
76a2a204a8
commit
c85903757d
8 changed files with 23 additions and 22 deletions
10
build.gradle
10
build.gradle
|
@ -1,6 +1,6 @@
|
|||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.2.50'
|
||||
ext.kotlin_version = '1.2.61'
|
||||
repositories {
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
|
@ -29,14 +29,14 @@ allprojects {
|
|||
|
||||
ext{
|
||||
minSDK = 17
|
||||
targetSDK = 27
|
||||
compileSdkVersion = 27
|
||||
buildToolsVersion = "27.0.3"
|
||||
targetSDK = 28
|
||||
compileSdkVersion = 28
|
||||
buildToolsVersion = "28.0.2"
|
||||
supportLibraryVersion = "27.1.1"
|
||||
constraintLayoutVersion = "1.0.2"
|
||||
archCompVersion = "1.1.1"
|
||||
|
||||
version="2.0.0-SNAPSHOT"
|
||||
version="2.0.1-SNAPSHOT"
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
|
|
|
@ -42,10 +42,8 @@ dependencies {
|
|||
api "android.arch.lifecycle:common-java8:1.1.1"
|
||||
|
||||
api "android.arch.persistence.room:runtime:${rootProject.ext.archCompVersion}"
|
||||
api "android.arch.persistence.room:rxjava2:${rootProject.ext.archCompVersion}"
|
||||
kapt "android.arch.persistence.room:compiler:${rootProject.ext.archCompVersion}"
|
||||
|
||||
|
||||
api 'com.squareup.retrofit2:retrofit:2.3.0'
|
||||
api 'com.squareup.retrofit2:converter-gson:2.3.0'
|
||||
|
||||
|
@ -56,7 +54,7 @@ dependencies {
|
|||
androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.1', {
|
||||
exclude group: 'com.android.support', module: 'support-annotations'
|
||||
})
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
|
||||
}
|
||||
repositories {
|
||||
|
|
|
@ -74,7 +74,7 @@ abstract class ChaosflixDatabase : RoomDatabase() {
|
|||
|
||||
val migration_4_5 = object : Migration(4,5){
|
||||
override fun migrate(database: SupportSQLiteDatabase) {
|
||||
TODO("not implemented")
|
||||
// TODO("not implemented")
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -18,6 +18,9 @@ interface EventDao: PersistentItemDao<PersistentEvent> {
|
|||
@Query("SELECT * FROM event WHERE id = :id ORDER BY title ASC")
|
||||
fun findEventById(id: Long): LiveData<PersistentEvent>
|
||||
|
||||
@Query("SELECT * FROM event WHERE guid = :guid LIMIT 1")
|
||||
fun findEventByGuid(guid: String): LiveData<PersistentEvent>
|
||||
|
||||
@Query("SELECT * FROM event WHERE id in (:ids)")
|
||||
fun findEventsByIds(ids: LongArray): LiveData<List<PersistentEvent>>
|
||||
|
||||
|
@ -30,7 +33,7 @@ interface EventDao: PersistentItemDao<PersistentEvent> {
|
|||
@Query("SELECT * FROM event WHERE conferenceId = :id ORDER BY title ASC")
|
||||
fun findEventsByConferenceSync(id: Long):List<PersistentEvent>
|
||||
|
||||
@Query("SELECT * FROM event INNER JOIN watchlist_item WHERE event.id = watchlist_item.event_id")
|
||||
@Query("SELECT * FROM event INNER JOIN watchlist_item WHERE event.guid = watchlist_item.event_guid")
|
||||
fun findBookmarkedEvents(): LiveData<List<PersistentEvent>>
|
||||
|
||||
@Query("SELECT * FROM event INNER JOIN playback_progress WHERE event.id = playback_progress.event_id")
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package de.nicidienase.chaosflix.common.mediadata.network
|
||||
|
||||
import de.nicidienase.chaosflix.common.mediadata.entities.streaming.LiveConference
|
||||
import io.reactivex.Single
|
||||
import retrofit2.Call
|
||||
import retrofit2.http.GET
|
||||
|
||||
interface StreamingService {
|
||||
|
||||
@GET("streams/v2.json")
|
||||
fun getStreamingConferences(): Single<List<LiveConference>>
|
||||
fun getStreamingConferences(): Call<List<LiveConference>>
|
||||
}
|
||||
|
|
|
@ -12,16 +12,16 @@ interface OfflineEventDao{
|
|||
fun insert(vararg items: OfflineEvent)
|
||||
|
||||
@Query("SELECT * FROM offline_event WHERE event_guid = :guid LIMIT 1")
|
||||
fun getByEventId(guid: String): LiveData<OfflineEvent>
|
||||
fun getByEventGuid(guid: String): LiveData<OfflineEvent>
|
||||
|
||||
@Query("SELECT * FROM offline_event WHERE event_guid = :guid LIMIT 1")
|
||||
fun getByEventIdSynchronous(guid: String): OfflineEvent
|
||||
fun getByEventGuidSynchronous(guid: String): OfflineEvent?
|
||||
|
||||
@Query("SELECT * FROM offline_event WHERE download_reference = :ref LIMIT 1")
|
||||
fun getByDownloadReference(ref: Long): LiveData<OfflineEvent>
|
||||
|
||||
@Query("SELECT * FROM offline_event WHERE download_reference = :ref LIMIT 1")
|
||||
fun getByDownloadReferenceSyncrounous(ref: Long): OfflineEvent
|
||||
fun getByDownloadReferenceSyncrounous(ref: Long): OfflineEvent?
|
||||
|
||||
@Query("SELECT * FROM offline_event")
|
||||
fun getAll(): LiveData<List<OfflineEvent>>
|
||||
|
|
|
@ -6,8 +6,8 @@ import android.arch.persistence.room.Index
|
|||
import android.arch.persistence.room.PrimaryKey
|
||||
|
||||
@Entity(tableName = "watchlist_item",
|
||||
indices = arrayOf(Index(value = ["event_id"],unique = true)))
|
||||
indices = arrayOf(Index(value = ["event_guid"], unique = true)))
|
||||
data class WatchlistItem(@PrimaryKey(autoGenerate = true)
|
||||
var id: Long = 0,
|
||||
@ColumnInfo(name = "event_id")
|
||||
var eventId: Long)
|
||||
@ColumnInfo(name = "event_guid")
|
||||
var eventGuid: String)
|
||||
|
|
|
@ -9,8 +9,8 @@ interface WatchlistItemDao {
|
|||
@Query("SELECT * from watchlist_item")
|
||||
fun getAll(): LiveData<List<WatchlistItem>>
|
||||
|
||||
@Query("SELECT * from watchlist_item WHERE event_id = :id LIMIT 1")
|
||||
fun getItemForEvent(id: Long): LiveData<WatchlistItem>
|
||||
@Query("SELECT * from watchlist_item WHERE event_guid = :guid LIMIT 1")
|
||||
fun getItemForEvent(guid: String): LiveData<WatchlistItem>
|
||||
|
||||
@Insert(onConflict = OnConflictStrategy.REPLACE)
|
||||
fun saveItem(item: WatchlistItem)
|
||||
|
@ -18,6 +18,6 @@ interface WatchlistItemDao {
|
|||
@Delete
|
||||
fun deleteItem(item: WatchlistItem)
|
||||
|
||||
@Query("DELETE from watchlist_item WHERE event_id = :id")
|
||||
fun deleteItem(id: Long)
|
||||
@Query("DELETE from watchlist_item WHERE event_guid = :guid")
|
||||
fun deleteItem(guid: String)
|
||||
}
|
Loading…
Reference in a new issue