refact: unify torrent error messages (#1655)

This commit is contained in:
int3debug
2025-04-10 19:45:16 +02:00
committed by GitHub
parent adb4315eb2
commit 97f33c6b6e
2 changed files with 5 additions and 3 deletions

View File

@ -1576,7 +1576,8 @@ class CS3IPlayer : IPlayer {
DialogInterface.BUTTON_NEGATIVE -> {
Torrent.hasAcceptedTorrentForThisSession = false
event(ErrorEvent(ErrorLoadingException("Not accepted torrent")))
val errorMessage = context.getString(R.string.torrent_not_accepted)
event(ErrorEvent(ErrorLoadingException(errorMessage)))
}
}
}
@ -1585,7 +1586,8 @@ class CS3IPlayer : IPlayer {
.setMessage(R.string.torrent_info)
// Ensure that the user will not accidentally start a torrent session.
.setCancelable(false).setOnCancelListener {
event(ErrorEvent(ErrorLoadingException("Not accepted torrent")))
val errorMessage = context.getString(R.string.torrent_not_accepted)
event(ErrorEvent(ErrorLoadingException(errorMessage)))
}
.setPositiveButton(R.string.ok, dialogClickListener)
.setNegativeButton(R.string.go_back, dialogClickListener)

View File

@ -837,7 +837,7 @@
<string name="dont_show">Don\'t Show</string>
<string name="subs_edge_size">Edge Size</string>
<string name="torrent_preferred_media">Enable torrent in Settings/Providers/Preferred media</string>
<string name="torrent_not_accepted">Not accepted torrent</string>
<string name="torrent_not_accepted">Restart app and accept Stream Torrent pop-up to proceed.</string>
<string name="software_decoding_key" translatable="false">software_decoding_key2</string>
<string name="software_decoding">Software decoding</string>
<string name="software_decoding_desc">Software decoding enables the player to play video files not supported by your phone, but may cause laggy or unstable playback on high resolution</string>