Skip to content

Commit

Permalink
Feat 1.14.0 rc04 widget favourite (#193)
Browse files Browse the repository at this point in the history
* feat: update favourite widget style.

* bugfix: maybe read empty kodi user-agent from channel url.

---------

Co-authored-by: oxy-windows <[email protected]>
  • Loading branch information
oxyroid and oxy-windows authored Sep 15, 2024
1 parent a33c5dc commit 6a49b60
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
9 changes: 9 additions & 0 deletions androidApp/src/main/res/xml-v31/widget_info.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
android:initialLayout="@layout/glance_default_loading_layout"
android:minWidth="240dp"
android:previewImage="@drawable/baseline_history_toggle_off_24"
android:resizeMode="vertical"
android:targetCellWidth="4"
android:targetCellHeight="2"
android:widgetCategory="home_screen"
android:widgetFeatures="reconfigurable|configuration_optional" />
10 changes: 4 additions & 6 deletions androidApp/src/main/res/xml/widget_info.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
android:initialLayout="@layout/glance_default_loading_layout"
android:targetCellWidth="2"
android:targetCellHeight="1"
android:resizeMode="horizontal|vertical"
android:widgetCategory="home_screen"
android:widgetFeatures="reconfigurable|configuration_optional">
</appwidget-provider>
android:minWidth="240dp"
android:previewImage="@drawable/baseline_history_toggle_off_24"
android:resizeMode="vertical"
android:widgetCategory="home_screen" />
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ import androidx.media3.exoplayer.trackselection.TrackSelector
import androidx.media3.extractor.DefaultExtractorsFactory
import androidx.media3.extractor.ts.DefaultTsPayloadReaderFactory.FLAG_ALLOW_NON_IDR_KEYFRAMES
import androidx.media3.extractor.ts.DefaultTsPayloadReaderFactory.FLAG_DETECT_ACCESS_UNITS
import androidx.media3.extractor.ts.DefaultTsPayloadReaderFactory.FLAG_ENABLE_HDMV_DTS_AUDIO_STREAMS
import androidx.media3.session.MediaSession
import com.m3u.codec.Codecs
import com.m3u.core.architecture.dispatcher.Dispatcher
Expand Down Expand Up @@ -513,14 +512,14 @@ class PlayerManagerImpl @Inject constructor(
*
* https://kodi.wiki/view/HTTP
*/
private fun String.readKodiUrlOptions(): Map<String, String> {
private fun String.readKodiUrlOptions(): Map<String, String?> {
val options = this.drop(this.indexOf("|") + 1).split("&")
return options
.filter { it.isNotBlank() }
.associate {
val pair = it.split("=")
val key = pair.getOrNull(0).orEmpty()
val value = pair.getOrNull(1).orEmpty()
val value = pair.getOrNull(1)
key to value
}
}
Expand Down

0 comments on commit 6a49b60

Please sign in to comment.