mirror of
				https://github.com/recloudstream/cloudstream.git
				synced 2024-08-15 01:53:11 +00:00 
			
		
		
		
	more lang stuff
This commit is contained in:
		
							parent
							
								
									0fada350f5
								
							
						
					
					
						commit
						e42f822d69
					
				
					 22 changed files with 144 additions and 50 deletions
				
			
		|  | @ -3,10 +3,11 @@ package com.lagradost.cloudstream3 | |||
| import android.app.Activity | ||||
| import android.app.PictureInPictureParams | ||||
| import android.content.ComponentName | ||||
| import android.content.Context | ||||
| import android.content.Intent | ||||
| import android.content.pm.PackageManager | ||||
| import android.content.res.ColorStateList | ||||
| import android.content.res.Configuration | ||||
| import android.content.res.Resources | ||||
| import android.os.Build | ||||
| import android.os.Bundle | ||||
| import android.view.* | ||||
|  | @ -22,6 +23,7 @@ import com.google.android.gms.cast.framework.CastButtonFactory | |||
| import com.jaredrummler.android.colorpicker.ColorPickerDialogListener | ||||
| import com.lagradost.cloudstream3.APIHolder.apis | ||||
| import com.lagradost.cloudstream3.APIHolder.restrictedApis | ||||
| import com.lagradost.cloudstream3.MainActivity.Companion.updateLocale | ||||
| import com.lagradost.cloudstream3.receivers.VideoDownloadRestartReceiver | ||||
| import com.lagradost.cloudstream3.ui.download.DOWNLOAD_NAVIGATE_TO | ||||
| import com.lagradost.cloudstream3.ui.download.DownloadChildFragment | ||||
|  | @ -114,15 +116,25 @@ class MainActivity : AppCompatActivity(), ColorPickerDialogListener { | |||
|             } | ||||
|         } | ||||
| 
 | ||||
|         fun setLocale(activity: Activity?, languageCode: String?) { | ||||
|             if (activity == null || languageCode == null) return | ||||
|         fun setLocale(context: Context?, languageCode: String?) { | ||||
|             if (context == null || languageCode == null) return | ||||
|             val locale = Locale(languageCode) | ||||
|             val resources: Resources = context.resources | ||||
|             val config = resources.configuration | ||||
|             Locale.setDefault(locale) | ||||
|             val resources = activity.resources | ||||
|             val config: Configuration = resources.configuration | ||||
|             config.setLocale(locale) | ||||
| 
 | ||||
|             if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) | ||||
|                 context.createConfigurationContext(config) | ||||
|             resources.updateConfiguration(config, resources.displayMetrics) | ||||
|         } | ||||
| 
 | ||||
|         fun Context.updateLocale() { | ||||
|             val settingsManager = PreferenceManager.getDefaultSharedPreferences(this) | ||||
|             val localeCode = settingsManager.getString(getString(R.string.locale_key), null) | ||||
|             println("LOCALE: " + localeCode) | ||||
|             setLocale(this, localeCode) | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     private fun enterPIPMode() { | ||||
|  | @ -174,13 +186,18 @@ class MainActivity : AppCompatActivity(), ColorPickerDialogListener { | |||
|                 .remove(currentFragment) | ||||
|                 .commitAllowingStateLoss() | ||||
|             backEvent.invoke(true) | ||||
|             this.updateLocale() | ||||
|             return true | ||||
|         } | ||||
|         backEvent.invoke(false) | ||||
|         this.updateLocale() | ||||
| 
 | ||||
|         return false | ||||
|     } | ||||
| 
 | ||||
|     override fun onBackPressed() { | ||||
|         this.updateLocale() | ||||
| 
 | ||||
|         if (backPressed()) return | ||||
|         super.onBackPressed() | ||||
|     } | ||||
|  | @ -238,11 +255,7 @@ class MainActivity : AppCompatActivity(), ColorPickerDialogListener { | |||
|             R.style.LoadedStyle, | ||||
|             true | ||||
|         ) // THEME IS SET BEFORE VIEW IS CREATED TO APPLY THE THEME TO THE MAIN VIEW | ||||
| 
 | ||||
|         val settingsManager = PreferenceManager.getDefaultSharedPreferences(this) | ||||
|         val localeCode = settingsManager.getString(getString(R.string.locale_key), null) | ||||
|         setLocale(this, localeCode) | ||||
| 
 | ||||
|         updateLocale() | ||||
|         super.onCreate(savedInstanceState) | ||||
| 
 | ||||
|         window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN) | ||||
|  |  | |||
|  | @ -2,8 +2,10 @@ package com.lagradost.cloudstream3.ui.download | |||
| 
 | ||||
| import android.app.Activity | ||||
| import android.content.DialogInterface | ||||
| import android.widget.Toast | ||||
| import androidx.appcompat.app.AlertDialog | ||||
| import androidx.fragment.app.FragmentActivity | ||||
| import com.lagradost.cloudstream3.MainActivity | ||||
| import com.lagradost.cloudstream3.R | ||||
| import com.lagradost.cloudstream3.ui.player.PlayerFragment | ||||
| import com.lagradost.cloudstream3.ui.player.UriData | ||||
|  | @ -62,6 +64,18 @@ object DownloadButtonSetup { | |||
|                     } | ||||
|                 } | ||||
|             } | ||||
|             DOWNLOAD_ACTION_LONG_CLICK -> { | ||||
|                 activity?.let { act -> | ||||
|                     val length = | ||||
|                         VideoDownloadManager.getDownloadFileInfoAndUpdateSettings(act, click.data.id)?.fileLength | ||||
|                             ?: 0 | ||||
|                     if(length > 0) { | ||||
|                         MainActivity.showToast(act, R.string.delete, Toast.LENGTH_LONG) | ||||
|                     } else { | ||||
|                         MainActivity.showToast(act, R.string.download, Toast.LENGTH_LONG) | ||||
|                     } | ||||
|                 } | ||||
|             } | ||||
|             DOWNLOAD_ACTION_PLAY_FILE -> { | ||||
|                 activity?.let { act -> | ||||
|                     val info = | ||||
|  |  | |||
|  | @ -21,6 +21,7 @@ const val DOWNLOAD_ACTION_DELETE_FILE = 1 | |||
| const val DOWNLOAD_ACTION_RESUME_DOWNLOAD = 2 | ||||
| const val DOWNLOAD_ACTION_PAUSE_DOWNLOAD = 3 | ||||
| const val DOWNLOAD_ACTION_DOWNLOAD = 4 | ||||
| const val DOWNLOAD_ACTION_LONG_CLICK = 5 | ||||
| 
 | ||||
| data class VisualDownloadChildCached( | ||||
|     val currentBytes: Long, | ||||
|  |  | |||
|  | @ -7,6 +7,7 @@ import android.view.ViewGroup | |||
| import androidx.fragment.app.Fragment | ||||
| import androidx.recyclerview.widget.GridLayoutManager | ||||
| import androidx.recyclerview.widget.RecyclerView | ||||
| import com.lagradost.cloudstream3.MainActivity.Companion.updateLocale | ||||
| import com.lagradost.cloudstream3.R | ||||
| import com.lagradost.cloudstream3.utils.UIHelper.fixPaddingStatusbar | ||||
| import com.lagradost.cloudstream3.ui.download.DownloadButtonSetup.handleDownloadClick | ||||
|  | @ -41,6 +42,8 @@ class DownloadChildFragment : Fragment() { | |||
|     } | ||||
| 
 | ||||
|     override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { | ||||
|         context?.updateLocale() | ||||
| 
 | ||||
|         return inflater.inflate(R.layout.fragment_child_downloads, container, false) | ||||
|     } | ||||
| 
 | ||||
|  |  | |||
|  | @ -10,6 +10,7 @@ import androidx.lifecycle.ViewModelProvider | |||
| import androidx.navigation.findNavController | ||||
| import androidx.recyclerview.widget.GridLayoutManager | ||||
| import androidx.recyclerview.widget.RecyclerView | ||||
| import com.lagradost.cloudstream3.MainActivity.Companion.updateLocale | ||||
| import com.lagradost.cloudstream3.R | ||||
| import com.lagradost.cloudstream3.isMovieType | ||||
| import com.lagradost.cloudstream3.mvvm.observe | ||||
|  | @ -60,6 +61,8 @@ class DownloadFragment : Fragment() { | |||
|         container: ViewGroup?, | ||||
|         savedInstanceState: Bundle? | ||||
|     ): View? { | ||||
|         context?.updateLocale() | ||||
| 
 | ||||
|         downloadsViewModel = | ||||
|             ViewModelProvider(this).get(DownloadViewModel::class.java) | ||||
|         observe(downloadsViewModel.noDownloadsText) { | ||||
|  |  | |||
|  | @ -81,15 +81,18 @@ class EasyDownloadButton : IDisposable { | |||
|                 when (state) { | ||||
|                     VideoDownloadManager.DownloadType.IsPaused -> Pair( | ||||
|                         R.drawable.ic_baseline_play_arrow_24, | ||||
|                         "Download Paused" | ||||
|                         R.string.download_paused | ||||
|                     ) | ||||
|                     VideoDownloadManager.DownloadType.IsDownloading -> Pair(R.drawable.netflix_pause, "Downloading") | ||||
|                     else -> Pair(R.drawable.ic_baseline_delete_outline_24, "Downloaded") | ||||
|                     VideoDownloadManager.DownloadType.IsDownloading -> Pair( | ||||
|                         R.drawable.netflix_pause, | ||||
|                         R.string.downloading | ||||
|                     ) | ||||
|                     else -> Pair(R.drawable.ic_baseline_delete_outline_24, R.string.downloaded) | ||||
|                 } | ||||
|             } else { | ||||
|                 Pair(R.drawable.netflix_download, "Download") | ||||
|                 Pair(R.drawable.netflix_download, R.string.download) | ||||
|             } | ||||
|             downloadImageChangeCallback.invoke(img) | ||||
|             downloadImageChangeCallback.invoke(Pair(img.first, downloadView.context.getString(img.second))) | ||||
|         } | ||||
| 
 | ||||
|         fun fixDownloadedBytes(setCurrentBytes: Long, setTotalBytes: Long, animate: Boolean) { | ||||
|  | @ -185,5 +188,10 @@ class EasyDownloadButton : IDisposable { | |||
|                 } | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|         downloadView.setOnLongClickListener { | ||||
|             clickCallback.invoke(DownloadClickEvent(DOWNLOAD_ACTION_LONG_CLICK, data)) | ||||
|             return@setOnLongClickListener true | ||||
|         } | ||||
|     } | ||||
| } | ||||
|  |  | |||
|  | @ -19,6 +19,7 @@ import com.google.android.material.bottomsheet.BottomSheetDialog | |||
| import com.lagradost.cloudstream3.* | ||||
| import com.lagradost.cloudstream3.APIHolder.apis | ||||
| import com.lagradost.cloudstream3.MainActivity.Companion.backEvent | ||||
| import com.lagradost.cloudstream3.MainActivity.Companion.updateLocale | ||||
| import com.lagradost.cloudstream3.mvvm.Resource | ||||
| import com.lagradost.cloudstream3.mvvm.observe | ||||
| import com.lagradost.cloudstream3.ui.AutofitRecyclerView | ||||
|  | @ -95,6 +96,8 @@ class HomeFragment : Fragment() { | |||
|         container: ViewGroup?, | ||||
|         savedInstanceState: Bundle? | ||||
|     ): View? { | ||||
|         context?.updateLocale() | ||||
| 
 | ||||
|         homeViewModel = | ||||
|             ViewModelProvider(this).get(HomeViewModel::class.java) | ||||
| 
 | ||||
|  |  | |||
|  | @ -68,6 +68,7 @@ import com.lagradost.cloudstream3.* | |||
| import com.lagradost.cloudstream3.MainActivity.Companion.canEnterPipMode | ||||
| import com.lagradost.cloudstream3.MainActivity.Companion.isInPIPMode | ||||
| import com.lagradost.cloudstream3.MainActivity.Companion.showToast | ||||
| import com.lagradost.cloudstream3.MainActivity.Companion.updateLocale | ||||
| import com.lagradost.cloudstream3.R | ||||
| import com.lagradost.cloudstream3.mvvm.Resource | ||||
| import com.lagradost.cloudstream3.mvvm.normalSafeApiCall | ||||
|  | @ -948,6 +949,8 @@ class PlayerFragment : Fragment() { | |||
|     override fun onViewCreated(view: View, savedInstanceState: Bundle?) { | ||||
|         super.onViewCreated(view, savedInstanceState) | ||||
|         context?.let { ctx -> | ||||
|             ctx.updateLocale() | ||||
| 
 | ||||
|             setPreferredSubLanguage(ctx.getAutoSelectLanguageISO639_1()) | ||||
|         } | ||||
| 
 | ||||
|  | @ -2045,6 +2048,8 @@ class PlayerFragment : Fragment() { | |||
|     } | ||||
| 
 | ||||
|     override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { | ||||
|         context?.updateLocale() | ||||
| 
 | ||||
|         return inflater.inflate(R.layout.fragment_player, container, false) | ||||
|     } | ||||
| } | ||||
|  | @ -32,6 +32,7 @@ import com.lagradost.cloudstream3.* | |||
| import com.lagradost.cloudstream3.APIHolder.getApiFromName | ||||
| import com.lagradost.cloudstream3.APIHolder.getId | ||||
| import com.lagradost.cloudstream3.MainActivity.Companion.showToast | ||||
| import com.lagradost.cloudstream3.MainActivity.Companion.updateLocale | ||||
| import com.lagradost.cloudstream3.mvvm.Resource | ||||
| import com.lagradost.cloudstream3.mvvm.observe | ||||
| import com.lagradost.cloudstream3.ui.WatchType | ||||
|  | @ -168,6 +169,8 @@ class ResultFragment : Fragment() { | |||
|         container: ViewGroup?, | ||||
|         savedInstanceState: Bundle?, | ||||
|     ): View? { | ||||
|         context?.updateLocale() | ||||
| 
 | ||||
|         viewModel = | ||||
|             ViewModelProvider(activity ?: this).get(ResultViewModel::class.java) | ||||
|         return inflater.inflate(R.layout.fragment_result, container, false) | ||||
|  |  | |||
|  | @ -21,6 +21,7 @@ import com.lagradost.cloudstream3.APIHolder.apis | |||
| import com.lagradost.cloudstream3.APIHolder.getApiSettings | ||||
| import com.lagradost.cloudstream3.APIHolder.getApiTypeSettings | ||||
| import com.lagradost.cloudstream3.HomePageList | ||||
| import com.lagradost.cloudstream3.MainActivity.Companion.updateLocale | ||||
| import com.lagradost.cloudstream3.R | ||||
| import com.lagradost.cloudstream3.TvType | ||||
| import com.lagradost.cloudstream3.mvvm.Resource | ||||
|  | @ -47,6 +48,8 @@ class SearchFragment : Fragment() { | |||
|         container: ViewGroup?, | ||||
|         savedInstanceState: Bundle?, | ||||
|     ): View? { | ||||
|         context?.updateLocale() | ||||
| 
 | ||||
|         searchViewModel = | ||||
|             ViewModelProvider(this).get(SearchViewModel::class.java) | ||||
|         activity?.window?.setSoftInputMode( | ||||
|  |  | |||
|  | @ -7,6 +7,7 @@ import androidx.preference.PreferenceFragmentCompat | |||
| import androidx.preference.PreferenceManager | ||||
| import com.lagradost.cloudstream3.MainActivity.Companion.setLocale | ||||
| import com.lagradost.cloudstream3.MainActivity.Companion.showToast | ||||
| import com.lagradost.cloudstream3.MainActivity.Companion.updateLocale | ||||
| import com.lagradost.cloudstream3.R | ||||
| import com.lagradost.cloudstream3.mvvm.logError | ||||
| import com.lagradost.cloudstream3.ui.subtitles.SubtitlesFragment | ||||
|  | @ -20,6 +21,7 @@ class SettingsFragment : PreferenceFragmentCompat() { | |||
|     var count = 0 | ||||
| 
 | ||||
|     override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { | ||||
|         context?.updateLocale() | ||||
|         hideKeyboard() | ||||
|         setPreferencesFromResource(R.xml.settings, rootKey) | ||||
|         val updatePreference = findPreference<Preference>(getString(R.string.manual_check_update_key))!! | ||||
|  |  | |||
|  | @ -22,6 +22,7 @@ import com.google.android.exoplayer2.ui.CaptionStyleCompat | |||
| import com.jaredrummler.android.colorpicker.ColorPickerDialog | ||||
| import com.lagradost.cloudstream3.MainActivity | ||||
| import com.lagradost.cloudstream3.MainActivity.Companion.showToast | ||||
| import com.lagradost.cloudstream3.MainActivity.Companion.updateLocale | ||||
| import com.lagradost.cloudstream3.R | ||||
| import com.lagradost.cloudstream3.utils.DataStore.getKey | ||||
| import com.lagradost.cloudstream3.utils.DataStore.setKey | ||||
|  | @ -174,6 +175,7 @@ class SubtitlesFragment : Fragment() { | |||
|         container: ViewGroup?, | ||||
|         savedInstanceState: Bundle?, | ||||
|     ): View? { | ||||
|         context?.updateLocale() | ||||
|         return inflater.inflate(R.layout.subtitle_settings, container, false) | ||||
|     } | ||||
| 
 | ||||
|  |  | |||
|  | @ -9,7 +9,9 @@ import androidx.core.view.marginLeft | |||
| import androidx.core.view.marginRight | ||||
| import androidx.core.view.marginTop | ||||
| import com.google.android.material.bottomsheet.BottomSheetDialog | ||||
| import com.lagradost.cloudstream3.MainActivity.Companion.updateLocale | ||||
| import com.lagradost.cloudstream3.R | ||||
| import com.lagradost.cloudstream3.utils.SingleSelectionHelper.showDialog | ||||
| 
 | ||||
| object SingleSelectionHelper { | ||||
|     fun Context.showDialog( | ||||
|  | @ -22,6 +24,8 @@ object SingleSelectionHelper { | |||
|         callback: (List<Int>) -> Unit, | ||||
|         dismissCallback: () -> Unit | ||||
|     ) { | ||||
|         this.updateLocale() | ||||
| 
 | ||||
|         val realShowApply = showApply || isMultiSelect | ||||
|         val listView = dialog.findViewById<ListView>(R.id.listview1)!! | ||||
|         val textView = dialog.findViewById<TextView>(R.id.text1)!! | ||||
|  | @ -96,6 +100,8 @@ object SingleSelectionHelper { | |||
|         dismissCallback: () -> Unit, | ||||
|         callback: (List<Int>) -> Unit, | ||||
|     ) { | ||||
|         this.updateLocale() | ||||
| 
 | ||||
|         val builder = | ||||
|             AlertDialog.Builder(this, R.style.AlertDialogCustom).setView(R.layout.bottom_selection_dialog) | ||||
| 
 | ||||
|  | @ -112,6 +118,8 @@ object SingleSelectionHelper { | |||
|         dismissCallback: () -> Unit, | ||||
|         callback: (Int) -> Unit, | ||||
|     ) { | ||||
|         this.updateLocale() | ||||
| 
 | ||||
|         val builder = | ||||
|             AlertDialog.Builder(this, R.style.AlertDialogCustom).setView(R.layout.bottom_selection_dialog) | ||||
| 
 | ||||
|  | @ -137,6 +145,8 @@ object SingleSelectionHelper { | |||
|         dismissCallback: () -> Unit, | ||||
|         callback: (Int) -> Unit, | ||||
|     ) { | ||||
|         this.updateLocale() | ||||
| 
 | ||||
|         val builder = | ||||
|             BottomSheetDialog(this) | ||||
|         builder.setContentView(R.layout.bottom_selection_dialog) | ||||
|  |  | |||
|  | @ -263,12 +263,13 @@ object VideoDownloadManager { | |||
| 
 | ||||
|             val rowTwoExtra = if (ep.name != null) " - ${ep.name}\n" else "" | ||||
|             val rowTwo = if (ep.season != null && ep.episode != null) { | ||||
|                 "S${ep.season}:E${ep.episode}" + rowTwoExtra | ||||
|                 "${context.getString(R.string.season_short)}${ep.season}:${context.getString(R.string.episode_short)}${ep.episode}" + rowTwoExtra | ||||
|             } else if (ep.episode != null) { | ||||
|                 "Episode ${ep.episode}" + rowTwoExtra | ||||
|                 "${context.getString(R.string.episode)} ${ep.episode}" + rowTwoExtra | ||||
|             } else { | ||||
|                 (ep.name ?: "") + "" | ||||
|             } | ||||
|             val downloadFormat = context.getString(R.string.download_format) | ||||
| 
 | ||||
|             if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { | ||||
|                 if (ep.poster != null) { | ||||
|  | @ -282,16 +283,15 @@ object VideoDownloadManager { | |||
|                 val progressPercentage = progress * 100 / total | ||||
|                 val progressMbString = "%.1f".format(progress / 1000000f) | ||||
|                 val totalMbString = "%.1f".format(total / 1000000f) | ||||
| 
 | ||||
|                 val bigText = | ||||
|                     if (state == DownloadType.IsDownloading || state == DownloadType.IsPaused) { | ||||
|                         (if (linkName == null) "" else "$linkName\n") + "$rowTwo\n$progressPercentage % ($progressMbString MB/$totalMbString MB)" | ||||
|                     } else if (state == DownloadType.IsFailed) { | ||||
|                         "Download Failed - $rowTwo" | ||||
|                         downloadFormat.format(context.getString(R.string.download_failed), rowTwo) | ||||
|                     } else if (state == DownloadType.IsDone) { | ||||
|                         "Download Done - $rowTwo" | ||||
|                         downloadFormat.format(context.getString(R.string.download_done), rowTwo) | ||||
|                     } else { | ||||
|                         "Download Canceled - $rowTwo" | ||||
|                         downloadFormat.format(context.getString(R.string.download_canceled), rowTwo) | ||||
|                     } | ||||
| 
 | ||||
|                 val bodyStyle = NotificationCompat.BigTextStyle() | ||||
|  | @ -301,11 +301,11 @@ object VideoDownloadManager { | |||
|                 val txt = if (state == DownloadType.IsDownloading || state == DownloadType.IsPaused) { | ||||
|                     rowTwo | ||||
|                 } else if (state == DownloadType.IsFailed) { | ||||
|                     "Download Failed - $rowTwo" | ||||
|                     downloadFormat.format(context.getString(R.string.download_failed), rowTwo) | ||||
|                 } else if (state == DownloadType.IsDone) { | ||||
|                     "Download Done - $rowTwo" | ||||
|                     downloadFormat.format(context.getString(R.string.download_done), rowTwo) | ||||
|                 } else { | ||||
|                     "Download Canceled - $rowTwo" | ||||
|                     downloadFormat.format(context.getString(R.string.download_canceled), rowTwo) | ||||
|                 } | ||||
| 
 | ||||
|                 builder.setContentText(txt) | ||||
|  | @ -352,9 +352,9 @@ object VideoDownloadManager { | |||
|                                 DownloadActionType.Pause -> pressToPauseIcon | ||||
|                                 DownloadActionType.Stop -> pressToStopIcon | ||||
|                             }, when (i) { | ||||
|                                 DownloadActionType.Resume -> "Resume" | ||||
|                                 DownloadActionType.Pause -> "Pause" | ||||
|                                 DownloadActionType.Stop -> "Cancel" | ||||
|                                 DownloadActionType.Resume -> context.getString(R.string.resume) | ||||
|                                 DownloadActionType.Pause -> context.getString(R.string.pause) | ||||
|                                 DownloadActionType.Stop -> context.getString(R.string.cancel) | ||||
|                             }, pending | ||||
|                         ) | ||||
|                     ) | ||||
|  | @ -1278,7 +1278,7 @@ object VideoDownloadManager { | |||
|         link: ExtractorLink, | ||||
|         tryResume: Boolean = false, | ||||
|     ): Int { | ||||
|         val name = sanitizeFilename(ep.name ?: "Episode ${ep.episode}") | ||||
|         val name = sanitizeFilename(ep.name ?: "${context.getString(R.string.episode)} ${ep.episode}") | ||||
| 
 | ||||
|         if (link.isM3u8 || link.url.endsWith(".m3u8")) { | ||||
|             val startIndex = if (tryResume) { | ||||
|  | @ -1413,7 +1413,11 @@ object VideoDownloadManager { | |||
|                 main { | ||||
|                     showToast( // can be replaced with regular Toast | ||||
|                         context, | ||||
|                         "${pkg.item.ep.mainName}${pkg.item.ep.episode?.let { " ${context.getString(R.string.episode)} $it " } ?: " "}${context.getString(R.string.queued)}", | ||||
|                         "${pkg.item.ep.mainName}${pkg.item.ep.episode?.let { " ${context.getString(R.string.episode)} $it " } ?: " "}${ | ||||
|                             context.getString( | ||||
|                                 R.string.queued | ||||
|                             ) | ||||
|                         }", | ||||
|                         Toast.LENGTH_SHORT | ||||
|                     ) | ||||
|                 } | ||||
|  |  | |||
|  | @ -100,7 +100,7 @@ | |||
|                     android:id="@+id/download_child_episode_download" | ||||
|                     android:background="?selectableItemBackgroundBorderless" | ||||
|                     android:src="@drawable/ic_baseline_play_arrow_24" | ||||
|                     android:contentDescription="@string/download_descript"/> | ||||
|                     android:contentDescription="@string/download"/> | ||||
|         </FrameLayout> | ||||
|     </GridLayout> | ||||
| </androidx.cardview.widget.CardView> | ||||
|  | @ -60,7 +60,7 @@ | |||
|                 android:id="@+id/download_header_goto_child" | ||||
|                 android:layout_gravity="center_vertical|end" | ||||
|                 android:src="@drawable/ic_baseline_keyboard_arrow_right_24" | ||||
|                 android:contentDescription="@string/download_descript"/> | ||||
|                 android:contentDescription="@string/download"/> | ||||
| 
 | ||||
|         <FrameLayout | ||||
|                 android:layout_marginStart="-50dp" | ||||
|  | @ -94,7 +94,7 @@ | |||
|                     android:id="@+id/download_header_episode_download" | ||||
|                     android:background="?selectableItemBackgroundBorderless" | ||||
|                     android:src="@drawable/ic_baseline_play_arrow_24" | ||||
|                     android:contentDescription="@string/download_descript"/> | ||||
|                     android:contentDescription="@string/download"/> | ||||
|         </FrameLayout> | ||||
|     </LinearLayout> | ||||
| </androidx.cardview.widget.CardView> | ||||
|  | @ -93,7 +93,7 @@ | |||
|                     android:id="@+id/result_episode_download" | ||||
|                     android:background="?selectableItemBackgroundBorderless" | ||||
|                     android:src="@drawable/ic_baseline_play_arrow_24" | ||||
|                     android:contentDescription="@string/download_descript"/> | ||||
|                     android:contentDescription="@string/download"/> | ||||
|         </FrameLayout> | ||||
|     </GridLayout> | ||||
| </androidx.cardview.widget.CardView> | ||||
|  | @ -108,7 +108,7 @@ | |||
|                         android:id="@+id/result_episode_download" | ||||
|                         android:background="?selectableItemBackgroundBorderless" | ||||
|                         android:src="@drawable/ic_baseline_play_arrow_24" | ||||
|                         android:contentDescription="@string/download_descript"/> | ||||
|                         android:contentDescription="@string/download"/> | ||||
|             </FrameLayout> | ||||
|         </LinearLayout> | ||||
|         <TextView | ||||
|  |  | |||
|  | @ -40,7 +40,7 @@ | |||
|     <string name="episode_poster">Πόστερ</string> | ||||
|     <string name="play_episode">Αναπαραγωγή Επισοδείου</string> | ||||
|     <string name="need_storage">Δώσε άδεια για την λήψη επισοδείου</string> | ||||
|     <string name="download_descript">Λήξη</string> | ||||
|     <string name="download">Λήξη</string> | ||||
|     <string name="error_loading_links_toast">Σφάλμα φόρτωσεις συνδέσμων</string> | ||||
|     <string name="download_storage_text">Εσωτερικός χώρος</string> | ||||
|     <string name="options">Επιλογές</string> | ||||
|  |  | |||
|  | @ -40,7 +40,7 @@ | |||
|     <string name="episode_poster">Afleveringsposter</string> | ||||
|     <string name="play_episode">Aflevering afspelen</string> | ||||
|     <string name="need_storage">Toestaan om afleveringen te downloaden</string> | ||||
|     <string name="download_descript">Download</string> | ||||
|     <string name="download">Download</string> | ||||
|     <string name="error_loading_links_toast">Fout bij laden van links</string> | ||||
|     <string name="download_storage_text">Interne opslag</string> | ||||
|     <string name="options">Opties</string> | ||||
|  |  | |||
|  | @ -2,11 +2,12 @@ | |||
| <resources> | ||||
|     <string name="rated_format">Betygsatt: %.1f</string> | ||||
|     <string name="player_speed_text_format">Hastighet (%.2fx)</string> | ||||
|     <string name="new_update_format">Ny uppdatering hittad!\n%s -> %s</string> | ||||
| 
 | ||||
|     <string name="app_name">CloudStream</string> | ||||
|     <string name="title_home">Hem</string> | ||||
|     <string name="title_search">Sök</string> | ||||
|     <string name="title_downloads">Nerladdningar</string> | ||||
|     <string name="title_downloads">Nedladdningar</string> | ||||
|     <string name="title_settings">Instälningar</string> | ||||
|     <string name="search_hint">Sök…</string> | ||||
|     <string name="change_providers_des">Ändra Providers</string> | ||||
|  | @ -33,23 +34,21 @@ | |||
| 
 | ||||
|     <string name="play_movie_button">Spela Upp</string> | ||||
|     <string name="play_torrent_button">Strömma Torrent</string> | ||||
|     <string name="pick_source">Sources</string> | ||||
|     <string name="pick_source">Källor</string> | ||||
|     <string name="pick_subtitle">Undertexter</string> | ||||
|     <string name="reload_error">Försök ansluta igen…</string> | ||||
|     <string name="result_go_back">Gå tillbaka</string> | ||||
|     <string name="episode_poster">@string/result_poster</string> | ||||
|     <string name="play_episode">Spela Avsnitt</string> | ||||
|     <string name="need_storage">Allow to download episodes</string> | ||||
|     <string name="download_descript">Ladda ner</string> | ||||
|     <string name="download">Ladda ner</string> | ||||
|     <string name="download_storage_text">Intern lagring</string> | ||||
| 
 | ||||
|     <string name="app_dubbed_text">Dub</string> | ||||
|     <string name="app_subbed_text">Sub</string> | ||||
| 
 | ||||
|     <string name="popup_delete_file">Radera</string> | ||||
|     <string name="popup_delete_file">Ta bort</string> | ||||
|     <string name="popup_play_file">Spela upp</string> | ||||
|     <string name="popup_resume_download">Resume Download</string> | ||||
|     <string name="popup_pause_download">Pause Download</string> | ||||
| 
 | ||||
|     <string name="pref_disable_acra">Inaktivera automatisk felrapportering</string> | ||||
|     <string name="home_more_info">Mer information</string> | ||||
|  | @ -82,7 +81,7 @@ | |||
| 
 | ||||
|     <string name="prerelease_commit_hash">unknown_prerelease</string> | ||||
|     <string name="subs_auto_select_language">Autoval av undertextspråk</string> | ||||
|     <string name="subs_download_languages">Automatisk nerladdaning av språk</string> | ||||
|     <string name="subs_download_languages">Automatisk nedladdaning av språk</string> | ||||
|     <string name="subs_hold_to_reset_to_default">Håll inne för att återställa till standard</string> | ||||
|     <string name="continue_watching">Fortsätt titta</string> | ||||
| 
 | ||||
|  | @ -133,7 +132,7 @@ | |||
|     <string name="no_links_found_toast">Inga länkar hittades</string> | ||||
|     <string name="copy_link_toast">Länken kopierades till urklipp</string> | ||||
|     <string name="play_episode_toast">Spela upp avsnitt</string> | ||||
|     <string name="subs_default_reset_toast">Återställ till standardvärdet</string> | ||||
|     <string name="subs_default_reset_toast">Återställd till standardvärdet</string> | ||||
|     <string name="acra_report_toast">Programmet kraschade tyvärr. En anonym felrapport kommer att skickas till utvecklarna</string> | ||||
|     <string name="error_loading_links_toast">Fel uppstod vid laddning av länkarna</string> | ||||
| 
 | ||||
|  | @ -144,7 +143,7 @@ | |||
|     <string name="season_short">S</string> | ||||
|     <string name="episode_short">A</string> | ||||
| 
 | ||||
|     <string name="delete_file">Ta bort nerladdad fil</string> | ||||
|     <string name="delete_file">Ta bort nedladdad fil</string> | ||||
|     <string name="delete">Ta bort</string> | ||||
|     <string name="delete_message">Denna fil kommer att raderas permanent %s\nÄr du helt säker?</string> | ||||
| 
 | ||||
|  | @ -190,7 +189,18 @@ | |||
|     <string name="skip_op">Hoppa över OP</string> | ||||
| 
 | ||||
|     <string name="dont_show_again">Visa inte igen</string> | ||||
|     <string name="download_started">Nerladdning startad</string> | ||||
|     <string name="download_failed">Nerladdning Misslyckades</string> | ||||
|     <string name="update">Uppdatering</string> | ||||
| 
 | ||||
|     <string name="download_started">Nedladdningar startad</string> | ||||
|     <string name="download_failed">Nedladdning Misslyckades</string> | ||||
|     <string name="downloaded">Nedladdad</string> | ||||
|     <string name="downloading">Laddar ner</string> | ||||
|     <string name="download_paused">Nedladdning Pausad</string> | ||||
|     <string name="download_canceled">Nedladdning Avbryten</string> | ||||
|     <string name="download_done">Nedladdning Färdig</string> | ||||
|     <string name="popup_resume_download">Återupta nedladdning</string> | ||||
|     <string name="popup_pause_download">Pausa nedladdning</string> | ||||
| 
 | ||||
|     <string name="pause">Pausa</string> | ||||
|     <string name="resume">Återuppta</string> | ||||
| </resources> | ||||
|  |  | |||
|  | @ -61,7 +61,17 @@ | |||
|     <string name="episode_poster">Episode Poster</string> | ||||
|     <string name="play_episode">Play Episode</string> | ||||
|     <string name="need_storage">Allow to download episodes</string> | ||||
|     <string name="download_descript">Download</string> | ||||
| 
 | ||||
|     <string name="download">Download</string> | ||||
|     <string name="downloaded">Downloaded</string> | ||||
|     <string name="downloading">Downloading</string> | ||||
|     <string name="download_paused">Download Paused</string> | ||||
|     <string name="download_started">Download Started</string> | ||||
|     <string name="download_failed">Download Failed</string> | ||||
|     <string name="download_canceled">Download Canceled</string> | ||||
|     <string name="download_done">Download Done</string> | ||||
|     <string name="download_format" translatable="false">%s - %s</string> | ||||
| 
 | ||||
|     <string name="error_loading_links_toast">Error Loading Links</string> | ||||
|     <string name="download_storage_text">Internal Storage</string> | ||||
| 
 | ||||
|  | @ -170,6 +180,8 @@ | |||
|     <string name="delete_file">Delete File</string> | ||||
|     <string name="delete">Delete</string> | ||||
|     <string name="cancel" translatable="false">@string/sort_cancel</string> | ||||
|     <string name="pause">Pause</string> | ||||
|     <string name="resume">Resume</string> | ||||
|     <string name="delete_message">This will permanently delete %s\nAre you sure?</string> | ||||
| 
 | ||||
|     <string name="status_ongoing">Ongoing</string> | ||||
|  | @ -219,7 +231,5 @@ | |||
|     <string name="skip_op">Skip OP</string> | ||||
| 
 | ||||
|     <string name="dont_show_again">Don\'t show again</string> | ||||
|     <string name="download_started">Download started</string> | ||||
|     <string name="download_failed">Download Failed</string> | ||||
|     <string name="update">Update</string> | ||||
| </resources> | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue