Commit 5a550081 authored by Nicolas Pomepuy's avatar Nicolas Pomepuy

Remove dead code

parent 95171022
......@@ -192,7 +192,6 @@ const val CTX_STOP_AFTER_THIS = 1L shl 18
const val CTX_RENAME = 1L shl 19
const val CTX_AUDIO_TRACK = 1L shl 20
const val CTX_SUBS_TRACK = 1L shl 21
const val CTX_PICK_SUBS = 1L shl 22
const val CTX_VIDEO_TRACK = 1L shl 23
const val CTX_DOWNLOAD_SUBTITLES_PLAYER = 1L shl 24
const val CTX_ADD_SCANNED = 1L shl 25
......
......@@ -91,7 +91,6 @@
<attr name="ic_chapter_normal_style" format="reference" />
<attr name="ic_equalizer_normal_style" format="reference" />
<attr name="ic_audiodelay" format="reference" />
<attr name="ic_subtitledelay" format="reference" />
<attr name="ic_playasaudio_off" format="reference" />
<attr name="ic_playasaudio_on" format="reference" />
<attr name="ic_popup_expand" format="reference" />
......
......@@ -100,7 +100,6 @@
<item name="ic_chapter_normal_style">@drawable/ic_chapter</item>
<item name="ic_equalizer_normal_style">@drawable/ic_equalizer</item>
<item name="ic_audiodelay">@drawable/ic_audiodelay</item>
<item name="ic_subtitledelay">@drawable/ic_subtitledelay</item>
<item name="ic_passthrough">@drawable/ic_passthrough</item>
<item name="ic_abrepeat">@drawable/ic_abrepeat</item>
<item name="ic_abrepeat_reset">@drawable/ic_abrepeat_reset</item>
......@@ -235,7 +234,6 @@
<item name="ic_chapter_normal_style">@drawable/ic_chapter_w</item>
<item name="ic_equalizer_normal_style">@drawable/ic_equalizer_w</item>
<item name="ic_audiodelay">@drawable/ic_audiodelay_w</item>
<item name="ic_subtitledelay">@drawable/ic_subtitledelay_w</item>
<item name="ic_passthrough">@drawable/ic_passthrough_w</item>
<item name="ic_abrepeat">@drawable/ic_abrepeat</item>
<item name="ic_abrepeat_reset">@drawable/ic_abrepeat_reset</item>
......@@ -410,7 +408,6 @@
<item name="ic_chapter_normal_style">@drawable/ic_chapter_w</item>
<item name="ic_equalizer_normal_style">@drawable/ic_equalizer_w</item>
<item name="ic_audiodelay">@drawable/ic_audiodelay_w</item>
<item name="ic_subtitledelay">@drawable/ic_subtitledelay_w</item>
<item name="ic_passthrough">@drawable/ic_passthrough_w</item>
<item name="ic_trash">@drawable/ic_trash_w</item>
<item name="ic_reset">@drawable/ic_reset_w</item>
......
......@@ -94,7 +94,18 @@ class ContextSheet : VLCBottomSheetDialogFragment() {
if (flags and CTX_VIDEO_TRACK != 0L) add(Simple(CTX_VIDEO_TRACK, getString(R.string.ctx_player_video_track), R.drawable.ic_ctx_information))
if (flags and CTX_AUDIO_TRACK != 0L) add(Simple(CTX_AUDIO_TRACK, getString(R.string.ctx_player_audio_track), R.drawable.ic_audiotrack_normal))
if (flags and CTX_SUBS_TRACK != 0L) add(Simple(CTX_SUBS_TRACK, getString(R.string.ctx_player_subs_track), R.drawable.ic_subtitle_w))
if (flags and CTX_PICK_SUBS != 0L) add(Simple(CTX_PICK_SUBS, getString(R.string.subtitle_select), R.drawable.ic_subtitle_open_w))
if (flags and CTX_APPEND != 0L) add(Simple(CTX_APPEND, getString(R.string.append), R.drawable.ic_ctx_append))
if (flags and CTX_INFORMATION != 0L) add(Simple(CTX_INFORMATION, getString(R.string.info), R.drawable.ic_ctx_information))
if (flags and CTX_DOWNLOAD_SUBTITLES != 0L) add(Simple(CTX_DOWNLOAD_SUBTITLES, getString(R.string.download_subtitles), R.drawable.ic_ctx_download_subtitles))
if (flags and CTX_DOWNLOAD_SUBTITLES_PLAYER != 0L) add(Simple(CTX_DOWNLOAD_SUBTITLES_PLAYER, getString(R.string.download_subtitles), R.drawable.ic_downsub_normal))
if (flags and CTX_PLAY_NEXT != 0L) add(Simple(CTX_PLAY_NEXT, getString(R.string.insert_next), R.drawable.ic_ctx_play_next))
if (flags and CTX_ADD_TO_PLAYLIST != 0L) add(Simple(CTX_ADD_TO_PLAYLIST, getString(R.string.add_to_playlist), R.drawable.ic_ctx_add_to_playlist))
if (flags and CTX_SET_RINGTONE != 0L && AndroidDevices.isPhone) add(Simple(CTX_SET_RINGTONE, getString(R.string.set_song), R.drawable.ic_ctx_set_ringtone))
if (flags and CTX_FAV_ADD != 0L) add(Simple(CTX_FAV_ADD, getString(R.string.favorites_add), R.drawable.ic_ctx_fav_add))
if (flags and CTX_ADD_SCANNED != 0L) add(Simple(CTX_ADD_SCANNED, getString(R.string.add_to_scanned), R.drawable.ic_ctx_addtoscan))
if (flags and CTX_FAV_EDIT != 0L) add(Simple(CTX_FAV_EDIT, getString(R.string.favorites_edit), R.drawable.ic_ctx_fav_edit))
if (flags and CTX_FAV_REMOVE != 0L) add(Simple(CTX_FAV_REMOVE, getString(R.string.favorites_remove), R.drawable.ic_ctx_fav_remove))
if (flags and CTX_REMOVE_FROM_PLAYLIST != 0L) add(Simple(CTX_REMOVE_FROM_PLAYLIST, getString(R.string.remove), R.drawable.ic_ctx_remove_from_playlist))
if (flags and CTX_APPEND != 0L) add(Simple(CTX_APPEND, getString(R.string.append), R.drawable.ic_ctx_append))
if (flags and CTX_INFORMATION != 0L) add(Simple(CTX_INFORMATION, getString(R.string.info), R.drawable.ic_ctx_information))
if (flags and CTX_DOWNLOAD_SUBTITLES != 0L) add(Simple(CTX_DOWNLOAD_SUBTITLES, getString(R.string.download_subtitles), R.drawable.ic_ctx_download_subtitles))
......
......@@ -47,7 +47,6 @@ private const val ID_PLAY_AS_AUDIO = 0L
private const val ID_SLEEP = 1L
private const val ID_JUMP_TO = 2L
private const val ID_AUDIO_DELAY = 3L
private const val ID_SPU_DELAY = 4L
private const val ID_CHAPTER_TITLE = 5L
private const val ID_PLAYBACK_SPEED = 6L
private const val ID_EQUALIZER = 7L
......@@ -312,17 +311,6 @@ class PlayerOptionsDelegate(val activity: AppCompatActivity, val service: Playba
}
}
private fun initSpuDelay(binding: PlayerOptionItemBinding) {
val spudelay = service.spuDelay / 1000L
if (spudelay == 0L) {
binding.optionTitle.text = null
binding.optionIcon.setImageResource(UiTools.getResourceFromAttribute(activity, R.attr.ic_subtitledelay))
} else {
binding.optionTitle.text = String.format("%s ms", spudelay.toString())
binding.optionIcon.setImageResource(R.drawable.ic_subtitledelay_on)
}
}
private fun initRepeat(binding: PlayerOptionItemBinding) {
repeatBinding = binding
AppScope.launch(Dispatchers.Main) {
......@@ -370,7 +358,6 @@ class PlayerOptionsDelegate(val activity: AppCompatActivity, val service: Playba
option.id == ID_PLAYBACK_SPEED -> initPlaybackSpeed(holder.binding)
option.id == ID_AUDIO_DELAY -> initAudioDelay(holder.binding)
option.id == ID_JUMP_TO -> initJumpTo(holder.binding)
option.id == ID_SPU_DELAY -> initSpuDelay(holder.binding)
}
holder.binding.optionIcon.setImageResource(UiTools.getResourceFromAttribute(activity, option.icon))
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment