diff --git a/common/src/main/java/de/nicidienase/chaosflix/common/eventimport/FahrplanLecture.kt b/common/src/main/java/de/nicidienase/chaosflix/common/eventimport/FahrplanLecture.kt index de7ba99f..496118f5 100644 --- a/common/src/main/java/de/nicidienase/chaosflix/common/eventimport/FahrplanLecture.kt +++ b/common/src/main/java/de/nicidienase/chaosflix/common/eventimport/FahrplanLecture.kt @@ -1,35 +1,10 @@ package de.nicidienase.chaosflix.common.eventimport -import com.google.gson.annotations.SerializedName - data class FahrplanLecture( - var lectureId: String = "", + var lectureId: String? = null, var title: String, - var subtitle: String = "", - var day: Int = 0, - var room: String? = null, - var slug: String? = null, - var url: String? = null, - var startTime: Int = 0, - var duration: Int = 0, - var speakers: String? = null, - var track: String? = null, - var type: String? = null, - var lang: String? = null, - @SerializedName("abstractt") - var abstract: String = "", - var description: String = "", - var relStartTime: Int = 0, + var subtitle: String? = null, var links: String? = null, - var date: String? = null, - var dateUTC: Long = 0, - var roomIndex: Int = 0, - var recordingLicense: String? = null, - var recordingOptOut: Boolean = false -) { - - companion object { - val RECORDING_OPTOUT_ON = true - val RECORDING_OPTOUT_OFF = false - } -} + var track: String? = null, + var description: String? = null +) \ No newline at end of file diff --git a/common/src/main/java/de/nicidienase/chaosflix/common/viewmodel/FavoritesImportViewModel.kt b/common/src/main/java/de/nicidienase/chaosflix/common/viewmodel/FavoritesImportViewModel.kt index 2198c0ae..08da012a 100644 --- a/common/src/main/java/de/nicidienase/chaosflix/common/viewmodel/FavoritesImportViewModel.kt +++ b/common/src/main/java/de/nicidienase/chaosflix/common/viewmodel/FavoritesImportViewModel.kt @@ -60,16 +60,16 @@ class FavoritesImportViewModel( } } - private suspend fun updateConferences(conference: String) { + private suspend fun updateConferences(conferenceName: String) { val fahrplanMappings = mappingService.getFahrplanMappings() - Log.d(TAG, "Updating conferences for $conference, mappings=$fahrplanMappings") - if (fahrplanMappings.containsKey(conference)) { - fahrplanMappings[conference]?.let { keys -> - for (conf in keys) { - conferenceDao.findConferenceByAcronymSync(conf)?.let { conf -> + Log.d(TAG, "Updating conferences for $conferenceName, mappings=$fahrplanMappings") + if (fahrplanMappings.containsKey(conferenceName)) { + fahrplanMappings[conferenceName]?.let { keys -> + for (conferenceAcronym in keys) { + conferenceDao.findConferenceByAcronymSync(conferenceAcronym)?.let { conference -> val list = - downloader.updateEventsForConferencesSuspending(conf) - Log.d(TAG, "updated ${conf.acronym}, got ${list.size} events") + downloader.updateEventsForConferencesSuspending(conference) + Log.d(TAG, "updated ${conference.acronym}, got ${list.size} events") } } }