* feat: support dynamic metadata for internet radio stations
- Implemented `onMetadata` in `BaseMediaService` to extract "Artist - Title" info from ICY, ID3, and Vorbis streams.
- Added a fallback mechanism to periodically check HTTP headers (e.g., `icy-name`, `StreamTitle`) for radio metadata.
- Updated `PlayerControllerFragment` and `TrackInfoDialog` to display the station name alongside dynamic track information.
- Enhanced `TrackInfoDialog` layout to include a dedicated "Station" field for radio tracks.
- Modified `MappingUtil` to preserve station names in media metadata extras.
* fix crashing issue
* radio bob metadata works now. fix crashing issue
* Fixing unchecked operation warnings in SongHorizontalAdapter.java.
* optimizing a bit and better format for notification
* removed xml files affecting build and enviroment
* removed xml files affecting build and enviroment
* fix ui internet radio bottomview
* Revert "fix ui internet radio bottomview"
This reverts commit c237ed451f.
* rebased to upstream/development and fixed metadata to show up for radio after the rebase
* misc.xml restored
* Apply suggestion from @eddyizm
---------
Co-authored-by: eddyizm <wtfisup@hotmail.com>
Co-authored-by: eddyizm <eddyizm@gmail.com>
527 lines
19 KiB
XML
527 lines
19 KiB
XML
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginHorizontal="24dp"
|
|
android:orientation="vertical">
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="24dp">
|
|
|
|
<ImageView
|
|
android:id="@+id/track_cover_info_image_view"
|
|
android:layout_width="52dp"
|
|
android:layout_height="52dp"
|
|
android:layout_gravity="center"
|
|
android:layout_marginEnd="8dp"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintEnd_toStartOf="@+id/trak_title_info_text_view"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent" />
|
|
|
|
<TextView
|
|
android:id="@+id/trak_title_info_text_view"
|
|
style="@style/LabelMedium"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/label_placeholder"
|
|
app:layout_constraintBottom_toTopOf="@+id/trak_artist_info_text_view"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toEndOf="@+id/track_cover_info_image_view"
|
|
app:layout_constraintTop_toTopOf="@+id/track_cover_info_image_view"
|
|
app:layout_constraintVertical_chainStyle="packed" />
|
|
|
|
<TextView
|
|
android:id="@+id/trak_artist_info_text_view"
|
|
style="@style/LabelSmall"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/label_placeholder"
|
|
app:layout_constraintBottom_toBottomOf="@+id/track_cover_info_image_view"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="@+id/trak_title_info_text_view"
|
|
app:layout_constraintTop_toBottomOf="@+id/trak_title_info_text_view" />
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
<TextView
|
|
android:id="@+id/trak_transcoding_info_text_view"
|
|
style="@style/TitleMedium"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="16dp" />
|
|
|
|
<LinearLayout
|
|
android:id="@+id/title_info_sector"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="16dp">
|
|
|
|
<TextView
|
|
android:id="@+id/title_key_sector"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="4"
|
|
android:paddingEnd="8dp"
|
|
android:text="@string/track_info_title" />
|
|
|
|
<TextView
|
|
android:id="@+id/title_value_sector"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="7"
|
|
android:text="@string/label_placeholder" />
|
|
</LinearLayout>
|
|
|
|
<View
|
|
style="@style/Divider"
|
|
android:layout_gravity="center_vertical"
|
|
android:layout_marginVertical="8dp" />
|
|
|
|
<LinearLayout
|
|
android:id="@+id/album_info_sector"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content">
|
|
|
|
<TextView
|
|
android:id="@+id/album_key_sector"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="4"
|
|
android:paddingEnd="8dp"
|
|
android:text="@string/track_info_album" />
|
|
|
|
<TextView
|
|
android:id="@+id/album_value_sector"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="7"
|
|
android:text="@string/label_placeholder" />
|
|
</LinearLayout>
|
|
|
|
<View
|
|
style="@style/Divider"
|
|
android:layout_gravity="center_vertical"
|
|
android:layout_marginVertical="8dp" />
|
|
|
|
<LinearLayout
|
|
android:id="@+id/artist_info_sector"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content">
|
|
|
|
<TextView
|
|
android:id="@+id/artist_key_sector"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="4"
|
|
android:paddingEnd="8dp"
|
|
android:text="@string/track_info_artist" />
|
|
|
|
<TextView
|
|
android:id="@+id/artist_value_sector"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="7"
|
|
android:text="@string/label_placeholder" />
|
|
</LinearLayout>
|
|
|
|
<View
|
|
style="@style/Divider"
|
|
android:layout_gravity="center_vertical"
|
|
android:layout_marginVertical="8dp" />
|
|
|
|
<LinearLayout
|
|
android:id="@+id/station_info_sector"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:visibility="gone">
|
|
|
|
<TextView
|
|
android:id="@+id/station_key_sector"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="4"
|
|
android:paddingEnd="8dp"
|
|
android:text="@string/track_info_station" />
|
|
|
|
<TextView
|
|
android:id="@+id/station_value_sector"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="7"
|
|
android:text="@string/label_placeholder" />
|
|
</LinearLayout>
|
|
|
|
<View
|
|
style="@style/Divider"
|
|
android:layout_gravity="center_vertical"
|
|
android:layout_marginVertical="8dp" />
|
|
|
|
<LinearLayout
|
|
android:id="@+id/track_number_info_sector"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content">
|
|
|
|
<TextView
|
|
android:id="@+id/track_number_key_sector"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="4"
|
|
android:paddingEnd="8dp"
|
|
android:text="@string/track_info_track_number" />
|
|
|
|
<TextView
|
|
android:id="@+id/track_number_value_sector"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="7"
|
|
android:text="@string/label_placeholder" />
|
|
</LinearLayout>
|
|
|
|
<View
|
|
style="@style/Divider"
|
|
android:layout_gravity="center_vertical"
|
|
android:layout_marginVertical="8dp" />
|
|
|
|
<LinearLayout
|
|
android:id="@+id/year_info_sector"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content">
|
|
|
|
<TextView
|
|
android:id="@+id/year_key_sector"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="4"
|
|
android:paddingEnd="8dp"
|
|
android:text="@string/track_info_year" />
|
|
|
|
<TextView
|
|
android:id="@+id/year_value_sector"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="7"
|
|
android:text="@string/label_placeholder" />
|
|
</LinearLayout>
|
|
|
|
<View
|
|
style="@style/Divider"
|
|
android:layout_gravity="center_vertical"
|
|
android:layout_marginVertical="8dp" />
|
|
|
|
<LinearLayout
|
|
android:id="@+id/genre_info_sector"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content">
|
|
|
|
<TextView
|
|
android:id="@+id/genre_key_sector"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="4"
|
|
android:paddingEnd="8dp"
|
|
android:text="@string/track_info_genre" />
|
|
|
|
<TextView
|
|
android:id="@+id/genre_value_sector"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="7"
|
|
android:text="@string/label_placeholder" />
|
|
</LinearLayout>
|
|
|
|
<View
|
|
style="@style/Divider"
|
|
android:layout_gravity="center_vertical"
|
|
android:layout_marginVertical="8dp" />
|
|
|
|
<LinearLayout
|
|
android:id="@+id/size_info_sector"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content">
|
|
|
|
<TextView
|
|
android:id="@+id/size_key_sector"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="4"
|
|
android:paddingEnd="8dp"
|
|
android:text="@string/track_info_size" />
|
|
|
|
<TextView
|
|
android:id="@+id/size_value_sector"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="7"
|
|
android:text="@string/label_placeholder" />
|
|
</LinearLayout>
|
|
|
|
<View
|
|
style="@style/Divider"
|
|
android:layout_gravity="center_vertical"
|
|
android:layout_marginVertical="8dp" />
|
|
|
|
<LinearLayout
|
|
android:id="@+id/content_type_info_sector"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content">
|
|
|
|
<TextView
|
|
android:id="@+id/content_type_key_sector"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="4"
|
|
android:paddingEnd="8dp"
|
|
android:text="@string/track_info_content_type" />
|
|
|
|
<TextView
|
|
android:id="@+id/content_type_value_sector"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="7"
|
|
android:text="@string/label_placeholder" />
|
|
</LinearLayout>
|
|
|
|
<View
|
|
style="@style/Divider"
|
|
android:layout_gravity="center_vertical"
|
|
android:layout_marginVertical="8dp" />
|
|
|
|
<LinearLayout
|
|
android:id="@+id/suffix_info_sector"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content">
|
|
|
|
<TextView
|
|
android:id="@+id/suffix_key_sector"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="4"
|
|
android:paddingEnd="8dp"
|
|
android:text="@string/track_info_suffix" />
|
|
|
|
<TextView
|
|
android:id="@+id/suffix_value_sector"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="7"
|
|
android:text="@string/label_placeholder" />
|
|
</LinearLayout>
|
|
|
|
<View
|
|
style="@style/Divider"
|
|
android:layout_gravity="center_vertical"
|
|
android:layout_marginVertical="8dp" />
|
|
|
|
<LinearLayout
|
|
android:id="@+id/transcoded_content_type_info_sector"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content">
|
|
|
|
<TextView
|
|
android:id="@+id/transcoded_content_type_key_sector"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="4"
|
|
android:paddingEnd="8dp"
|
|
android:text="@string/track_info_transcoded_content_type" />
|
|
|
|
<TextView
|
|
android:id="@+id/transcoded_content_type_value_sector"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="7"
|
|
android:text="@string/label_placeholder" />
|
|
</LinearLayout>
|
|
|
|
<View
|
|
style="@style/Divider"
|
|
android:layout_gravity="center_vertical"
|
|
android:layout_marginVertical="8dp" />
|
|
|
|
<LinearLayout
|
|
android:id="@+id/transcoded_suffix_info_sector"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content">
|
|
|
|
<TextView
|
|
android:id="@+id/transcoded_suffix_key_sector"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="4"
|
|
android:paddingEnd="8dp"
|
|
android:text="@string/track_info_transcoded_suffix" />
|
|
|
|
<TextView
|
|
android:id="@+id/transcoded_suffix_value_sector"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="7"
|
|
android:text="@string/label_placeholder" />
|
|
</LinearLayout>
|
|
|
|
<View
|
|
style="@style/Divider"
|
|
android:layout_gravity="center_vertical"
|
|
android:layout_marginVertical="8dp" />
|
|
|
|
<LinearLayout
|
|
android:id="@+id/duration_info_sector"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content">
|
|
|
|
<TextView
|
|
android:id="@+id/duration_key_sector"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="4"
|
|
android:paddingEnd="8dp"
|
|
android:text="@string/track_info_duration" />
|
|
|
|
<TextView
|
|
android:id="@+id/duration_value_sector"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="7"
|
|
android:text="@string/label_placeholder" />
|
|
</LinearLayout>
|
|
|
|
<View
|
|
style="@style/Divider"
|
|
android:layout_gravity="center_vertical"
|
|
android:layout_marginVertical="8dp" />
|
|
|
|
<LinearLayout
|
|
android:id="@+id/bitrate_info_sector"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content">
|
|
|
|
<TextView
|
|
android:id="@+id/bitrate_key_sector"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="4"
|
|
android:paddingEnd="8dp"
|
|
android:text="@string/track_info_bitrate" />
|
|
|
|
<TextView
|
|
android:id="@+id/bitrate_value_sector"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="7"
|
|
android:text="@string/label_placeholder" />
|
|
</LinearLayout>
|
|
|
|
<View
|
|
style="@style/Divider"
|
|
android:layout_gravity="center_vertical"
|
|
android:layout_marginVertical="8dp" />
|
|
|
|
<LinearLayout
|
|
android:id="@+id/sampling_rate_info_sector"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content">
|
|
|
|
<TextView
|
|
android:id="@+id/sampling_rate_key_sector"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="4"
|
|
android:paddingEnd="8dp"
|
|
android:text="@string/track_info_sampling_rate" />
|
|
|
|
<TextView
|
|
android:id="@+id/sampling_rate_value_sector"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="7"
|
|
android:text="@string/label_placeholder" />
|
|
</LinearLayout>
|
|
|
|
<View
|
|
style="@style/Divider"
|
|
android:layout_gravity="center_vertical"
|
|
android:layout_marginVertical="8dp" />
|
|
|
|
<LinearLayout
|
|
android:id="@+id/bit_depth_info_sector"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content">
|
|
|
|
<TextView
|
|
android:id="@+id/bit_depth_key_sector"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="4"
|
|
android:paddingEnd="8dp"
|
|
android:text="@string/track_info_bit_depth" />
|
|
|
|
<TextView
|
|
android:id="@+id/bit_depth_value_sector"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="7"
|
|
android:text="@string/label_placeholder" />
|
|
</LinearLayout>
|
|
|
|
<View
|
|
style="@style/Divider"
|
|
android:layout_gravity="center_vertical"
|
|
android:layout_marginVertical="8dp" />
|
|
|
|
<LinearLayout
|
|
android:id="@+id/path_info_sector"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content">
|
|
|
|
<TextView
|
|
android:id="@+id/path_key_sector"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="4"
|
|
android:paddingEnd="8dp"
|
|
android:text="@string/track_info_path" />
|
|
|
|
<TextView
|
|
android:id="@+id/path_value_sector"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="7"
|
|
android:text="@string/label_placeholder" />
|
|
</LinearLayout>
|
|
|
|
<View
|
|
style="@style/Divider"
|
|
android:layout_gravity="center_vertical"
|
|
android:layout_marginVertical="8dp" />
|
|
|
|
<LinearLayout
|
|
android:id="@+id/disc_number_info_sector"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content">
|
|
|
|
<TextView
|
|
android:id="@+id/disc_number_key_sector"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="4"
|
|
android:paddingEnd="8dp"
|
|
android:text="@string/track_info_disc_number" />
|
|
|
|
<TextView
|
|
android:id="@+id/disc_number_value_sector"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="7"
|
|
android:text="@string/label_placeholder" />
|
|
</LinearLayout>
|
|
</LinearLayout>
|
|
</androidx.core.widget.NestedScrollView>
|
|
|