From b1d9694432590c87c47932b28407b6710fa5945e Mon Sep 17 00:00:00 2001 From: Bnyro Date: Fri, 10 Jun 2022 10:58:33 +0200 Subject: [PATCH 001/118] search suggestions rewrite --- .../adapters/SearchHistoryAdapter.kt | 4 +- .../adapters/SearchSuggestionsAdapter.kt | 40 +++++++++ .../libretube/fragments/SearchFragment.kt | 82 ++++++++----------- app/src/main/res/layout/fragment_search.xml | 3 +- .../main/res/layout/searchsuggestion_row.xml | 31 +++++++ 5 files changed, 110 insertions(+), 50 deletions(-) create mode 100644 app/src/main/java/com/github/libretube/adapters/SearchSuggestionsAdapter.kt create mode 100644 app/src/main/res/layout/searchsuggestion_row.xml diff --git a/app/src/main/java/com/github/libretube/adapters/SearchHistoryAdapter.kt b/app/src/main/java/com/github/libretube/adapters/SearchHistoryAdapter.kt index 2de707573..13d07cfee 100644 --- a/app/src/main/java/com/github/libretube/adapters/SearchHistoryAdapter.kt +++ b/app/src/main/java/com/github/libretube/adapters/SearchHistoryAdapter.kt @@ -4,7 +4,7 @@ import android.content.Context import android.view.LayoutInflater import android.view.View import android.view.ViewGroup -import android.widget.AutoCompleteTextView +import android.widget.EditText import android.widget.TextView import androidx.preference.PreferenceManager import androidx.recyclerview.widget.RecyclerView @@ -14,7 +14,7 @@ import com.google.android.material.imageview.ShapeableImageView class SearchHistoryAdapter( private val context: Context, private var historyList: List, - private val editText: AutoCompleteTextView + private val editText: EditText ) : RecyclerView.Adapter() { diff --git a/app/src/main/java/com/github/libretube/adapters/SearchSuggestionsAdapter.kt b/app/src/main/java/com/github/libretube/adapters/SearchSuggestionsAdapter.kt new file mode 100644 index 000000000..9762f7fd5 --- /dev/null +++ b/app/src/main/java/com/github/libretube/adapters/SearchSuggestionsAdapter.kt @@ -0,0 +1,40 @@ +package com.github.libretube.adapters + +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import android.widget.EditText +import android.widget.TextView +import androidx.recyclerview.widget.RecyclerView +import com.github.libretube.R + +class SearchSuggestionsAdapter( + private var suggestionsList: List, + private var autoCompleteTextView: EditText +) : + RecyclerView.Adapter() { + + override fun getItemCount(): Int { + return suggestionsList.size + } + + override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): SearchSuggestionsViewHolder { + val layoutInflater = LayoutInflater.from(parent.context) + val cell = layoutInflater.inflate(R.layout.searchsuggestion_row, parent, false) + return SearchSuggestionsViewHolder(cell) + } + + override fun onBindViewHolder(holder: SearchSuggestionsViewHolder, position: Int) { + val suggestion = suggestionsList[position] + val suggestionTextView = holder.v.findViewById(R.id.suggestion_text) + suggestionTextView.text = suggestion + holder.v.setOnClickListener { + autoCompleteTextView.setText(suggestion) + } + } +} + +class SearchSuggestionsViewHolder(val v: View) : RecyclerView.ViewHolder(v) { + init { + } +} diff --git a/app/src/main/java/com/github/libretube/fragments/SearchFragment.kt b/app/src/main/java/com/github/libretube/fragments/SearchFragment.kt index fd7a36619..308f43cd5 100644 --- a/app/src/main/java/com/github/libretube/fragments/SearchFragment.kt +++ b/app/src/main/java/com/github/libretube/fragments/SearchFragment.kt @@ -1,7 +1,6 @@ package com.github.libretube.fragments import android.content.Context -import android.content.DialogInterface import android.os.Bundle import android.text.Editable import android.text.TextWatcher @@ -12,8 +11,7 @@ import android.view.ViewGroup import android.view.WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN import android.view.inputmethod.EditorInfo import android.view.inputmethod.InputMethodManager -import android.widget.ArrayAdapter -import android.widget.AutoCompleteTextView +import android.widget.EditText import android.widget.ImageView import android.widget.TextView.GONE import android.widget.TextView.OnEditorActionListener @@ -27,14 +25,14 @@ import androidx.recyclerview.widget.RecyclerView import com.github.libretube.R import com.github.libretube.adapters.SearchAdapter import com.github.libretube.adapters.SearchHistoryAdapter +import com.github.libretube.adapters.SearchSuggestionsAdapter import com.github.libretube.hideKeyboard import com.github.libretube.util.RetrofitInstance import com.google.android.material.dialog.MaterialAlertDialogBuilder -import java.io.IOException import kotlinx.coroutines.GlobalScope -import kotlinx.coroutines.delay import kotlinx.coroutines.launch import retrofit2.HttpException +import java.io.IOException class SearchFragment : Fragment() { private val TAG = "SearchFragment" @@ -42,6 +40,7 @@ class SearchFragment : Fragment() { private var apiSearchFilter = "all" private var nextPage: String? = null private lateinit var searchRecView: RecyclerView + private lateinit var historyRecView: RecyclerView private var searchAdapter: SearchAdapter? = null private var isLoading: Boolean = true @@ -62,11 +61,11 @@ class SearchFragment : Fragment() { override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) - searchRecView = view.findViewById(R.id.search_recycler) + searchRecView = view.findViewById(R.id.search_recycler) + historyRecView = view.findViewById(R.id.history_recycler) - val autoTextView = view.findViewById(R.id.autoCompleteTextView) + val autoTextView = view.findViewById(R.id.autoCompleteTextView) val clearSearchButton = view.findViewById(R.id.clearSearch_imageView) - val historyRecycler = view.findViewById(R.id.history_recycler) val filterImageView = view.findViewById(R.id.filterMenu_imageView) var tempSelectedItem = 0 @@ -92,30 +91,26 @@ class SearchFragment : Fragment() { MaterialAlertDialogBuilder(view.context) .setTitle(getString(R.string.choose_filter)) - .setSingleChoiceItems( - filterOptions, selectedFilter, - DialogInterface.OnClickListener { _, id -> - tempSelectedItem = id - } - ) + .setSingleChoiceItems(filterOptions, selectedFilter) { _, id -> + tempSelectedItem = id + } .setPositiveButton( getString(R.string.okay), - DialogInterface.OnClickListener { _, _ -> - selectedFilter = tempSelectedItem - apiSearchFilter = when (selectedFilter) { - 0 -> "all" - 1 -> "videos" - 2 -> "channels" - 3 -> "playlists" - 4 -> "music_songs" - 5 -> "music_videos" - 6 -> "music_albums" - 7 -> "music_playlists" - else -> "all" - } - fetchSearch(autoTextView.text.toString()) + ) { _, _ -> + selectedFilter = tempSelectedItem + apiSearchFilter = when (selectedFilter) { + 0 -> "all" + 1 -> "videos" + 2 -> "channels" + 3 -> "playlists" + 4 -> "music_songs" + 5 -> "music_videos" + 6 -> "music_albums" + 7 -> "music_playlists" + else -> "all" } - ) + fetchSearch(autoTextView.text.toString()) + } .setNegativeButton(getString(R.string.cancel), null) .create() .show() @@ -124,13 +119,13 @@ class SearchFragment : Fragment() { // show search history searchRecView.visibility = GONE - historyRecycler.visibility = VISIBLE + historyRecView.visibility = VISIBLE - historyRecycler.layoutManager = LinearLayoutManager(view.context) + historyRecView.layoutManager = LinearLayoutManager(view.context) val historyList = getHistory() if (historyList.isNotEmpty()) { - historyRecycler.adapter = + historyRecView.adapter = SearchHistoryAdapter(requireContext(), historyList, autoTextView) } @@ -150,8 +145,6 @@ class SearchFragment : Fragment() { override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) { if (s!! != "") { - searchRecView.visibility = VISIBLE - historyRecycler.visibility = GONE searchRecView.adapter = null searchRecView.viewTreeObserver @@ -163,8 +156,6 @@ class SearchFragment : Fragment() { GlobalScope.launch { fetchSuggestions(s.toString(), autoTextView) - delay(1000) - fetchSearch(s.toString()) } } } @@ -172,10 +163,10 @@ class SearchFragment : Fragment() { override fun afterTextChanged(s: Editable?) { if (s!!.isEmpty()) { searchRecView.visibility = GONE - historyRecycler.visibility = VISIBLE + historyRecView.visibility = GONE val historyList = getHistory() if (historyList.isNotEmpty()) { - historyRecycler.adapter = + historyRecView.adapter = SearchHistoryAdapter(requireContext(), historyList, autoTextView) } } @@ -185,7 +176,9 @@ class SearchFragment : Fragment() { OnEditorActionListener { _, actionId, _ -> if (actionId == EditorInfo.IME_ACTION_SEARCH) { hideKeyboard() - autoTextView.dismissDropDown() + searchRecView.visibility = VISIBLE + historyRecView.visibility = GONE + fetchSearch(autoTextView.text.toString()) if (sharedPreferences.getBoolean( "search_history_toggle", true @@ -199,12 +192,9 @@ class SearchFragment : Fragment() { false } ) - autoTextView.setOnItemClickListener { _, _, _, _ -> - hideKeyboard() - } } - private fun fetchSuggestions(query: String, autoTextView: AutoCompleteTextView) { + private fun fetchSuggestions(query: String, autoTextView: EditText) { lifecycleScope.launchWhenCreated { val response = try { RetrofitInstance.api.getSuggestions(query) @@ -216,9 +206,9 @@ class SearchFragment : Fragment() { Log.e(TAG, "HttpException, unexpected response") return@launchWhenCreated } - val adapter = - ArrayAdapter(requireContext(), android.R.layout.simple_list_item_1, response) - autoTextView.setAdapter(adapter) + historyRecView.visibility = VISIBLE + val suggestionsAdapter = SearchSuggestionsAdapter(response, autoTextView) + historyRecView.adapter = suggestionsAdapter } } diff --git a/app/src/main/res/layout/fragment_search.xml b/app/src/main/res/layout/fragment_search.xml index 4dd3a2f5c..cf46d6d0b 100644 --- a/app/src/main/res/layout/fragment_search.xml +++ b/app/src/main/res/layout/fragment_search.xml @@ -42,12 +42,11 @@ android:background="@android:color/transparent" app:hintEnabled="false"> - + + + + + + + \ No newline at end of file From 587bb9d5531190cb154eaeea8f9522a194afc5b9 Mon Sep 17 00:00:00 2001 From: Bnyro Date: Fri, 10 Jun 2022 14:22:32 +0200 Subject: [PATCH 002/118] functionality and improvements --- .../adapters/SearchHistoryAdapter.kt | 11 +- .../adapters/SearchSuggestionsAdapter.kt | 7 +- .../libretube/fragments/SearchFragment.kt | 117 +++++++++--------- 3 files changed, 68 insertions(+), 67 deletions(-) diff --git a/app/src/main/java/com/github/libretube/adapters/SearchHistoryAdapter.kt b/app/src/main/java/com/github/libretube/adapters/SearchHistoryAdapter.kt index 13d07cfee..7dfdeaa72 100644 --- a/app/src/main/java/com/github/libretube/adapters/SearchHistoryAdapter.kt +++ b/app/src/main/java/com/github/libretube/adapters/SearchHistoryAdapter.kt @@ -9,12 +9,14 @@ import android.widget.TextView import androidx.preference.PreferenceManager import androidx.recyclerview.widget.RecyclerView import com.github.libretube.R +import com.github.libretube.fragments.SearchFragment import com.google.android.material.imageview.ShapeableImageView class SearchHistoryAdapter( private val context: Context, private var historyList: List, - private val editText: EditText + private val editText: EditText, + private val searchFragment: SearchFragment ) : RecyclerView.Adapter() { @@ -34,17 +36,14 @@ class SearchHistoryAdapter( holder.v.findViewById(R.id.delete_history).setOnClickListener { val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context) - historyList = historyList - history - - sharedPreferences.edit().putStringSet("search_history", HashSet(historyList)) - .apply() - + sharedPreferences.edit().putStringSet("search_history", HashSet(historyList)).apply() notifyDataSetChanged() } holder.v.setOnClickListener { editText.setText(history) + searchFragment.fetchSearch(history) } } } diff --git a/app/src/main/java/com/github/libretube/adapters/SearchSuggestionsAdapter.kt b/app/src/main/java/com/github/libretube/adapters/SearchSuggestionsAdapter.kt index 9762f7fd5..fb899db41 100644 --- a/app/src/main/java/com/github/libretube/adapters/SearchSuggestionsAdapter.kt +++ b/app/src/main/java/com/github/libretube/adapters/SearchSuggestionsAdapter.kt @@ -7,10 +7,12 @@ import android.widget.EditText import android.widget.TextView import androidx.recyclerview.widget.RecyclerView import com.github.libretube.R +import com.github.libretube.fragments.SearchFragment class SearchSuggestionsAdapter( private var suggestionsList: List, - private var autoCompleteTextView: EditText + private var editText: EditText, + private val searchFragment: SearchFragment ) : RecyclerView.Adapter() { @@ -29,7 +31,8 @@ class SearchSuggestionsAdapter( val suggestionTextView = holder.v.findViewById(R.id.suggestion_text) suggestionTextView.text = suggestion holder.v.setOnClickListener { - autoCompleteTextView.setText(suggestion) + editText.setText(suggestion) + searchFragment.fetchSearch(editText.text.toString()) } } } diff --git a/app/src/main/java/com/github/libretube/fragments/SearchFragment.kt b/app/src/main/java/com/github/libretube/fragments/SearchFragment.kt index 308f43cd5..0cde9d183 100644 --- a/app/src/main/java/com/github/libretube/fragments/SearchFragment.kt +++ b/app/src/main/java/com/github/libretube/fragments/SearchFragment.kt @@ -41,8 +41,10 @@ class SearchFragment : Fragment() { private var nextPage: String? = null private lateinit var searchRecView: RecyclerView private lateinit var historyRecView: RecyclerView + private lateinit var autoTextView: EditText private var searchAdapter: SearchAdapter? = null private var isLoading: Boolean = true + private var isFetchingSearch: Boolean = false override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) @@ -63,16 +65,13 @@ class SearchFragment : Fragment() { super.onViewCreated(view, savedInstanceState) searchRecView = view.findViewById(R.id.search_recycler) historyRecView = view.findViewById(R.id.history_recycler) + autoTextView = view.findViewById(R.id.autoCompleteTextView) - val autoTextView = view.findViewById(R.id.autoCompleteTextView) val clearSearchButton = view.findViewById(R.id.clearSearch_imageView) val filterImageView = view.findViewById(R.id.filterMenu_imageView) var tempSelectedItem = 0 - val sharedPreferences = - PreferenceManager.getDefaultSharedPreferences(requireContext()) - clearSearchButton.setOnClickListener { autoTextView.text.clear() } @@ -117,23 +116,15 @@ class SearchFragment : Fragment() { } // show search history - - searchRecView.visibility = GONE - historyRecView.visibility = VISIBLE - historyRecView.layoutManager = LinearLayoutManager(view.context) - - val historyList = getHistory() - if (historyList.isNotEmpty()) { - historyRecView.adapter = - SearchHistoryAdapter(requireContext(), historyList, autoTextView) - } + showHistory() searchRecView.layoutManager = GridLayoutManager(view.context, 1) autoTextView.requestFocus() val imm = requireContext().getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager imm.showSoftInput(autoTextView, InputMethodManager.SHOW_IMPLICIT) + autoTextView.addTextChangedListener(object : TextWatcher { override fun beforeTextChanged( s: CharSequence?, @@ -162,13 +153,7 @@ class SearchFragment : Fragment() { override fun afterTextChanged(s: Editable?) { if (s!!.isEmpty()) { - searchRecView.visibility = GONE - historyRecView.visibility = GONE - val historyList = getHistory() - if (historyList.isNotEmpty()) { - historyRecView.adapter = - SearchHistoryAdapter(requireContext(), historyList, autoTextView) - } + showHistory() } } }) @@ -179,14 +164,6 @@ class SearchFragment : Fragment() { searchRecView.visibility = VISIBLE historyRecView.visibility = GONE fetchSearch(autoTextView.text.toString()) - if (sharedPreferences.getBoolean( - "search_history_toggle", - true - ) - ) { - val newString = autoTextView.text.toString() - addToHistory(newString) - } return@OnEditorActionListener true } false @@ -195,25 +172,33 @@ class SearchFragment : Fragment() { } private fun fetchSuggestions(query: String, autoTextView: EditText) { - lifecycleScope.launchWhenCreated { - val response = try { - RetrofitInstance.api.getSuggestions(query) - } catch (e: IOException) { - println(e) - Log.e(TAG, "IOException, you might not have internet connection") - return@launchWhenCreated - } catch (e: HttpException) { - Log.e(TAG, "HttpException, unexpected response") - return@launchWhenCreated + fun run() { + lifecycleScope.launchWhenCreated { + searchRecView.visibility = GONE + historyRecView.visibility = VISIBLE + val response = try { + RetrofitInstance.api.getSuggestions(query) + } catch (e: IOException) { + println(e) + Log.e(TAG, "IOException, you might not have internet connection") + return@launchWhenCreated + } catch (e: HttpException) { + Log.e(TAG, "HttpException, unexpected response") + return@launchWhenCreated + } + val suggestionsAdapter = + SearchSuggestionsAdapter(response, autoTextView, this@SearchFragment) + historyRecView.adapter = suggestionsAdapter } - historyRecView.visibility = VISIBLE - val suggestionsAdapter = SearchSuggestionsAdapter(response, autoTextView) - historyRecView.adapter = suggestionsAdapter } + if (!isFetchingSearch) run() } - private fun fetchSearch(query: String) { + fun fetchSearch(query: String) { lifecycleScope.launchWhenCreated { + isFetchingSearch = true + hideKeyboard() + Log.e("here", "here") val response = try { RetrofitInstance.api.getSearchResults(query, apiSearchFilter) } catch (e: IOException) { @@ -227,11 +212,15 @@ class SearchFragment : Fragment() { nextPage = response.nextpage if (response.items!!.isNotEmpty()) { runOnUiThread { + historyRecView.visibility = GONE + searchRecView.visibility = VISIBLE searchAdapter = SearchAdapter(response.items, childFragmentManager) searchRecView.adapter = searchAdapter } } + addToHistory(query) isLoading = false + isFetchingSearch = false } } @@ -276,27 +265,37 @@ class SearchFragment : Fragment() { hideKeyboard() } + private fun showHistory() { + searchRecView.visibility = GONE + val historyList = getHistory() + if (historyList.isNotEmpty()) { + historyRecView.adapter = + SearchHistoryAdapter(requireContext(), historyList, autoTextView, this) + historyRecView.visibility = VISIBLE + } + } + private fun addToHistory(query: String) { val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(requireContext()) + val searchHistoryEnabled = sharedPreferences.getBoolean("search_history_toggle", true) + if (searchHistoryEnabled) { + var historyList = getHistory() - var historyList = getHistory() + if ((historyList.isNotEmpty() && historyList.contains(query)) || query == "") { + return + } else { + historyList = historyList + query + } - if (historyList.isNotEmpty() && query == historyList[historyList.size - 1]) { - return - } else if (query == "") { - return - } else { - historyList = historyList + query + if (historyList.size > 10) { + historyList = historyList.takeLast(10) + } + + val set: Set = HashSet(historyList) + + sharedPreferences.edit().putStringSet("search_history", set) + .apply() } - - if (historyList.size > 10) { - historyList = historyList.takeLast(10) - } - - val set: Set = HashSet(historyList) - - sharedPreferences.edit().putStringSet("search_history", set) - .apply() } private fun getHistory(): List { From 1c566bdb1ce5c851ab742cffce693abba572d210 Mon Sep 17 00:00:00 2001 From: Bnyro Date: Fri, 10 Jun 2022 14:25:06 +0200 Subject: [PATCH 003/118] ktlint --- .../main/java/com/github/libretube/fragments/SearchFragment.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/github/libretube/fragments/SearchFragment.kt b/app/src/main/java/com/github/libretube/fragments/SearchFragment.kt index 0cde9d183..63ddd43e4 100644 --- a/app/src/main/java/com/github/libretube/fragments/SearchFragment.kt +++ b/app/src/main/java/com/github/libretube/fragments/SearchFragment.kt @@ -29,10 +29,10 @@ import com.github.libretube.adapters.SearchSuggestionsAdapter import com.github.libretube.hideKeyboard import com.github.libretube.util.RetrofitInstance import com.google.android.material.dialog.MaterialAlertDialogBuilder +import java.io.IOException import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.launch import retrofit2.HttpException -import java.io.IOException class SearchFragment : Fragment() { private val TAG = "SearchFragment" From d984e94a46cd81ba7a5333ed686b619ad75b484e Mon Sep 17 00:00:00 2001 From: Bnyro Date: Fri, 10 Jun 2022 15:02:51 +0200 Subject: [PATCH 004/118] added missing translations --- .../libretube/adapters/ChannelAdapter.kt | 2 +- .../libretube/adapters/CommentsAdapter.kt | 2 +- .../libretube/adapters/RepliesAdapter.kt | 2 +- .../libretube/adapters/SearchAdapter.kt | 2 +- .../libretube/adapters/SubscriptionAdapter.kt | 2 +- .../libretube/adapters/TrendingAdapter.kt | 2 +- .../libretube/fragments/ChannelFragment.kt | 2 +- .../libretube/fragments/PlayerFragment.kt | 4 ++-- .../com/github/libretube/util/VideoViews.kt | 2 +- app/src/main/res/menu/action_bar.xml | 2 +- app/src/main/res/values/array.xml | 19 ++++++++----------- app/src/main/res/values/strings.xml | 9 +++++++++ 12 files changed, 28 insertions(+), 22 deletions(-) diff --git a/app/src/main/java/com/github/libretube/adapters/ChannelAdapter.kt b/app/src/main/java/com/github/libretube/adapters/ChannelAdapter.kt index 5b8f70bc8..20bea6628 100644 --- a/app/src/main/java/com/github/libretube/adapters/ChannelAdapter.kt +++ b/app/src/main/java/com/github/libretube/adapters/ChannelAdapter.kt @@ -10,7 +10,7 @@ import android.widget.TextView import androidx.appcompat.app.AppCompatActivity import androidx.recyclerview.widget.RecyclerView import com.github.libretube.R -import com.github.libretube.formatShort +import com.github.libretube.util.formatShort import com.github.libretube.fragments.PlayerFragment import com.github.libretube.obj.StreamItem import com.squareup.picasso.Picasso diff --git a/app/src/main/java/com/github/libretube/adapters/CommentsAdapter.kt b/app/src/main/java/com/github/libretube/adapters/CommentsAdapter.kt index 7740c7e58..18bb2d5cf 100644 --- a/app/src/main/java/com/github/libretube/adapters/CommentsAdapter.kt +++ b/app/src/main/java/com/github/libretube/adapters/CommentsAdapter.kt @@ -14,7 +14,7 @@ import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.RecyclerView import com.github.libretube.MainActivity import com.github.libretube.R -import com.github.libretube.formatShort +import com.github.libretube.util.formatShort import com.github.libretube.obj.Comment import com.github.libretube.obj.CommentsPage import com.github.libretube.util.RetrofitInstance diff --git a/app/src/main/java/com/github/libretube/adapters/RepliesAdapter.kt b/app/src/main/java/com/github/libretube/adapters/RepliesAdapter.kt index de06907ae..a282d3a0b 100644 --- a/app/src/main/java/com/github/libretube/adapters/RepliesAdapter.kt +++ b/app/src/main/java/com/github/libretube/adapters/RepliesAdapter.kt @@ -10,7 +10,7 @@ import androidx.core.os.bundleOf import androidx.recyclerview.widget.RecyclerView import com.github.libretube.MainActivity import com.github.libretube.R -import com.github.libretube.formatShort +import com.github.libretube.util.formatShort import com.github.libretube.obj.Comment import com.squareup.picasso.Picasso diff --git a/app/src/main/java/com/github/libretube/adapters/SearchAdapter.kt b/app/src/main/java/com/github/libretube/adapters/SearchAdapter.kt index d1fa29523..cebe3ee6e 100644 --- a/app/src/main/java/com/github/libretube/adapters/SearchAdapter.kt +++ b/app/src/main/java/com/github/libretube/adapters/SearchAdapter.kt @@ -14,7 +14,7 @@ import androidx.recyclerview.widget.RecyclerView import com.github.libretube.MainActivity import com.github.libretube.R import com.github.libretube.dialogs.VideoOptionsDialog -import com.github.libretube.formatShort +import com.github.libretube.util.formatShort import com.github.libretube.fragments.PlayerFragment import com.github.libretube.obj.SearchItem import com.squareup.picasso.Picasso diff --git a/app/src/main/java/com/github/libretube/adapters/SubscriptionAdapter.kt b/app/src/main/java/com/github/libretube/adapters/SubscriptionAdapter.kt index 3e37fd814..e14bb89de 100644 --- a/app/src/main/java/com/github/libretube/adapters/SubscriptionAdapter.kt +++ b/app/src/main/java/com/github/libretube/adapters/SubscriptionAdapter.kt @@ -15,7 +15,7 @@ import androidx.recyclerview.widget.RecyclerView import com.github.libretube.MainActivity import com.github.libretube.R import com.github.libretube.dialogs.VideoOptionsDialog -import com.github.libretube.formatShort +import com.github.libretube.util.formatShort import com.github.libretube.fragments.PlayerFragment import com.github.libretube.obj.StreamItem import com.squareup.picasso.Picasso diff --git a/app/src/main/java/com/github/libretube/adapters/TrendingAdapter.kt b/app/src/main/java/com/github/libretube/adapters/TrendingAdapter.kt index 376171c9e..34e76b25d 100644 --- a/app/src/main/java/com/github/libretube/adapters/TrendingAdapter.kt +++ b/app/src/main/java/com/github/libretube/adapters/TrendingAdapter.kt @@ -15,7 +15,7 @@ import androidx.recyclerview.widget.RecyclerView import com.github.libretube.MainActivity import com.github.libretube.R import com.github.libretube.dialogs.VideoOptionsDialog -import com.github.libretube.formatShort +import com.github.libretube.util.formatShort import com.github.libretube.fragments.PlayerFragment import com.github.libretube.obj.StreamItem import com.squareup.picasso.Picasso diff --git a/app/src/main/java/com/github/libretube/fragments/ChannelFragment.kt b/app/src/main/java/com/github/libretube/fragments/ChannelFragment.kt index bf33cecf6..e2bc2acc5 100644 --- a/app/src/main/java/com/github/libretube/fragments/ChannelFragment.kt +++ b/app/src/main/java/com/github/libretube/fragments/ChannelFragment.kt @@ -17,7 +17,7 @@ import androidx.recyclerview.widget.RecyclerView import androidx.swiperefreshlayout.widget.SwipeRefreshLayout import com.github.libretube.R import com.github.libretube.adapters.ChannelAdapter -import com.github.libretube.formatShort +import com.github.libretube.util.formatShort import com.github.libretube.obj.Subscribe import com.github.libretube.util.RetrofitInstance import com.google.android.material.button.MaterialButton diff --git a/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt b/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt index a8c6a2f67..fc13387fe 100644 --- a/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt +++ b/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt @@ -48,7 +48,7 @@ import com.github.libretube.adapters.TrendingAdapter import com.github.libretube.dialogs.AddtoPlaylistDialog import com.github.libretube.dialogs.DownloadDialog import com.github.libretube.dialogs.ShareDialog -import com.github.libretube.formatShort +import com.github.libretube.util.formatShort import com.github.libretube.hideKeyboard import com.github.libretube.obj.PipedStream import com.github.libretube.obj.Segment @@ -445,7 +445,7 @@ class PlayerFragment : Fragment() { private fun initializePlayerView(view: View, response: Streams) { view.findViewById(R.id.player_views_info).text = - response.views.formatShort() + " views • " + response.uploadDate + context?.getString(R.string.views, response.views.formatShort()) + " • " + response.uploadDate view.findViewById(R.id.textLike).text = response.likes.formatShort() val channelImage = view.findViewById(R.id.player_channelImage) Picasso.get().load(response.uploaderAvatar).into(channelImage) diff --git a/app/src/main/java/com/github/libretube/util/VideoViews.kt b/app/src/main/java/com/github/libretube/util/VideoViews.kt index 41c7c4cbe..5de54163d 100644 --- a/app/src/main/java/com/github/libretube/util/VideoViews.kt +++ b/app/src/main/java/com/github/libretube/util/VideoViews.kt @@ -1,4 +1,4 @@ -package com.github.libretube +package com.github.libretube.util import java.math.BigDecimal import java.math.RoundingMode diff --git a/app/src/main/res/menu/action_bar.xml b/app/src/main/res/menu/action_bar.xml index 88b77a9ac..6aa29f4da 100644 --- a/app/src/main/res/menu/action_bar.xml +++ b/app/src/main/res/menu/action_bar.xml @@ -3,7 +3,7 @@ xmlns:app="http://schemas.android.com/apk/res-auto"> diff --git a/app/src/main/res/values/array.xml b/app/src/main/res/values/array.xml index 1edd99554..31f7d2b94 100644 --- a/app/src/main/res/values/array.xml +++ b/app/src/main/res/values/array.xml @@ -580,14 +580,14 @@ - Default - Legacy - Gradient - Fire - Torch - Shaped - Flame - Bird + @string/defaultIcon + @string/legacyIcon + @string/gradientIcon + @string/fireIcon + @string/torchIcon + @string/shapedIcon + @string/flameIcon + @string/birdIcon MainActivity @@ -604,7 +604,6 @@ MP4 MKV - .mp4 .mkv @@ -619,7 +618,6 @@ 1.5x 2x - 0.25F 0.5F @@ -636,7 +634,6 @@ @string/movies_directory @string/sdcard - downloads music diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 8215b8a32..363b5bb98 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -152,4 +152,13 @@ Music directory Movies directory Share Url To: + %1$s views + Default + Legacy + Gradient + Fire + Torch + Shaped + Flame + Bird \ No newline at end of file From 0db214469a901ed63e72a7b86f7b73764d03b80f Mon Sep 17 00:00:00 2001 From: Bnyro Date: Fri, 10 Jun 2022 15:03:48 +0200 Subject: [PATCH 005/118] ktlint --- .../java/com/github/libretube/adapters/ChannelAdapter.kt | 2 +- .../java/com/github/libretube/adapters/CommentsAdapter.kt | 2 +- .../java/com/github/libretube/adapters/RepliesAdapter.kt | 2 +- .../main/java/com/github/libretube/adapters/SearchAdapter.kt | 2 +- .../com/github/libretube/adapters/SubscriptionAdapter.kt | 2 +- .../java/com/github/libretube/adapters/TrendingAdapter.kt | 2 +- .../java/com/github/libretube/fragments/ChannelFragment.kt | 2 +- .../java/com/github/libretube/fragments/PlayerFragment.kt | 5 +++-- 8 files changed, 10 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/com/github/libretube/adapters/ChannelAdapter.kt b/app/src/main/java/com/github/libretube/adapters/ChannelAdapter.kt index 20bea6628..28f716ac1 100644 --- a/app/src/main/java/com/github/libretube/adapters/ChannelAdapter.kt +++ b/app/src/main/java/com/github/libretube/adapters/ChannelAdapter.kt @@ -10,9 +10,9 @@ import android.widget.TextView import androidx.appcompat.app.AppCompatActivity import androidx.recyclerview.widget.RecyclerView import com.github.libretube.R -import com.github.libretube.util.formatShort import com.github.libretube.fragments.PlayerFragment import com.github.libretube.obj.StreamItem +import com.github.libretube.util.formatShort import com.squareup.picasso.Picasso class ChannelAdapter(private val videoFeed: MutableList) : diff --git a/app/src/main/java/com/github/libretube/adapters/CommentsAdapter.kt b/app/src/main/java/com/github/libretube/adapters/CommentsAdapter.kt index 18bb2d5cf..efce52157 100644 --- a/app/src/main/java/com/github/libretube/adapters/CommentsAdapter.kt +++ b/app/src/main/java/com/github/libretube/adapters/CommentsAdapter.kt @@ -14,10 +14,10 @@ import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.RecyclerView import com.github.libretube.MainActivity import com.github.libretube.R -import com.github.libretube.util.formatShort import com.github.libretube.obj.Comment import com.github.libretube.obj.CommentsPage import com.github.libretube.util.RetrofitInstance +import com.github.libretube.util.formatShort import com.squareup.picasso.Picasso import java.io.IOException import kotlinx.coroutines.CoroutineScope diff --git a/app/src/main/java/com/github/libretube/adapters/RepliesAdapter.kt b/app/src/main/java/com/github/libretube/adapters/RepliesAdapter.kt index a282d3a0b..7cd46cfc8 100644 --- a/app/src/main/java/com/github/libretube/adapters/RepliesAdapter.kt +++ b/app/src/main/java/com/github/libretube/adapters/RepliesAdapter.kt @@ -10,8 +10,8 @@ import androidx.core.os.bundleOf import androidx.recyclerview.widget.RecyclerView import com.github.libretube.MainActivity import com.github.libretube.R -import com.github.libretube.util.formatShort import com.github.libretube.obj.Comment +import com.github.libretube.util.formatShort import com.squareup.picasso.Picasso class RepliesAdapter( diff --git a/app/src/main/java/com/github/libretube/adapters/SearchAdapter.kt b/app/src/main/java/com/github/libretube/adapters/SearchAdapter.kt index cebe3ee6e..75fedea49 100644 --- a/app/src/main/java/com/github/libretube/adapters/SearchAdapter.kt +++ b/app/src/main/java/com/github/libretube/adapters/SearchAdapter.kt @@ -14,9 +14,9 @@ import androidx.recyclerview.widget.RecyclerView import com.github.libretube.MainActivity import com.github.libretube.R import com.github.libretube.dialogs.VideoOptionsDialog -import com.github.libretube.util.formatShort import com.github.libretube.fragments.PlayerFragment import com.github.libretube.obj.SearchItem +import com.github.libretube.util.formatShort import com.squareup.picasso.Picasso class SearchAdapter( diff --git a/app/src/main/java/com/github/libretube/adapters/SubscriptionAdapter.kt b/app/src/main/java/com/github/libretube/adapters/SubscriptionAdapter.kt index e14bb89de..0db923b83 100644 --- a/app/src/main/java/com/github/libretube/adapters/SubscriptionAdapter.kt +++ b/app/src/main/java/com/github/libretube/adapters/SubscriptionAdapter.kt @@ -15,9 +15,9 @@ import androidx.recyclerview.widget.RecyclerView import com.github.libretube.MainActivity import com.github.libretube.R import com.github.libretube.dialogs.VideoOptionsDialog -import com.github.libretube.util.formatShort import com.github.libretube.fragments.PlayerFragment import com.github.libretube.obj.StreamItem +import com.github.libretube.util.formatShort import com.squareup.picasso.Picasso class SubscriptionAdapter( diff --git a/app/src/main/java/com/github/libretube/adapters/TrendingAdapter.kt b/app/src/main/java/com/github/libretube/adapters/TrendingAdapter.kt index 34e76b25d..0d223e54d 100644 --- a/app/src/main/java/com/github/libretube/adapters/TrendingAdapter.kt +++ b/app/src/main/java/com/github/libretube/adapters/TrendingAdapter.kt @@ -15,9 +15,9 @@ import androidx.recyclerview.widget.RecyclerView import com.github.libretube.MainActivity import com.github.libretube.R import com.github.libretube.dialogs.VideoOptionsDialog -import com.github.libretube.util.formatShort import com.github.libretube.fragments.PlayerFragment import com.github.libretube.obj.StreamItem +import com.github.libretube.util.formatShort import com.squareup.picasso.Picasso class TrendingAdapter( diff --git a/app/src/main/java/com/github/libretube/fragments/ChannelFragment.kt b/app/src/main/java/com/github/libretube/fragments/ChannelFragment.kt index e2bc2acc5..d7c3fd030 100644 --- a/app/src/main/java/com/github/libretube/fragments/ChannelFragment.kt +++ b/app/src/main/java/com/github/libretube/fragments/ChannelFragment.kt @@ -17,9 +17,9 @@ import androidx.recyclerview.widget.RecyclerView import androidx.swiperefreshlayout.widget.SwipeRefreshLayout import com.github.libretube.R import com.github.libretube.adapters.ChannelAdapter -import com.github.libretube.util.formatShort import com.github.libretube.obj.Subscribe import com.github.libretube.util.RetrofitInstance +import com.github.libretube.util.formatShort import com.google.android.material.button.MaterialButton import com.squareup.picasso.Picasso import java.io.IOException diff --git a/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt b/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt index fc13387fe..e3002e85d 100644 --- a/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt +++ b/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt @@ -48,7 +48,6 @@ import com.github.libretube.adapters.TrendingAdapter import com.github.libretube.dialogs.AddtoPlaylistDialog import com.github.libretube.dialogs.DownloadDialog import com.github.libretube.dialogs.ShareDialog -import com.github.libretube.util.formatShort import com.github.libretube.hideKeyboard import com.github.libretube.obj.PipedStream import com.github.libretube.obj.Segment @@ -58,6 +57,7 @@ import com.github.libretube.obj.Subscribe import com.github.libretube.preferences.SponsorBlockSettings import com.github.libretube.util.CronetHelper import com.github.libretube.util.RetrofitInstance +import com.github.libretube.util.formatShort import com.google.android.exoplayer2.C import com.google.android.exoplayer2.DefaultLoadControl import com.google.android.exoplayer2.ExoPlayer @@ -445,7 +445,8 @@ class PlayerFragment : Fragment() { private fun initializePlayerView(view: View, response: Streams) { view.findViewById(R.id.player_views_info).text = - context?.getString(R.string.views, response.views.formatShort()) + " • " + response.uploadDate + context?.getString(R.string.views, response.views.formatShort()) + + " • " + response.uploadDate view.findViewById(R.id.textLike).text = response.likes.formatShort() val channelImage = view.findViewById(R.id.player_channelImage) Picasso.get().load(response.uploaderAvatar).into(channelImage) From 61053f74a2099f6108c8ed4763817fe4d6132681 Mon Sep 17 00:00:00 2001 From: Eric Date: Tue, 7 Jun 2022 22:39:41 +0000 Subject: [PATCH 006/118] Translated using Weblate (Chinese (Simplified)) Currently translated at 83.5% (117 of 140 strings) Translation: LibreTube/LibreTube Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/zh_Hans/ --- app/src/main/res/values-zh-rCN/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 0f5a3f301..b8ebbcfc7 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -76,7 +76,7 @@ 深色主题 确定 YT Music 歌曲 - 选择首页视频流的栏数 + 网格列 删除播放列表 要删除这个播放列表吗? 创建播放列表 From 30ee294ea39a87c2bb487613c4cee375e7940a72 Mon Sep 17 00:00:00 2001 From: Nizami Date: Wed, 8 Jun 2022 07:24:19 +0000 Subject: [PATCH 007/118] Translated using Weblate (Turkish) Currently translated at 100.0% (141 of 141 strings) Translation: LibreTube/LibreTube Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/tr/ --- app/src/main/res/values-tr/strings.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 7c120013f..66a8d1ee8 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -75,7 +75,7 @@ Varsayılan Sekme Arama filtresi seç Kanal ikonları veya YouTube video kartları göründüğünde. Bilgi ile sonuçlar için değil. - Etkinleştir + Etkinleştirildi Geçmişi Temizle SponsorBlok Kanallar @@ -140,4 +140,5 @@ Uygulamanın istediğiniz gibi görünmesini sağlayın. Oyuncu, İndirilenler, Geçmiş Uygulama Güncellenmesi + Canlı \ No newline at end of file From b28195160683afd3bc1741bfe7c18ff77f0de8da Mon Sep 17 00:00:00 2001 From: Nizami Date: Wed, 8 Jun 2022 07:34:39 +0000 Subject: [PATCH 008/118] Translated using Weblate (Azerbaijani) Currently translated at 100.0% (141 of 141 strings) Translation: LibreTube/LibreTube Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/az/ --- app/src/main/res/values-az/strings.xml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/main/res/values-az/strings.xml b/app/src/main/res/values-az/strings.xml index a4a660fad..7e177a2fd 100644 --- a/app/src/main/res/values-az/strings.xml +++ b/app/src/main/res/values-az/strings.xml @@ -17,7 +17,7 @@ İmtina Daxil oldunuz. Çıxıldı. - Qeydiyyatdan keçibsiz.İndi kanallara abunə ola bilərsiniz. + Qeydiyyatdan keçibsiniz.İndi kanallara abunə ola bilərsiniz. Artıq daxil olmusunuz.İstəsəniz hesabınızdan çıxa bilərsiniz. Zəhmət olmasa daxil olun və yenidən cəhd edin! Ev @@ -122,7 +122,7 @@ Tətbiq Davranışı Endirmələr Video formatı - Endirilmiş videolar video formatına çevrilir (yalnız hər iki audio və video endirildikdə tətbiq edilir). + Endirilmiş videolar video formatına çevrilir (yalnız səs və video birlikdə endirildikdə tətbiq edilir). Endirmə qovluğu Endirdiyiniz medianın saxlandığı qovluq. Tətbiq və onun xüsusiyyətləri haqqında daha çox öyrənmək üçün veb saytımızı ziyarət edin. @@ -132,7 +132,7 @@ İanə Edin Tətbiqi bəyənirsinizsə və işimizi qiymətləndirirsinizsə, ianə etmənizdən məmnun olarıq. Tətbiq Yenilənməsi - Tətbiq Yenilənir + Tətbiq Yenilənib Defolt oynatma sürəti Qabaqcıl Oynadıcı @@ -140,4 +140,5 @@ Oynadıcı, Endirmələr, Tarixçə Yeni tətbiq yeniləməsinin mövcud olub-olmadığını yoxlamaq üçün bura klikləyin. Hazırda yeni yeniləmə mövcud deyil. Bizimlə qalın! + Canlı \ No newline at end of file From 32d17f58856ba91e1fa1a0e60fc8a8a106ef6c6c Mon Sep 17 00:00:00 2001 From: Adithyan sm Date: Wed, 8 Jun 2022 14:22:44 +0000 Subject: [PATCH 009/118] Translated using Weblate (Malayalam) Currently translated at 91.4% (129 of 141 strings) Translation: LibreTube/LibreTube Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/ml/ --- app/src/main/res/values-ml/strings.xml | 72 +++++++++++++++++++++++++- 1 file changed, 70 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-ml/strings.xml b/app/src/main/res/values-ml/strings.xml index 209add405..4c681e9fe 100644 --- a/app/src/main/res/values-ml/strings.xml +++ b/app/src/main/res/values-ml/strings.xml @@ -57,11 +57,79 @@ ചാനലുകൾ എല്ലാം പ്ലേലിസ്റ്റുകൾ - അതെ + ശരി ചരിത്രം തിരയൽ ചരിത്രം ചരിത്രം മായ്ക്കുക - പാട്ടുകൾ + YT സംഗീത ഗാനങ്ങൾ ഉപയോഗിക്കുന്ന എപിഐ https://sponsor.ajay.app/ ലൈസൻസ് + ഇതിനകം ലോഗിൻ ചെയ്തിട്ടുണ്ട്. നിങ്ങളുടെ അക്കൗണ്ടിൽ നിന്ന് നിങ്ങൾക്ക് ലോഗ് ഔട്ട് ചെയ്യാം. + മറ്റൊരു ഡൗൺലോഡ് ഇതിനകം പുരോഗമിക്കുകയാണ്. അത് പൂർത്തിയാകുന്നതുവരെ കാത്തിരിക്കുക. + യൂട്യൂബ് + സെർവറിൽ ഒരു പ്രശ്നമുണ്ട്. മറ്റൊരു ഉദാഹരണം പരീക്ഷിക്കണോ\? + YT മ്യൂസിക് പ്ലേലിസ്റ്റുകൾ + ഇരുണ്ട തീം + ഡിഫോൾട്ട് ടാബ് + അപ്രാപ്തമാക്കി + ലൈവ് + ആപ്പ് ഐക്കൺ + പ്രവർത്തനക്ഷമമാക്കി + നിലവിൽ പുതിയ അപ്‌ഡേറ്റുകളൊന്നും ലഭ്യമല്ല. ഇവിടെത്തന്നെ നിൽക്കുക! + ഡൗൺലോഡുകൾ + വീഡിയോ ഫോർമാറ്റ് + ഒരു പുതിയ അപ്ഡേറ്റ് ലഭ്യമാണ്. GitHub-ലെ അപ്‌ഡേറ്റ് പേജിലേക്ക് റീഡയറക്‌ടുചെയ്യുന്നതിന് ശരി ക്ലിക്കുചെയ്യുക. + നിങ്ങളുടെ ഡൗൺലോഡ് ചെയ്ത മീഡിയ സംഭരിക്കുന്ന ഡയറക്ടറി. + ആപ്പിനെയും അതിന്റെ സവിശേഷതകളെയും കുറിച്ച് കൂടുതലറിയാൻ ഞങ്ങളുടെ വെബ്സൈറ്റ് സന്ദർശിക്കുക. + സംഭാവന ചെയ്യുന്നു + നിങ്ങൾക്ക് ആപ്പ് ഇഷ്‌ടപ്പെടുകയും ഞങ്ങളുടെ പ്രവർത്തനത്തെ അഭിനന്ദിക്കുകയും ചെയ്യുന്നുവെങ്കിൽ, ഒരു സംഭാവനയിൽ ഞങ്ങൾ സന്തുഷ്ടരാണ്. + ദയവായി ആദ്യം ലോഗിൻ ചെയ്യുക അല്ലെങ്കിൽ ക്രമീകരണങ്ങളിൽ രജിസ്റ്റർ ചെയ്യുക. + ഡിഫോൾട്ട് പ്ലേബാക്ക് വേഗത + മുന്നേറി + നിങ്ങൾ ആഗ്രഹിക്കുന്ന രീതിയിൽ ആപ്പ് രൂപപ്പെടുത്തുക. + ഈ സ്ട്രീം ഡൗൺലോഡ് ചെയ്യാൻ കഴിയില്ല. + ഡൗൺലോഡ് പരാജയപ്പെട്ടു. + VLC-യിൽ തുറക്കാൻ കഴിയില്ല. ഇത് ഇൻസ്റ്റാൾ ചെയ്തേക്കില്ല. + സബ്സ്ക്രിപ്ഷനുകൾ ഇറക്കുമതി ചെയ്യുക + YouTube അല്ലെങ്കിൽ NewPipe-ൽ നിന്ന് + നെറ്റ്‌വർക്ക് പിശക്. + നിങ്ങൾ ഒരു ഉപയോക്തൃനാമവും പാസ്‌വേഡും നൽകണം. + ഡിഫോൾട്ട് വീഡിയോ റെസല്യൂഷൻ + ഗ്രിഡ് നിരകൾ + സിസ്റ്റം ഡിഫോൾട്ട് + ലൈറ്റ് തീം + കസ്റ്റമൈസേഷനുകൾ + അഭിപ്രായങ്ങൾ + തിരയൽ ഫിൽട്ടർ തിരഞ്ഞെടുക്കുക + YT സംഗീത വീഡിയോകൾ + YT സംഗീത ആൽബങ്ങൾ + സ്പോൺസർബ്ലോക്ക് + ഒഴിവാക്കിയ സെഗ്‌മെന്റ് + പ്രവർത്തനക്ഷമമാക്കി + സെഗ്‌മെന്റുകൾ + സ്പോൺസർ + പണമടയ്ക്കാത്ത/സ്വയം പ്രമോഷൻ + ഇന്ററാക്ഷൻ റിമൈൻഡർ (സബ്‌സ്‌ക്രൈബ്) + ഇടവേള/ആമുഖ ആനിമേഷൻ + എൻഡ്കാർഡുകൾ/ക്രെഡിറ്റുകൾ + ക്രെഡിറ്റുകൾ അല്ലെങ്കിൽ YouTube എൻഡ്കാർഡുകൾ ദൃശ്യമാകുമ്പോൾ. വിവരങ്ങളുള്ള നിഗമനങ്ങൾക്ക് വേണ്ടിയല്ല. + പശ്ചാത്തലത്തിൽ പ്ലേ ചെയ്യുക + പിക്സൽ ബ്ലൂ + വർണ്ണ ആക്സന്റ് + മഞ്ഞ + ചുവപ്പ് + പച്ച + പർപ്പിൾ + OLED തീം + അറിയിപ്പുകൾ + %1$s പതിപ്പ് ലഭ്യമാണ് + രൂപഭാവം + ആപ്പ് പെരുമാറ്റം + ഡൗൺലോഡ് ഡയറക്ടറി + സംഭാവനചെയ്യുക + ആപ്പ് അപ്ഡേറ്റ് + പുതിയ ആപ്പ് അപ്‌ഡേറ്റ് ലഭ്യമാണോയെന്ന് പരിശോധിക്കാൻ ഇവിടെ ക്ലിക്ക് ചെയ്യുക. + ആപ്പ് അപ് ടു ഡേറ്റ് + പ്ലെയർ + പ്ലെയർ, ഡൗൺലോഡുകൾ, ചരിത്രം \ No newline at end of file From b98d5aa21633788b0058b71c8d29ab22ebf18ffe Mon Sep 17 00:00:00 2001 From: AbsurdUsername Date: Wed, 8 Jun 2022 17:08:15 +0000 Subject: [PATCH 010/118] Translated using Weblate (Italian) Currently translated at 100.0% (141 of 141 strings) Translation: LibreTube/LibreTube Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/it/ --- app/src/main/res/values-it/strings.xml | 27 +++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 8c3904154..a5ab47c85 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -39,7 +39,7 @@ Non c\'è nulla. Elimina la playlist Sei sicuro/a di volerla eliminare\? - Scegli le colonne della griglia + Colonne della griglia Salva Scegli una Regione Sottoscritto @@ -116,4 +116,29 @@ Piped YouTube Riproduci in sfondo + Downloads + Il formato in cui vengono convertiti i video scaricati (viene applicato solo se entrambi, audio e video, vengono scaricati). + Formato video + Lettore, Downloads, Cronologia + La versione %1$s è disponibile + C\'è una nuova versione disponibile. Clicca okay per essere reindirizzato alla pagina dell\'aggiornamento su GitHub. + Aspetto + Comportamento App + Cartella download + La cartella dove i tuoi contenuti scaricati vengono memorizzati. + Visita il nostro sito per saperne di più sull\'app e le sue funzionalità. + Collabora + Che tu abbia idee, traduzioni, modifiche di design, pulizia del codice o modifiche del codice pesanti, l\'aiuto è sempre benvenuto. Più si fa, meglio è! + La GNU General Public License è una licenza libera, copyleft per software e altri tipi di lavori. + Dona + Se ti piace l\'app e apprezzi il nostro lavoro saremmo felici di ricevere una donazione. + Aggiornamento app + Clicca qui per verificare se è disponibile un nuovo aggiornamento dell\'app. + App aggiornata + Al momento non ci sono nuovi aggiornamenti disponibili.Restate sintonizzati! + Velocità di riproduzione predefinita + Avanzate + Lettore + Personalizza l\'app come vuoi tu. + Dal Vivo \ No newline at end of file From 531ede10f1e44c442c817c9f14963d78266d2dba Mon Sep 17 00:00:00 2001 From: Yaron Shahrabani Date: Thu, 9 Jun 2022 05:15:06 +0200 Subject: [PATCH 011/118] Added translation using Weblate (Hebrew) --- app/src/main/res/values-iw/strings.xml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 app/src/main/res/values-iw/strings.xml diff --git a/app/src/main/res/values-iw/strings.xml b/app/src/main/res/values-iw/strings.xml new file mode 100644 index 000000000..a6b3daec9 --- /dev/null +++ b/app/src/main/res/values-iw/strings.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file From 683a6d75b642b3763dd601b2a5560423987d764c Mon Sep 17 00:00:00 2001 From: "J. Lavoie" Date: Wed, 8 Jun 2022 21:49:20 +0000 Subject: [PATCH 012/118] Translated using Weblate (German) Currently translated at 99.2% (140 of 141 strings) Translation: LibreTube/LibreTube Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/de/ --- app/src/main/res/values-de/strings.xml | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 3ee96dc51..57518fa01 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -117,5 +117,27 @@ YouTube Im Hintergrund abspielen Version %1$s ist verfügbar - Es ist ein neues Update verfügbar. Klicken Sie auf \"OK\", um zur Aktualisierungsseite auf GitHub weitergeleitet zu werden. + Es ist eine neue Version verfügbar. Klicken Sie auf „OK“, um zur Aktualisierungsseite auf GitHub weitergeleitet zu werden. + Player, Herunterladen, Verlauf + Aussehen + Anwendungsverhalten + Datenübertagungen + Videoformat + Das Videoformat in welches heruntergeladene Videos konvertiert werden (nur wenn Audio und Video heruntergeladen werden). + Downloadverzeichnis + Das Verzeichnis in welches deine heruntergeladenen Dateien gespeichert werden. + Besuche unsere Website, um mehr über die Anwendung und ihre Funktionen zu lernen. + Egal, ob du Ideen, Übersetzungen, Designänderungen, Codebereinigung oder wirklich schwerwiegende Codeänderungen hast, Hilfe ist immer willkommen. Je mehr getan wird, desto besser wird es! + Die GNU General Public License ist eine freie Copyleft-Lizenz für Software und andere Arten von Werken. + Spenden + Wenn dir die Anwendung gefällt und du unsere Arbeit schätzest, würden wir uns über eine Spende freuen. + App-Aktualisierung + Klicke hier, um zu prüfen, ob eine neue Version verfügbar ist. + App auf dem neuesten Stand + Derzeit ist keine neue Version verfügbar. Bleibe dran! + Standard-Wiedergabegeschwindigkeit + Fortgeschrittene + Player + Gestalte die App so, wie du es wünschst. + Live \ No newline at end of file From 44eb6bf802fc3c0e1239c2977591459860957fd6 Mon Sep 17 00:00:00 2001 From: "J. Lavoie" Date: Wed, 8 Jun 2022 21:50:16 +0000 Subject: [PATCH 013/118] Translated using Weblate (Italian) Currently translated at 100.0% (141 of 141 strings) Translation: LibreTube/LibreTube Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/it/ --- app/src/main/res/values-it/strings.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index a5ab47c85..0776326cc 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -116,15 +116,15 @@ Piped YouTube Riproduci in sfondo - Downloads + Scaricamenti Il formato in cui vengono convertiti i video scaricati (viene applicato solo se entrambi, audio e video, vengono scaricati). Formato video - Lettore, Downloads, Cronologia + Lettore, scaricamenti, cronologia La versione %1$s è disponibile - C\'è una nuova versione disponibile. Clicca okay per essere reindirizzato alla pagina dell\'aggiornamento su GitHub. + C\'è una nuova versione disponibile. Clicca OK per essere reindirizzato alla pagina dell\'aggiornamento su GitHub. Aspetto - Comportamento App - Cartella download + Comportamento app + Cartella scaricamento La cartella dove i tuoi contenuti scaricati vengono memorizzati. Visita il nostro sito per saperne di più sull\'app e le sue funzionalità. Collabora @@ -135,10 +135,10 @@ Aggiornamento app Clicca qui per verificare se è disponibile un nuovo aggiornamento dell\'app. App aggiornata - Al momento non ci sono nuovi aggiornamenti disponibili.Restate sintonizzati! + Al momento non ci sono nuovi aggiornamenti disponibili. Restate sintonizzati! Velocità di riproduzione predefinita Avanzate Lettore Personalizza l\'app come vuoi tu. - Dal Vivo + Dal vivo \ No newline at end of file From 4c4bf14d2d1ea9e4faec447202dc3cc13e0fc528 Mon Sep 17 00:00:00 2001 From: "J. Lavoie" Date: Wed, 8 Jun 2022 21:57:02 +0000 Subject: [PATCH 014/118] Translated using Weblate (French) Currently translated at 100.0% (141 of 141 strings) Translation: LibreTube/LibreTube Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/fr/ --- app/src/main/res/values-fr/strings.xml | 27 +++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 4ed96167f..c5d60ff93 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -43,7 +43,7 @@ Ajouter à la liste de lecture Succès ! Échec :( - Choisissez les colonnes de la grille + Colonnes de la grille Il n\'y a rien ici. Supprimer la liste de lecture Voulez-vous supprimer cette liste de lecture \? @@ -116,4 +116,29 @@ Piped YouTube Lecture en arrière-plan + Que vous ayez des idées, des traductions, des modifications de conception, des nettoyages de code, ou de véritables changements de code lourds, l\'aide est toujours la bienvenue. Plus on en fait, mieux c\'est ! + Visitez notre site web pour en savoir plus sur l\'application et ses fonctionnalités. + Si vous aimez l\'application et appréciez notre travail, nous serions heureux de votre don. + Contribution + Faire un don + Lecteur, téléchargements, historique + Le format vidéo vers lequel les vidéos téléchargées sont converties (ne s\'applique que si les deux formats, audio et vidéo, sont téléchargés). + Le répertoire dans lequel vos médias téléchargés sont stockés. + La licence publique générale GNU est une licence libre, avec gauche d\'auteur, pour les logiciels et autres types d\'œuvres. + La version %1$s est disponible + Il y a une nouvelle mise à jour disponible. Cliquez sur OK pour être redirigé vers la page de mise à jour sur GitHub. + Apparence + Comportement de l\'appli + Téléchargements + Format vidéo + Répertoire de téléchargement + Mise à jour de l\'appli + Cliquez ici pour vérifier si une nouvelle mise à jour de l\'application est disponible. + L\'application est à jour + Il n\'y a actuellement aucune nouvelle mise à jour disponible. Restez à l\'affût ! + Vitesse de lecture par défaut + Avancé + Lecteur + Donnez à l\'application l\'aspect que vous souhaitez. + En direct \ No newline at end of file From f81fe5a853ef3a07762245bc71a80cfe63b110e4 Mon Sep 17 00:00:00 2001 From: Yaron Shahrabani Date: Thu, 9 Jun 2022 03:28:33 +0000 Subject: [PATCH 015/118] Translated using Weblate (Hebrew) Currently translated at 98.5% (139 of 141 strings) Translation: LibreTube/LibreTube Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/he/ --- app/src/main/res/values-iw/strings.xml | 142 ++++++++++++++++++++++++- 1 file changed, 141 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-iw/strings.xml b/app/src/main/res/values-iw/strings.xml index a6b3daec9..c4fe60f6f 100644 --- a/app/src/main/res/values-iw/strings.xml +++ b/app/src/main/res/values-iw/strings.xml @@ -1,2 +1,142 @@ - \ No newline at end of file + + התאמה + כחול פיקסלים + חיפוש + סרטונים + רישום + הסרת רישום + שיתוף + ביטול + נכנסת. + יצאת. + בחירת עותק + הוספת עותק אחר + כניסה/הרשמה + עליך להירשם לכמה ערוצים תחילה. + מ־YouTube או NewPipe + ערכת עיצוב + יש תקלה עם השרת. לנסות עותק אחר\? + משהו השתבש. + עליך למלא שם משתמש וסיסמה. + זה לא חשבון ה־Gmail שלך. + עמודות רשת + יצירת רשימת נגינה + שם רשימת הנגינה + שם רשימת הנגינה לא יכול להישאר ריק + הוספה לרשימת נגינה + הצליח! + נכשל :( + על אודות + ערכת עיצוב בהירה + %1$s מנויים + הערות + בחירת מסנן חיפוש + ערוצים + הכול + רשימות נגינה + אישור + היסטוריה + חיפוש בהיסטוריה + פינוי ההיסטוריה + שירים מ־YT Music + סרטונים מ־YT Music + אלבומים מ־YT Music + רשימות נגינה מ־YT Music + לשונית ברירת מחדל + קידום ממומן, הפניות בתשלום ופרסום ישיר. לא למטרות קידום עצמי או הוקרה של מטרות/יוצרים/אתרים/מוצרים אהובים עליהם. + תזכורת אינטראקציה (רישום מינוי) + כרטיסי סיום/קרדיטים + קרדיטים או כאשר כרטיסי הסיום של YouTube מופיעים. לא למסקנות עם מידע. + רישיון + צבע משני + אדום + צהוב + ירוק + סגול + ערכת עיצוב ל־OLED + התראות + סמל יישום + מופעל + ניגון ברקע + יש עדכון חדש זמין. יש ללחוץ על אישור כדי לעבור לעמוד העדכון ב־GitHub. + מראה + התנהגות היישום + תצורת סרטונים + תיקיית הורדות + התיקייה בה יאוחסנו פריטי המדינה שבחרת להוריד. + אפשר לבקר באתר שלנו כדי ללמוד עוד על היישום והיכולות שלו. + תרומה + הרישיון הציבורי הכללי של גנו הוא רישיון חופשי ומתירני לתוכנה ולסוגים נוספים של יצירות. + לחיצה כאן תבדוק אם יש עדכון חדש ליישומון. + נגן + ספרייה + סיסמה + הרשמה + חי + בית + נא להיכנס או להירשם דרך ההגדרות תחילה. + נרשמת + לא ניתן להוריד את התזרים הזה. + לא ניתן לפתוח ב־VLC. אולי הוא לא מותקן. + אין כאן כלום. + שפת המערכת + מינויים + כן + בחירת איכות: + כניסה + יציאה + ההורדה הושלמה. + פתיחה ב־VLC + משתמש ב־API שב־https://sponsor.ajay.app/‎ + מופעל + YouTube + הורדה + שם משתמש + ההרשמה הצליחה. עכשיו אפשר להירשם למינוי לערוצים. + נא להיכנס ולנסות שוב! + שמירה + בחירת אזור + הורדה אחרת כבר מתבצעת. נא להמתין לסיומה. + ההורדה נכשלה. + ייבוא מינויים + ברירת המחדל של המערכת + הגדרות + מקום + כבר נכנסת. אפשר גם לצאת מהחשבון שלך. + שגיאת רשת. + רזולוציית ברירת המחדל לסרטונים + מחיקת רשימת נגינה + למחוק את רשימת הנגינה\? + נוצרה רשימת נגינה! + החלפת שפה + ערכת עיצוב כהה + עותק + %1$s סרטונים + כשיש תזכורת קצרה לעשות לייק, להירשם למינוי או לעקוב אחריהם באמצע התוכן. אם זה ארוך או על משהו מסוים, זה אמור להיות תחת קידום עצמי במקום. + אתר + אין חיבור לאינטרנט + לנסות שוב + חסימת מממנים + מקטעים + Material You + גרסה %1$s זמינה כעת + מקטע שדולג + מממן + קידום לא בתשלום/עצמי + מושבת + Piped + הורדות + תצורת הסרטונים אליה מומרים הסרטונים שבחרת להוריד (חל רק אם מורידים שמע וסרטון). + תרומה + אין עדכון חדש זמין. נשמור על קשר! + אם אהבת את היישומון והעבודה שלנו מוערכת בעיניך נשמח לתרומה. + עדכון היישומון + נגן, הורדות, היסטוריה + היישומון עדכני + מהירות נגינה כברירת מחדל + מתקדם + לשנות את מראה היישומון לטעמך. + פרק זמן ללא תוכן ממשי. יכולה להיות השהייה, תמונה ללא תזוזה, הנפשה מחזורית. אסור להשתמש בזה למעברונים שמכילים מידע. + אם יש לך רעיונות, תרגומים, שינויים בעיצוב, ניקוי קוד או שינויי קוד מעמיקים, נשמח לקבל עזרה. ככל שיותר נעשה כך היישומון משתפר יותר! + \ No newline at end of file From 5ec0e75354e93e3f2e3ccded4379aaf96aafc49d Mon Sep 17 00:00:00 2001 From: AbsurdUsername Date: Thu, 9 Jun 2022 08:24:43 +0000 Subject: [PATCH 016/118] Translated using Weblate (Italian) Currently translated at 100.0% (144 of 144 strings) Translation: LibreTube/LibreTube Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/it/ --- app/src/main/res/values-it/strings.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 0776326cc..f9bfaa674 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -141,4 +141,7 @@ Lettore Personalizza l\'app come vuoi tu. Dal vivo + Autori + Questo commento non ha risposte. + Scopri chi c\'è dietro il Team di LibreTube e fa la magia. \ No newline at end of file From 7f6e274de963b387f606b21a48b262420079ee81 Mon Sep 17 00:00:00 2001 From: hands8142 Date: Thu, 9 Jun 2022 09:04:29 +0000 Subject: [PATCH 017/118] Translated using Weblate (Korean) Currently translated at 100.0% (144 of 144 strings) Translation: LibreTube/LibreTube Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/ko/ --- app/src/main/res/values-ko/strings.xml | 30 +++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-ko/strings.xml b/app/src/main/res/values-ko/strings.xml index a1627b4e1..61f5f9948 100644 --- a/app/src/main/res/values-ko/strings.xml +++ b/app/src/main/res/values-ko/strings.xml @@ -35,7 +35,7 @@ 서버에 문제가 발생했습니다. 다른 인스턴스를 시도할까요\? 네트워크 오류. 사용자 이름과 암호를 입력해야 합니다. - 그리드 열 선택 + 그리드 열 아무것도 없습니다. 플레이리스트 삭제 이 플레이리스트를 삭제하시겠습니까\? @@ -116,4 +116,32 @@ YouTube 백그라운드에서 재생 Piped + 저자 + 다운로드한 비디오 형식은 다음으로 변환됩니다(오디오와 비디오가 모두 다운로드된 경우에만 적용됨). + 원하는 모양으로 앱을 만드십시오. + 이 댓글에는 답글이 없습니다. + Team LibreTube 뒤에 누가 있고 마술을 펼치는지 알아보세요. + %1$s 버전 사용 가능 + 새로운 업데이트가 있습니다. 확인을 클릭하면 GitHub의 업데이트 페이지로 리디렉션됩니다. + 앱 동작 + 모양 + 다운로드 + 비디오 형식 + 다운로드 경로 + 다운로드한 미디어가 저장되는 경로입니다. + 앱과 기능에 대해 자세히 알아보려면 웹 사이트를 방문하십시오. + 기여 + 아이디어, 번역, 디자인 변경, 코드 정리 또는 실제 코드 변경, 무엇이든 도움은 언제나 환영합니다. 더 많이 할 수록 더 좋습니다! + GNU General Public License는 소프트웨어 및 기타 종류의 작업에 대한 무료 카피레프트 라이센스입니다. + 기부 + 앱이 마음에 드시고 저희의 작업에 감사를 표한다면 기부에 대해 기쁘게 생각합니다. + 앱 업데이트 + 사용 가능한 새 앱 업데이트가 있는지 확인하려면 여기를 클릭하세요. + 최신 앱 + 현재 사용할 수 있는 새 업데이트가 없습니다. 계속 지켜봐 주세요! + 기본 재생 속도 + 고급 + 플레이어 + 플레이어, 다운로드, 기록 + 실시간 \ No newline at end of file From ace1e9512c6bd7ff3150184d3a9ca877314972fe Mon Sep 17 00:00:00 2001 From: "J. Lavoie" Date: Thu, 9 Jun 2022 11:37:43 +0000 Subject: [PATCH 018/118] Translated using Weblate (German) Currently translated at 98.6% (142 of 144 strings) Translation: LibreTube/LibreTube Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/de/ --- app/src/main/res/values-de/strings.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 57518fa01..b611539b3 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -140,4 +140,8 @@ Player Gestalte die App so, wie du es wünschst. Live + Dieser Kommentar hat keine Antworten. + Autoren + Finde heraus, wer hinter dem Team LibreTube steckt und die Magie ausübt. + Beitragen \ No newline at end of file From e5d0d93851c121aaaaa1244d902763e85fbef32b Mon Sep 17 00:00:00 2001 From: "J. Lavoie" Date: Thu, 9 Jun 2022 11:38:17 +0000 Subject: [PATCH 019/118] Translated using Weblate (Italian) Currently translated at 100.0% (144 of 144 strings) Translation: LibreTube/LibreTube Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/it/ --- app/src/main/res/values-it/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index f9bfaa674..c1f597604 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -143,5 +143,5 @@ Dal vivo Autori Questo commento non ha risposte. - Scopri chi c\'è dietro il Team di LibreTube e fa la magia. + Scopri chi c\'è dietro il team di LibreTube e fa la magia. \ No newline at end of file From 06ab69848bcdea03be4874327f4d35b1394a150a Mon Sep 17 00:00:00 2001 From: "J. Lavoie" Date: Thu, 9 Jun 2022 11:36:31 +0000 Subject: [PATCH 020/118] Translated using Weblate (French) Currently translated at 100.0% (144 of 144 strings) Translation: LibreTube/LibreTube Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/fr/ --- app/src/main/res/values-fr/strings.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index c5d60ff93..668f87519 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -141,4 +141,7 @@ Lecteur Donnez à l\'application l\'aspect que vous souhaitez. En direct + Ce commentaire n\'a pas de réponse. + Auteurs + Découvrez qui se cache derrière l\'équipe LibreTube et fait des merveilles. \ No newline at end of file From 73ed7d6d9fabd2906617400daf59280fa0378732 Mon Sep 17 00:00:00 2001 From: Nizami Date: Thu, 9 Jun 2022 08:31:56 +0000 Subject: [PATCH 021/118] Translated using Weblate (Turkish) Currently translated at 100.0% (144 of 144 strings) Translation: LibreTube/LibreTube Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/tr/ --- app/src/main/res/values-tr/strings.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 66a8d1ee8..fd72caa1f 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -141,4 +141,7 @@ Oyuncu, İndirilenler, Geçmiş Uygulama Güncellenmesi Canlı + Bu yoruma cevap yok. + Yazarlar + LibreTube Ekipinin arkasında kimin olduğunu ve sihri kimin yapdığını öğrenin. \ No newline at end of file From 3da44d6241cf0c84a3b9f334f21ac21d23c5a1fb Mon Sep 17 00:00:00 2001 From: "J. Lavoie" Date: Thu, 9 Jun 2022 11:40:08 +0000 Subject: [PATCH 022/118] Translated using Weblate (Finnish) Currently translated at 70.8% (102 of 144 strings) Translation: LibreTube/LibreTube Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/fi/ --- app/src/main/res/values-fi/strings.xml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml index c0b5c26ea..23bfac0cf 100644 --- a/app/src/main/res/values-fi/strings.xml +++ b/app/src/main/res/values-fi/strings.xml @@ -24,7 +24,7 @@ Tilattu Lataus on valmis. Lataus epäonnistui. - Ei voi avata VLC:ssä. Ehkä sitä ei ole vielä asennettu\? + Ei voi avata VLC:ssä. Sitä ei ehkä ole asennettu. Palvelin vastasi ongelmaan. Ehkä kokeile toista instanssia\? Käyttäjätunnus ja salasana eivät voi olla tyhjiä. Tämä ei ole Gmail-tilisi. @@ -92,4 +92,16 @@ Violetti OLED-teema Ilmoitukset + Tekijät + Tähän kommenttiin ei ole vastauksia. + Versio %1$s on saatavilla. + Ulkonäkö + Lataukset + Videoformaatti + Sovellus ajan tasalla + Lahjoita + Soitin, lataukset, historia + Tee sovelluksesta haluamasi näköinen. + Edistynyt + Live \ No newline at end of file From f7f0dc66e034ca9d9705bf8f0e850485838aa2ee Mon Sep 17 00:00:00 2001 From: Nizami Date: Thu, 9 Jun 2022 08:15:40 +0000 Subject: [PATCH 023/118] Translated using Weblate (Azerbaijani) Currently translated at 100.0% (144 of 144 strings) Translation: LibreTube/LibreTube Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/az/ --- app/src/main/res/values-az/strings.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/res/values-az/strings.xml b/app/src/main/res/values-az/strings.xml index 7e177a2fd..8a601e46a 100644 --- a/app/src/main/res/values-az/strings.xml +++ b/app/src/main/res/values-az/strings.xml @@ -141,4 +141,7 @@ Yeni tətbiq yeniləməsinin mövcud olub-olmadığını yoxlamaq üçün bura klikləyin. Hazırda yeni yeniləmə mövcud deyil. Bizimlə qalın! Canlı + Müəlliflər + LibreTube Komandasının arxasında kimin olduğunu və sehri kimin etdiyini öyrənin. + Bu şərhə cavab yoxdur. \ No newline at end of file From 1a45c122c19dda978d7fd4cc83124cce98aa5c29 Mon Sep 17 00:00:00 2001 From: Yaron Shahrabani Date: Thu, 9 Jun 2022 08:26:06 +0000 Subject: [PATCH 024/118] Translated using Weblate (Hebrew) Currently translated at 100.0% (144 of 144 strings) Translation: LibreTube/LibreTube Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/he/ --- app/src/main/res/values-iw/strings.xml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-iw/strings.xml b/app/src/main/res/values-iw/strings.xml index c4fe60f6f..feec288da 100644 --- a/app/src/main/res/values-iw/strings.xml +++ b/app/src/main/res/values-iw/strings.xml @@ -117,12 +117,12 @@ אתר אין חיבור לאינטרנט לנסות שוב - חסימת מממנים + חסימת חסות מקטעים Material You גרסה %1$s זמינה כעת מקטע שדולג - מממן + נותן חסות קידום לא בתשלום/עצמי מושבת Piped @@ -139,4 +139,9 @@ לשנות את מראה היישומון לטעמך. פרק זמן ללא תוכן ממשי. יכולה להיות השהייה, תמונה ללא תזוזה, הנפשה מחזורית. אסור להשתמש בזה למעברונים שמכילים מידע. אם יש לך רעיונות, תרגומים, שינויים בעיצוב, ניקוי קוד או שינויי קוד מעמיקים, נשמח לקבל עזרה. ככל שיותר נעשה כך היישומון משתפר יותר! + דומה ל„נותן חסות” למעט קידום עצמי ללא תשלום. לרבות סעיפים על אביזרים ממותגים, תרומות או מידע על שיתופי פעולה. + הפוגה/הנפשת הקדמה + יוצרים + כאן מופיעים אלו שעומדים מאחורי LibreTube ועושים את הקסם. + להערה זו אין תגובות. \ No newline at end of file From abc8faffaadba9d1c420f3dc5d3155dab1522473 Mon Sep 17 00:00:00 2001 From: Zeref Date: Thu, 9 Jun 2022 19:09:43 +0200 Subject: [PATCH 025/118] Added translation using Weblate (Vietnamese) --- app/src/main/res/values-vi/strings.xml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 app/src/main/res/values-vi/strings.xml diff --git a/app/src/main/res/values-vi/strings.xml b/app/src/main/res/values-vi/strings.xml new file mode 100644 index 000000000..a6b3daec9 --- /dev/null +++ b/app/src/main/res/values-vi/strings.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file From 3cdbde7649cf621f53626c5f81fe346fe312ff75 Mon Sep 17 00:00:00 2001 From: "J. Lavoie" Date: Thu, 9 Jun 2022 16:19:08 +0000 Subject: [PATCH 026/118] Translated using Weblate (German) Currently translated at 98.6% (150 of 152 strings) Translation: LibreTube/LibreTube Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/de/ --- app/src/main/res/values-de/strings.xml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index b611539b3..82f947c0e 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -124,8 +124,8 @@ Datenübertagungen Videoformat Das Videoformat in welches heruntergeladene Videos konvertiert werden (nur wenn Audio und Video heruntergeladen werden). - Downloadverzeichnis - Das Verzeichnis in welches deine heruntergeladenen Dateien gespeichert werden. + Download-Speicherort + Der Ort, an dem Ihre heruntergeladenen Medien gespeichert werden. Besuche unsere Website, um mehr über die Anwendung und ihre Funktionen zu lernen. Egal, ob du Ideen, Übersetzungen, Designänderungen, Codebereinigung oder wirklich schwerwiegende Codeänderungen hast, Hilfe ist immer willkommen. Je mehr getan wird, desto besser wird es! Die GNU General Public License ist eine freie Copyleft-Lizenz für Software und andere Arten von Werken. @@ -144,4 +144,12 @@ Autoren Finde heraus, wer hinter dem Team LibreTube steckt und die Magie ausübt. Beitragen + Verzeichnisname + Der Name des Verzeichnisses, in dem die heruntergeladenen Medien gespeichert werden. + SD-Karte + Interner Speicher + Musikverzeichnis + URL teilen an: + Download-Verzeichnis + Filmverzeichnis \ No newline at end of file From 33ff93eb03e54934e413c1a70a352a4aec4d0cc2 Mon Sep 17 00:00:00 2001 From: "J. Lavoie" Date: Thu, 9 Jun 2022 16:22:25 +0000 Subject: [PATCH 027/118] Translated using Weblate (Italian) Currently translated at 100.0% (152 of 152 strings) Translation: LibreTube/LibreTube Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/it/ --- app/src/main/res/values-it/strings.xml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index c1f597604..2e2edebda 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -124,8 +124,8 @@ C\'è una nuova versione disponibile. Clicca OK per essere reindirizzato alla pagina dell\'aggiornamento su GitHub. Aspetto Comportamento app - Cartella scaricamento - La cartella dove i tuoi contenuti scaricati vengono memorizzati. + Posizione di scaricamento + La posizione in cui vengono memorizzati i media scaricati. Visita il nostro sito per saperne di più sull\'app e le sue funzionalità. Collabora Che tu abbia idee, traduzioni, modifiche di design, pulizia del codice o modifiche del codice pesanti, l\'aiuto è sempre benvenuto. Più si fa, meglio è! @@ -144,4 +144,12 @@ Autori Questo commento non ha risposte. Scopri chi c\'è dietro il team di LibreTube e fa la magia. + Directory degli scaricamenti + Scheda SD + Directory musicale + Condividi l\'URL a: + Nome della directory + Il nome della directory in cui vengono memorizzati i media scaricati. + Memoria interna + Directory dei film \ No newline at end of file From a9d86161059e065a78808b09752c05918b009676 Mon Sep 17 00:00:00 2001 From: "J. Lavoie" Date: Thu, 9 Jun 2022 16:17:53 +0000 Subject: [PATCH 028/118] Translated using Weblate (French) Currently translated at 100.0% (152 of 152 strings) Translation: LibreTube/LibreTube Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/fr/ --- app/src/main/res/values-fr/strings.xml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 668f87519..e91aaf03c 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -123,7 +123,7 @@ Faire un don Lecteur, téléchargements, historique Le format vidéo vers lequel les vidéos téléchargées sont converties (ne s\'applique que si les deux formats, audio et vidéo, sont téléchargés). - Le répertoire dans lequel vos médias téléchargés sont stockés. + L\'emplacement où vos médias téléchargés sont stockés. La licence publique générale GNU est une licence libre, avec gauche d\'auteur, pour les logiciels et autres types d\'œuvres. La version %1$s est disponible Il y a une nouvelle mise à jour disponible. Cliquez sur OK pour être redirigé vers la page de mise à jour sur GitHub. @@ -131,7 +131,7 @@ Comportement de l\'appli Téléchargements Format vidéo - Répertoire de téléchargement + Emplacement de téléchargement Mise à jour de l\'appli Cliquez ici pour vérifier si une nouvelle mise à jour de l\'application est disponible. L\'application est à jour @@ -144,4 +144,12 @@ Ce commentaire n\'a pas de réponse. Auteurs Découvrez qui se cache derrière l\'équipe LibreTube et fait des merveilles. + Carte SD + Le nom du répertoire dans lequel les médias téléchargés sont stockés. + Nom du répertoire + Stockage interne + Répertoire des téléchargements + Répertoire de musique + Partager l\'URL vers : + Répertoire de films \ No newline at end of file From 2435d691a3cfaffa6486482026e7a1e2921dd1e7 Mon Sep 17 00:00:00 2001 From: Nizami Date: Thu, 9 Jun 2022 13:07:21 +0000 Subject: [PATCH 029/118] Translated using Weblate (Turkish) Currently translated at 100.0% (152 of 152 strings) Translation: LibreTube/LibreTube Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/tr/ --- app/src/main/res/values-tr/strings.xml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index fd72caa1f..c553203a1 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -102,8 +102,8 @@ YT Müzik Oynatma Listeleri Lisans Vurgu Rengi - OLED - Materyal You + OLED Tema + Kendi Tasarımı Yeşil Mor Sarı @@ -123,8 +123,8 @@ İndirilenler Video formatı İndirilen videoların dönüştürüldüğü video formatı (yalnızca hem ses hem de video indirilirse geçerlidir). - İndirme dizini - İndirdiğiniz medyanın depolandığı dizin. + İndirme konumu + İndirdiğiniz medyanın depolandığı konum. Katkı GNU Genel Kamu Lisansı, yazılım ve diğer çalışma türleri için ücretsiz, genel bir lisanstır. Bağış Yapın @@ -138,10 +138,18 @@ Gelişmiş Oynatıcı Uygulamanın istediğiniz gibi görünmesini sağlayın. - Oyuncu, İndirilenler, Geçmiş + Oynatıcı, İndirilenler, Geçmiş Uygulama Güncellenmesi Canlı Bu yoruma cevap yok. Yazarlar LibreTube Ekipinin arkasında kimin olduğunu ve sihri kimin yapdığını öğrenin. + Dahili depolama + İndirilen medya adı ile bir klasörde saklanır. + Filmler dizini + URL\'yi Paylaşın: + Dizin adı + İndirilenler dizini + Hafıza kartı + Müzik dizini \ No newline at end of file From 9747c58ad3d5f58fb1e2c2ba61317b97df87ace6 Mon Sep 17 00:00:00 2001 From: IceDBorn Date: Thu, 9 Jun 2022 17:28:47 +0000 Subject: [PATCH 030/118] Translated using Weblate (Greek) Currently translated at 100.0% (152 of 152 strings) Translation: LibreTube/LibreTube Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/el/ --- app/src/main/res/values-el/strings.xml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml index 08be34025..9e8f24b76 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -123,8 +123,8 @@ Λήψεις Μορφή βίντεο Η μορφή βίντεο στην οποία μετατρέπονται τα κατεβασμένα βίντεο (εφαρμόζεται μόνο αν ο ήχος και το βίντεο έχουν κατέβει). - Φάκελος λήψεων - Ο φάκελος στον οποίο τα κατεβασμένα αρχεία αποθηκεύονται. + Τοποθεσία λήψεων + Η τοποθεσία στην οποία τα κατεβασμένα αρχεία αποθηκεύονται. Επισκεφθείτε την ιστοσελίδα μας για να μάθετε περισσότερα περί της εφαρμογής και των δυνατοτήτων της. Η Γενική Δημόσια Άδεια GNU είναι μια δωρεάν, ανοιχτή προς αντιγραφή άδεια για λογισμικό και άλλα είδη έργων. Συνεισφορά @@ -140,4 +140,16 @@ Η εφαρμογή είναι ενημερωμένη Για προχωρημένους Αναπαραγωγέας, Λήψεις, Ιστορικό + Συγγραφείς + Μάθετε ποιος βρίσκεται πίσω από την ομάδα του LibreTube και κάνει τα μαγικά. + Όνομα φακέλου + Εσωτερικός χώρος + Κάρτα SD + Φάκελος μουσικής + Φάκελος ταινιών + Κοινή χρήση URL σε: + Φάκελος λήψεων + Αυτό το σχόλιο δεν έχει απαντήσεις. + Το όνομα του φακέλου στον οποίο τα κατεβασμένα αρχεία αποθηκεύονται. + Ζωντανά \ No newline at end of file From 8d4b91b49950bdc125122a7804a2a5f8d5a39afc Mon Sep 17 00:00:00 2001 From: Nizami Date: Thu, 9 Jun 2022 12:52:57 +0000 Subject: [PATCH 031/118] Translated using Weblate (Azerbaijani) Currently translated at 100.0% (152 of 152 strings) Translation: LibreTube/LibreTube Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/az/ --- app/src/main/res/values-az/strings.xml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/app/src/main/res/values-az/strings.xml b/app/src/main/res/values-az/strings.xml index 8a601e46a..4b150fd47 100644 --- a/app/src/main/res/values-az/strings.xml +++ b/app/src/main/res/values-az/strings.xml @@ -117,14 +117,14 @@ YouTube Arxa Fonda Oynat %1$s Versiyası Mövcuddur - Yeni yeniləmə mövcuddur. GitHub-da yeniləmə səhifəsinə yönləndirilmək üçün oldu düyməsini klikləyin. + Yeni yeniləmə mövcuddur. GitHub\'da yeniləmə səhifəsinə yönləndirilmək üçün oldu düyməsini klikləyin. Görünüş Tətbiq Davranışı Endirmələr Video formatı Endirilmiş videolar video formatına çevrilir (yalnız səs və video birlikdə endirildikdə tətbiq edilir). - Endirmə qovluğu - Endirdiyiniz medianın saxlandığı qovluq. + Endirmə yeri + Endirdiyiniz medianın saxlandığı yer. Tətbiq və onun xüsusiyyətləri haqqında daha çox öyrənmək üçün veb saytımızı ziyarət edin. Töhfə İdeyalarınız, tərcümələriniz, dizayn dəyişiklikləriniz, kodun təmizlənməsi və ya real ağır kod dəyişiklikləriniz olsun, kömək həmişə xoşdur. Nə qədər çox edilsə, bir o qədər yaxşı olar! @@ -144,4 +144,12 @@ Müəlliflər LibreTube Komandasının arxasında kimin olduğunu və sehri kimin etdiyini öyrənin. Bu şərhə cavab yoxdur. + Endirmələr qovluğu + Musiqi qovluğu + Filmlər qovluğu + URL Paylaşın: + Qovluq adı + SD kart + Daxili yaddaş + Endirilmiş media, adı ilə qovluqda saxlanılır. \ No newline at end of file From 3cbc2fdc0401df026f7a35fcdd07dc108024fc75 Mon Sep 17 00:00:00 2001 From: Adithyan sm Date: Thu, 9 Jun 2022 14:27:54 +0000 Subject: [PATCH 032/118] Translated using Weblate (Malayalam) Currently translated at 96.0% (146 of 152 strings) Translation: LibreTube/LibreTube Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/ml/ --- app/src/main/res/values-ml/strings.xml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-ml/strings.xml b/app/src/main/res/values-ml/strings.xml index 4c681e9fe..f159cba32 100644 --- a/app/src/main/res/values-ml/strings.xml +++ b/app/src/main/res/values-ml/strings.xml @@ -79,7 +79,7 @@ ഡൗൺലോഡുകൾ വീഡിയോ ഫോർമാറ്റ് ഒരു പുതിയ അപ്ഡേറ്റ് ലഭ്യമാണ്. GitHub-ലെ അപ്‌ഡേറ്റ് പേജിലേക്ക് റീഡയറക്‌ടുചെയ്യുന്നതിന് ശരി ക്ലിക്കുചെയ്യുക. - നിങ്ങളുടെ ഡൗൺലോഡ് ചെയ്ത മീഡിയ സംഭരിക്കുന്ന ഡയറക്ടറി. + നിങ്ങളുടെ ഡൗൺലോഡ് ചെയ്ത മീഡിയ സംഭരിക്കുന്ന ലൊക്കേഷൻ. ആപ്പിനെയും അതിന്റെ സവിശേഷതകളെയും കുറിച്ച് കൂടുതലറിയാൻ ഞങ്ങളുടെ വെബ്സൈറ്റ് സന്ദർശിക്കുക. സംഭാവന ചെയ്യുന്നു നിങ്ങൾക്ക് ആപ്പ് ഇഷ്‌ടപ്പെടുകയും ഞങ്ങളുടെ പ്രവർത്തനത്തെ അഭിനന്ദിക്കുകയും ചെയ്യുന്നുവെങ്കിൽ, ഒരു സംഭാവനയിൽ ഞങ്ങൾ സന്തുഷ്ടരാണ്. @@ -125,11 +125,26 @@ %1$s പതിപ്പ് ലഭ്യമാണ് രൂപഭാവം ആപ്പ് പെരുമാറ്റം - ഡൗൺലോഡ് ഡയറക്ടറി + ഡൗൺലോഡ് ലൊക്കേഷൻ സംഭാവനചെയ്യുക ആപ്പ് അപ്ഡേറ്റ് പുതിയ ആപ്പ് അപ്‌ഡേറ്റ് ലഭ്യമാണോയെന്ന് പരിശോധിക്കാൻ ഇവിടെ ക്ലിക്ക് ചെയ്യുക. ആപ്പ് അപ് ടു ഡേറ്റ് പ്ലെയർ പ്ലെയർ, ഡൗൺലോഡുകൾ, ചരിത്രം + ഈ കമന്റിന് മറുപടികളൊന്നുമില്ല. + രചയിതാക്കൾ + ഡയറക്ടറിയുടെ പേര് + ഡൗൺലോഡ് ചെയ്ത മീഡിയ സംഭരിക്കുന്ന ഡയറക്ടറിയുടെ പേര്. + ഇന്റേണൽ സ്റ്റോറേജ് + ഡൗൺലോഡ് ഡയറക്ടറി + എസ് ഡി കാർഡ് + സംഗീത ഡയറക്ടറി + സിനിമകളുടെ ഡയറക്ടറി + യുആർഎൽ പങ്കിടുക: + The GNU General Public License എന്നത് സോഫ്‌റ്റ്‌വെയറിനും മറ്റ് തരത്തിലുള്ള വർക്കുകൾക്കുമുള്ള ഒരു സ്വതന്ത്ര, കോപ്പിലെഫ്റ്റ് ലൈസൻസാണ്. + യഥാർത്ഥ ഉള്ളടക്കം ഇല്ലാത്ത ഒരു ഇടവേള. ഒരു ഇടവേള, സ്റ്റാറ്റിക് ഫ്രെയിം, ആവർത്തിക്കുന്ന ആനിമേഷൻ എന്നിവയായിരിക്കാം. വിവരങ്ങൾ അടങ്ങിയ പരിവർത്തനങ്ങൾക്ക് ഇത് ഉപയോഗിക്കരുത്. + Team LibreTube-ന് പിന്നിൽ ആരാണ് മാജിക് ചെയ്യുന്നതെന്ന് കണ്ടെത്തുക. + ഡൗൺലോഡ് ചെയ്‌ത വീഡിയോ ഫോർമാറ്റിലേക്ക് പരിവർത്തനം ചെയ്യപ്പെടും (ഓഡിയോയും വീഡിയോയും ഡൗൺലോഡ് ചെയ്‌താൽ മാത്രമേ ബാധകമാകൂ). + നിങ്ങൾക്ക് ആശയങ്ങൾ, വിവർത്തനങ്ങൾ, ഡിസൈൻ മാറ്റങ്ങൾ, കോഡ് ക്ലീനിംഗ് അല്ലെങ്കിൽ യഥാർത്ഥ ഹെവി കോഡ് മാറ്റങ്ങൾ എന്നിവ ഉണ്ടെങ്കിലും, സഹായം എപ്പോഴും സ്വാഗതം ചെയ്യുന്നു. കൂടുതൽ ചെയ്‌താൽ അത് മികച്ചതാകുന്നു! \ No newline at end of file From 6b1721b3814a4e30f5c431e02fffe0f553c90f65 Mon Sep 17 00:00:00 2001 From: Yaron Shahrabani Date: Thu, 9 Jun 2022 20:56:15 +0000 Subject: [PATCH 033/118] Translated using Weblate (Hebrew) Currently translated at 100.0% (152 of 152 strings) Translation: LibreTube/LibreTube Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/he/ --- app/src/main/res/values-iw/strings.xml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-iw/strings.xml b/app/src/main/res/values-iw/strings.xml index feec288da..97e97a1b0 100644 --- a/app/src/main/res/values-iw/strings.xml +++ b/app/src/main/res/values-iw/strings.xml @@ -63,8 +63,8 @@ מראה התנהגות היישום תצורת סרטונים - תיקיית הורדות - התיקייה בה יאוחסנו פריטי המדינה שבחרת להוריד. + מקום הורדות + המקום בו יאוחסנו פריטי המדיה שבחרת להוריד. אפשר לבקר באתר שלנו כדי ללמוד עוד על היישום והיכולות שלו. תרומה הרישיון הציבורי הכללי של גנו הוא רישיון חופשי ומתירני לתוכנה ולסוגים נוספים של יצירות. @@ -144,4 +144,12 @@ יוצרים כאן מופיעים אלו שעומדים מאחורי LibreTube ועושים את הקסם. להערה זו אין תגובות. + שם התיקייה שבה מאוחסנת מדיה שהורדה. + אחסון פנימי + תיקיית הורדות + תיקיית סרטים + תיקיית מוזיקה + שם תיקייה + כרטיס SD + שיתוף כתובת אל: \ No newline at end of file From e3aa8412b22c57d5fa9ba26d795cd5008d0857fc Mon Sep 17 00:00:00 2001 From: Artur Date: Fri, 10 Jun 2022 12:50:24 +0000 Subject: [PATCH 034/118] Translated using Weblate (Ukrainian) Currently translated at 92.1% (140 of 152 strings) Translation: LibreTube/LibreTube Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/uk/ --- app/src/main/res/values-uk/strings.xml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index 448728ab8..fc7d71d2f 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -116,4 +116,29 @@ Сповіщення Увімкнено Вимкнено + Цей коментар не має відповідей. + Автори + Назва теки, у яку будуть збережені завантажені матеріали. + Назва теки + Пам\'ять телефона + Тека завантажень + Тека для відео + Тека для музики + Поділитися відео з: + Версія %1$s доступна + Нове оновлення доступно. Натисніть ОК щоб перейти на сторінку оновлень GitHub. + Завантаження + Формат відео + Відвідайте наш сайт, щоб взнати більше про додаток та його функції. + Внесок + Будь-яка допомога: нові ідеї, переклади, зміни у дизайні, чистка або зміни до коду, — допоможе цьому проєкту. Чим більше зроблено, тим краще! + Публічна ліцензія GNU - це безкоштовна копілефт ліцензія для додатків та інших видів робіт. + Оновлення додатку + Натисніть тут, щоб перевірити наявність нових оновлень. + Додаток актуальний + Стандартна швидкість відтворення + Програвач + Зробіть додаток таким, яким ви хочете його бачити. + Програвач, завантаження, історія + Пряма трансляція \ No newline at end of file From 32b901b2b5ead8457aa46e98688a7dc944e75a11 Mon Sep 17 00:00:00 2001 From: alefvanoon <53198048+alefvanoon@users.noreply.github.com> Date: Fri, 10 Jun 2022 13:48:20 +0000 Subject: [PATCH 035/118] add patreon badge --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 43afb4231..9a9596616 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,8 @@ WARNING: THIS IS A BETA VERSION, THEREFORE YOU MAY ENCOUNTER BUGS. IF YOU DO, OP ### Donate +[![Support us on Patreon](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fshieldsio-patreon.vercel.app%2Fapi%3Fusername%3Dlibretubeteam%26type%3Dpatrons&style=for-the-badge)](https://patreon.com/libretubeteam) + **BTC:** `bc1q0hk2smc74ej8fxupfrp05wk867e54e2zztnxfc` **XMR:** `44txdmy4E5bDzMYQJh1ZSoHbrp1sWfpGa2FYg26L2ya8EaRejPsh42yVrYhepW9P4YWvrqmTZvms35z5FDgqy1xcVewk18d` From a10ac8dc60a1fb121f30e5e5f89bcf55ee14a9ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Allan=20Nordh=C3=B8y?= Date: Fri, 10 Jun 2022 19:25:29 +0000 Subject: [PATCH 036/118] App strings reworked 2 --- app/src/main/res/values/strings.xml | 132 ++++++++++++++-------------- 1 file changed, 66 insertions(+), 66 deletions(-) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 363b5bb98..07649d4bc 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -4,7 +4,7 @@ Subscriptions Library Yes - Choose Quality: + Quality Search Videos Subscribe @@ -22,17 +22,17 @@ Logged out. Registered. Now you can subscribe to channels. Already logged in. You may log out of your account. - Please log in and try again! + Please log in and try again. Choose an instance Add a custom instance Choose a region - Log in/Register + Log in/register Please log in or register in the settings first. Subscribed Subscribe to some channels first. Can\'t download this stream. Download completed. - Another download is already in progress. Please wait till it\'s finished. + Please wait till all downloads are finished… Download failed. Open in VLC Can\'t open in VLC. It might not be installed. @@ -43,33 +43,33 @@ Network error. Something went wrong. You have to enter a username and password. - This is not your Gmail account. + This is for a LibreTube account. Default video resolution Grid columns Nothing here. Delete playlist Delete the playlist? Create playlist - Playlist created! - Playlist Name + Playlist created. + Playlist name The playlist name can\'t be empty - Add to Playlist - Success! + Add to playlist + Done. Failed :( About - Change Language - System Language - System Default - Light Theme - Dark Theme + Language + System + System + Luminating light + Dissapearing dark %1$s subscribers Settings Location Instance - Customization + Adjustments Website %1$s videos - No Internet Connection + Connect to the Internet first. Retry Comments Choose search filter @@ -86,79 +86,79 @@ YT Music Playlists Default Tab SponsorBlock - Uses API from https://sponsor.ajay.app/ + Uses the https://sponsor.ajay.app API Skipped segment - Enabled + On Segments Sponsor Paid promotion, paid referrals and direct advertisements. Not for self-promotion or free shoutouts to causes/creators/websites/products they like. Unpaid/Self Promotion - Similar to \"sponsor\" except for unpaid or self promotion. This includes sections about merchandise, donations, or information about who they collaborated with. - Interaction Reminder (Subscribe) - When there is a short reminder to like, subscribe or follow them in the middle of content. If it is long or about something specific, it should be under self promotion instead. + Similar to \"sponsor\" except for unpaid or self promotion. This includes sections about merchandise, donations, or info about who they collaborated with. + Interaction reminder (like and subscribe) + When there is a short reminder to like, subscribe or follow in the middle of content. If long or about something specific, it should instead be self promotion. Intermission/Intro Animation - An interval without actual content. Could be a pause, static frame, repeating animation. This should not be used for transitions containing information. - Endcards/Credits - Credits or when the YouTube endcards appear. Not for conclusions with information. + An interval without actual content. Could be a pause, static frame, repeating animation. Should not be used for transitions containing info. + End cards and credits + Info following the ending. Not for conclusions with info. License - Color Accent - Red - Pixel Blue - Yellow - Green - Purple - OLED Theme - Material You + Accents + Resting red + Boat blue + Yeeting yellow + Guest green + Pleasurable purple + Blind black + Mystic Material 3 Notifications - App Icon - Enabled - Disabled + Icon + On + Off Piped YouTube - Play on background + Play in the background Version %1$s is available - There is a new update available. Click okay to become redirected to the update page on GitHub. + Go to releases on GitHub to download it? Appearance - App Behavior + Behavior Downloads Video format - The video format downloaded videos get converted to (only applies if both, audio and video, are downloaded). - Download location - The location where your downloaded media gets stored. - Visit our website to learn more about the app and its features. + Conversion of files if both audio and video are downloaded. + Download to + Where downloaded media gets stored. + Visit the website for more info on the app and its features. Contributing - Whether you have ideas, translations, design changes, code cleaning, or real heavy code changes, help is always welcome. The more is done the better it gets! - The GNU General Public License is a free, copyleft license for software and other kinds of works. + Provide ideas, translations, design changes, clean and write code. The more is done the better it gets! + The GPLv3+ is a copylefted libre license. Use, study, change and share; with all. Donate - If you like the app and appreciate our work we\'d be happy about a donation. - App update - Click here to check whether there\'s a new app update available. - App up to date - There\'s currently no new update available. Stay tuned! + Give what this is worth to you, if you can. Team LibreTube is smaller than your donation or help. + Look for new version + Click to find out if the app is up to date. + Running the latest version. + You are running the latest version. Default playback speed Advanced Player - Make the app look how you want to. - Player, Downloads, History + Adjust the app to your liking. + Player, downloads, history Live This comment has no replies. Authors - Find out who\'s behind Team LibreTube and does the magic. - Directory name - The name of the directory downloaded media gets stored in. + Get to know team LibreTube and how it all happens. + Name + The name of the folder downloaded media is stored in. Internal storage - Downloads directory + Download folder SD card - Music directory - Movies directory - Share Url To: + Music folder + Movie folder + Share URL to %1$s views Default - Legacy - Gradient - Fire - Torch - Shaped - Flame - Bird - \ No newline at end of file + Lost legacy + Glib gradient + Fashionable fire + Trendy torch + Silly shaped + Flying flame + Boosted bird + From 9986c2a7d5bac75cd943bd196173a8cab872e1df Mon Sep 17 00:00:00 2001 From: Bnyro Date: Sat, 11 Jun 2022 11:53:09 +0200 Subject: [PATCH 037/118] moved instance settings --- .../libretube/preferences/InstanceSettings.kt | 266 ++++++++++++++++++ .../libretube/preferences/MainSettings.kt | 250 +--------------- app/src/main/res/layout/fragment_about.xml | 12 +- app/src/main/res/values/strings.xml | 3 +- app/src/main/res/xml/instance_settings.xml | 34 +++ app/src/main/res/xml/settings.xml | 76 ++--- 6 files changed, 340 insertions(+), 301 deletions(-) create mode 100644 app/src/main/java/com/github/libretube/preferences/InstanceSettings.kt create mode 100644 app/src/main/res/xml/instance_settings.xml diff --git a/app/src/main/java/com/github/libretube/preferences/InstanceSettings.kt b/app/src/main/java/com/github/libretube/preferences/InstanceSettings.kt new file mode 100644 index 000000000..ed8a02d96 --- /dev/null +++ b/app/src/main/java/com/github/libretube/preferences/InstanceSettings.kt @@ -0,0 +1,266 @@ +package com.github.libretube.preferences + +import android.Manifest +import android.content.ContentResolver +import android.content.Context +import android.content.pm.PackageManager +import android.net.Uri +import android.os.Build +import android.os.Bundle +import android.text.TextUtils +import android.util.Log +import android.widget.TextView +import android.widget.Toast +import androidx.activity.result.contract.ActivityResultContracts +import androidx.core.app.ActivityCompat +import androidx.core.content.ContextCompat +import androidx.fragment.app.Fragment +import androidx.lifecycle.lifecycleScope +import androidx.preference.ListPreference +import androidx.preference.Preference +import androidx.preference.PreferenceFragmentCompat +import com.github.libretube.R +import com.github.libretube.dialogs.LoginDialog +import com.github.libretube.requireMainActivityRestart +import com.github.libretube.util.RetrofitInstance +import org.json.JSONObject +import org.json.JSONTokener +import retrofit2.HttpException +import java.io.IOException +import java.io.InputStream +import java.util.zip.ZipEntry +import java.util.zip.ZipInputStream + +class InstanceSettings : PreferenceFragmentCompat() { + val TAG = "InstanceSettings" + + override fun onCreate(savedInstanceState: Bundle?) { + MainSettings.getContent = + registerForActivityResult(ActivityResultContracts.GetContent()) { uri: Uri? -> + if (uri != null) { + try { + // Open a specific media item using ParcelFileDescriptor. + val resolver: ContentResolver = + requireActivity() + .contentResolver + + // "rw" for read-and-write; + // "rwt" for truncating or overwriting existing file contents. + // val readOnlyMode = "r" + // uri - I have got from onActivityResult + val type = resolver.getType(uri) + + var inputStream: InputStream? = resolver.openInputStream(uri) + val channels = ArrayList() + if (type == "application/json") { + val json = inputStream?.bufferedReader()?.readLines()?.get(0) + val jsonObject = JSONTokener(json).nextValue() as JSONObject + Log.e(TAG, jsonObject.getJSONArray("subscriptions").toString()) + for ( + i in 0 until jsonObject.getJSONArray("subscriptions") + .length() + ) { + var url = + jsonObject.getJSONArray("subscriptions").getJSONObject(i) + .getString("url") + url = url.replace("https://www.youtube.com/channel/", "") + Log.e(TAG, url) + channels.add(url) + } + } else { + if (type == "application/zip") { + val zis = ZipInputStream(inputStream) + var entry: ZipEntry? = zis.nextEntry + while (entry != null) { + if (entry.name.endsWith(".csv")) { + inputStream = zis + break + } + entry = zis.nextEntry + } + } + + inputStream?.bufferedReader()?.readLines()?.forEach { + if (it.isNotBlank()) { + val channelId = it.substringBefore(",") + if (channelId.length == 24) + channels.add(channelId) + } + } + } + inputStream?.close() + + subscribe(channels) + } catch (e: Exception) { + Log.e(TAG, e.toString()) + Toast.makeText( + context, + R.string.error, + Toast.LENGTH_SHORT + ).show() + } + } + } + super.onCreate(savedInstanceState) + } + + override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { + setPreferencesFromResource(R.xml.instance_settings, rootKey) + + val topBarTextView = activity?.findViewById(R.id.topBar_textView) + topBarTextView?.text = getString(R.string.instance) + + val instance = findPreference("instance_server") + fetchInstance() + instance?.setOnPreferenceChangeListener { _, newValue -> + RetrofitInstance.url = newValue.toString() + RetrofitInstance.lazyMgr.reset() + val sharedPref = context?.getSharedPreferences("token", Context.MODE_PRIVATE) + if (sharedPref?.getString("token", "") != "") { + with(sharedPref!!.edit()) { + putString("token", "") + apply() + } + Toast.makeText(context, R.string.loggedout, Toast.LENGTH_SHORT).show() + } + true + } + + val login = findPreference("login_register") + login?.setOnPreferenceClickListener { + requireMainActivityRestart = true + val newFragment = LoginDialog() + newFragment.show(childFragmentManager, "Login") + true + } + + val importFromYt = findPreference("import_from_yt") + importFromYt?.setOnPreferenceClickListener { + val sharedPref = context?.getSharedPreferences("token", Context.MODE_PRIVATE) + val token = sharedPref?.getString("token", "")!! + // check StorageAccess + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { + Log.d("myz", "" + Build.VERSION.SDK_INT) + if (ContextCompat.checkSelfPermission( + this.requireContext(), + Manifest.permission.READ_EXTERNAL_STORAGE + ) + != PackageManager.PERMISSION_GRANTED + ) { + ActivityCompat.requestPermissions( + this.requireActivity(), + arrayOf( + Manifest.permission.READ_EXTERNAL_STORAGE, + Manifest.permission.MANAGE_EXTERNAL_STORAGE + ), + 1 + ) // permission request code is just an int + } else if (token != "") { + MainSettings.getContent.launch("*/*") + } else { + Toast.makeText(context, R.string.login_first, Toast.LENGTH_SHORT).show() + } + } else { + if (ActivityCompat.checkSelfPermission( + requireContext(), + Manifest.permission.READ_EXTERNAL_STORAGE + ) != PackageManager.PERMISSION_GRANTED || + ActivityCompat.checkSelfPermission( + requireContext(), + Manifest.permission.WRITE_EXTERNAL_STORAGE + ) != PackageManager.PERMISSION_GRANTED + ) { + ActivityCompat.requestPermissions( + this.requireActivity(), + arrayOf( + Manifest.permission.READ_EXTERNAL_STORAGE, + Manifest.permission.WRITE_EXTERNAL_STORAGE + ), + 1 + ) + } else if (token != "") { + MainSettings.getContent.launch("*/*") + } else { + Toast.makeText(context, R.string.login_first, Toast.LENGTH_SHORT).show() + } + } + true + } + } + + private fun fetchInstance() { + lifecycleScope.launchWhenCreated { + val response = try { + RetrofitInstance.api.getInstances("https://instances.tokhmi.xyz/") + } catch (e: IOException) { + println(e) + Log.e("settings", "IOException, you might not have internet connection") + return@launchWhenCreated + } catch (e: HttpException) { + Log.e("settings", "HttpException, unexpected response $e") + return@launchWhenCreated + } catch (e: Exception) { + Log.e("settings", e.toString()) + return@launchWhenCreated + } + val listEntries: MutableList = ArrayList() + val listEntryValues: MutableList = ArrayList() + for (item in response) { + listEntries.add(item.name!!) + listEntryValues.add(item.api_url!!) + } + val entries = listEntries.toTypedArray() + val entryValues = listEntryValues.toTypedArray() + runOnUiThread { + val instance = findPreference("instance_server") + instance?.entries = entries + instance?.entryValues = entryValues + instance?.summaryProvider = + Preference.SummaryProvider { preference -> + val text = preference.entry + if (TextUtils.isEmpty(text)) { + "kavin.rocks (Official)" + } else { + text + } + } + } + } + } + + private fun Fragment?.runOnUiThread(action: () -> Unit) { + this ?: return + if (!isAdded) return // Fragment not attached to an Activity + activity?.runOnUiThread(action) + } + + private fun subscribe(channels: List) { + fun run() { + lifecycleScope.launchWhenCreated { + val response = try { + val sharedPref = + context?.getSharedPreferences("token", Context.MODE_PRIVATE) + RetrofitInstance.api.importSubscriptions( + false, + sharedPref?.getString("token", "")!!, + channels + ) + } catch (e: IOException) { + Log.e(TAG, "IOException, you might not have internet connection") + return@launchWhenCreated + } catch (e: HttpException) { + Log.e(TAG, "HttpException, unexpected response$e") + return@launchWhenCreated + } + if (response.message == "ok") { + Toast.makeText( + context, + R.string.importsuccess, + Toast.LENGTH_SHORT + ).show() + } + } + } + run() + } +} diff --git a/app/src/main/java/com/github/libretube/preferences/MainSettings.kt b/app/src/main/java/com/github/libretube/preferences/MainSettings.kt index 04bb1d33d..6ccfcf446 100644 --- a/app/src/main/java/com/github/libretube/preferences/MainSettings.kt +++ b/app/src/main/java/com/github/libretube/preferences/MainSettings.kt @@ -1,37 +1,15 @@ package com.github.libretube.preferences -import android.Manifest -import android.content.ContentResolver -import android.content.Context -import android.content.pm.PackageManager -import android.net.Uri -import android.os.Build import android.os.Bundle -import android.text.TextUtils -import android.util.Log -import android.widget.Toast import androidx.activity.result.ActivityResultLauncher -import androidx.activity.result.contract.ActivityResultContracts -import androidx.core.app.ActivityCompat -import androidx.core.content.ContextCompat import androidx.fragment.app.Fragment -import androidx.lifecycle.lifecycleScope import androidx.preference.ListPreference import androidx.preference.Preference import androidx.preference.PreferenceFragmentCompat import com.github.libretube.R -import com.github.libretube.dialogs.LoginDialog import com.github.libretube.isCurrentViewMainSettings import com.github.libretube.requireMainActivityRestart -import com.github.libretube.util.RetrofitInstance import com.github.libretube.util.ThemeHelper -import java.io.IOException -import java.io.InputStream -import java.util.zip.ZipEntry -import java.util.zip.ZipInputStream -import org.json.JSONObject -import org.json.JSONTokener -import retrofit2.HttpException class MainSettings : PreferenceFragmentCompat() { val TAG = "SettingsFragment" @@ -40,76 +18,6 @@ class MainSettings : PreferenceFragmentCompat() { lateinit var getContent: ActivityResultLauncher } - override fun onCreate(savedInstanceState: Bundle?) { - getContent = - registerForActivityResult(ActivityResultContracts.GetContent()) { uri: Uri? -> - if (uri != null) { - try { - // Open a specific media item using ParcelFileDescriptor. - val resolver: ContentResolver = - requireActivity() - .contentResolver - - // "rw" for read-and-write; - // "rwt" for truncating or overwriting existing file contents. - // val readOnlyMode = "r" - // uri - I have got from onActivityResult - val type = resolver.getType(uri) - - var inputStream: InputStream? = resolver.openInputStream(uri) - val channels = ArrayList() - if (type == "application/json") { - val json = inputStream?.bufferedReader()?.readLines()?.get(0) - val jsonObject = JSONTokener(json).nextValue() as JSONObject - Log.e(TAG, jsonObject.getJSONArray("subscriptions").toString()) - for ( - i in 0 until jsonObject.getJSONArray("subscriptions") - .length() - ) { - var url = - jsonObject.getJSONArray("subscriptions").getJSONObject(i) - .getString("url") - url = url.replace("https://www.youtube.com/channel/", "") - Log.e(TAG, url) - channels.add(url) - } - } else { - if (type == "application/zip") { - val zis = ZipInputStream(inputStream) - var entry: ZipEntry? = zis.nextEntry - while (entry != null) { - if (entry.name.endsWith(".csv")) { - inputStream = zis - break - } - entry = zis.nextEntry - } - } - - inputStream?.bufferedReader()?.readLines()?.forEach { - if (it.isNotBlank()) { - val channelId = it.substringBefore(",") - if (channelId.length == 24) - channels.add(channelId) - } - } - } - inputStream?.close() - - subscribe(channels) - } catch (e: Exception) { - Log.e(TAG, e.toString()) - Toast.makeText( - context, - R.string.error, - Toast.LENGTH_SHORT - ).show() - } - } - } - super.onCreate(savedInstanceState) - } - override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { setPreferencesFromResource(R.xml.settings, rootKey) @@ -125,27 +33,10 @@ class MainSettings : PreferenceFragmentCompat() { true } - val instance = findPreference("instance") - fetchInstance() - instance?.setOnPreferenceChangeListener { _, newValue -> - RetrofitInstance.url = newValue.toString() - RetrofitInstance.lazyMgr.reset() - val sharedPref = context?.getSharedPreferences("token", Context.MODE_PRIVATE) - if (sharedPref?.getString("token", "") != "") { - with(sharedPref!!.edit()) { - putString("token", "") - apply() - } - Toast.makeText(context, R.string.loggedout, Toast.LENGTH_SHORT).show() - } - true - } - - val login = findPreference("login_register") - login?.setOnPreferenceClickListener { - requireMainActivityRestart = true - val newFragment = LoginDialog() - newFragment.show(childFragmentManager, "Login") + val instance = findPreference("instance") + instance?.setOnPreferenceClickListener { + val newFragment = InstanceSettings() + navigateSettings(newFragment) true } @@ -156,8 +47,8 @@ class MainSettings : PreferenceFragmentCompat() { true } - val sponsorblock = findPreference("sponsorblock") - sponsorblock?.setOnPreferenceClickListener { + val sponsorBlock = findPreference("sponsorblock") + sponsorBlock?.setOnPreferenceClickListener { val newFragment = SponsorBlockSettings() navigateSettings(newFragment) true @@ -176,59 +67,6 @@ class MainSettings : PreferenceFragmentCompat() { navigateSettings(newFragment) true } - - val importFromYt = findPreference("import_from_yt") - importFromYt?.setOnPreferenceClickListener { - val sharedPref = context?.getSharedPreferences("token", Context.MODE_PRIVATE) - val token = sharedPref?.getString("token", "")!! - // check StorageAccess - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { - Log.d("myz", "" + Build.VERSION.SDK_INT) - if (ContextCompat.checkSelfPermission( - this.requireContext(), - Manifest.permission.READ_EXTERNAL_STORAGE - ) - != PackageManager.PERMISSION_GRANTED - ) { - ActivityCompat.requestPermissions( - this.requireActivity(), - arrayOf( - Manifest.permission.READ_EXTERNAL_STORAGE, - Manifest.permission.MANAGE_EXTERNAL_STORAGE - ), - 1 - ) // permission request code is just an int - } else if (token != "") { - getContent.launch("*/*") - } else { - Toast.makeText(context, R.string.login_first, Toast.LENGTH_SHORT).show() - } - } else { - if (ActivityCompat.checkSelfPermission( - requireContext(), - Manifest.permission.READ_EXTERNAL_STORAGE - ) != PackageManager.PERMISSION_GRANTED || - ActivityCompat.checkSelfPermission( - requireContext(), - Manifest.permission.WRITE_EXTERNAL_STORAGE - ) != PackageManager.PERMISSION_GRANTED - ) { - ActivityCompat.requestPermissions( - this.requireActivity(), - arrayOf( - Manifest.permission.READ_EXTERNAL_STORAGE, - Manifest.permission.WRITE_EXTERNAL_STORAGE - ), - 1 - ) - } else if (token != "") { - getContent.launch("*/*") - } else { - Toast.makeText(context, R.string.login_first, Toast.LENGTH_SHORT).show() - } - } - true - } } private fun navigateSettings(newFragment: Fragment) { @@ -237,80 +75,4 @@ class MainSettings : PreferenceFragmentCompat() { .replace(R.id.settings, newFragment) .commitNow() } - - private fun fetchInstance() { - lifecycleScope.launchWhenCreated { - val response = try { - RetrofitInstance.api.getInstances("https://instances.tokhmi.xyz/") - } catch (e: IOException) { - println(e) - Log.e("settings", "IOException, you might not have internet connection") - return@launchWhenCreated - } catch (e: HttpException) { - Log.e("settings", "HttpException, unexpected response $e") - return@launchWhenCreated - } catch (e: Exception) { - Log.e("settings", e.toString()) - return@launchWhenCreated - } - val listEntries: MutableList = ArrayList() - val listEntryValues: MutableList = ArrayList() - for (item in response) { - listEntries.add(item.name!!) - listEntryValues.add(item.api_url!!) - } - val entries = listEntries.toTypedArray() - val entryValues = listEntryValues.toTypedArray() - runOnUiThread { - val instance = findPreference("instance") - instance?.entries = entries - instance?.entryValues = entryValues - instance?.summaryProvider = - Preference.SummaryProvider { preference -> - val text = preference.entry - if (TextUtils.isEmpty(text)) { - "kavin.rocks (Official)" - } else { - text - } - } - } - } - } - - private fun Fragment?.runOnUiThread(action: () -> Unit) { - this ?: return - if (!isAdded) return // Fragment not attached to an Activity - activity?.runOnUiThread(action) - } - - private fun subscribe(channels: List) { - fun run() { - lifecycleScope.launchWhenCreated { - val response = try { - val sharedPref = - context?.getSharedPreferences("token", Context.MODE_PRIVATE) - RetrofitInstance.api.importSubscriptions( - false, - sharedPref?.getString("token", "")!!, - channels - ) - } catch (e: IOException) { - Log.e(TAG, "IOException, you might not have internet connection") - return@launchWhenCreated - } catch (e: HttpException) { - Log.e(TAG, "HttpException, unexpected response$e") - return@launchWhenCreated - } - if (response.message == "ok") { - Toast.makeText( - context, - R.string.importsuccess, - Toast.LENGTH_SHORT - ).show() - } - } - } - run() - } } diff --git a/app/src/main/res/layout/fragment_about.xml b/app/src/main/res/layout/fragment_about.xml index 8e92d159f..8e1ccc650 100644 --- a/app/src/main/res/layout/fragment_about.xml +++ b/app/src/main/res/layout/fragment_about.xml @@ -39,7 +39,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" - android:padding="10dp"> + android:paddingHorizontal="20dp" android:paddingVertical="10dp"> + android:paddingHorizontal="20dp" android:paddingVertical="10dp"> + android:paddingHorizontal="20dp" android:paddingVertical="10dp"> + android:paddingHorizontal="20dp" android:paddingVertical="10dp"> + android:paddingHorizontal="20dp" android:paddingVertical="10dp"> + android:paddingHorizontal="20dp" android:paddingVertical="10dp"> Please log in and try again. Choose an instance Add a custom instance - Choose a region + Region Log in/register Please log in or register in the settings first. Subscribed @@ -161,4 +161,5 @@ Silly shaped Flying flame Boosted bird + Piped, login, subscriptions diff --git a/app/src/main/res/xml/instance_settings.xml b/app/src/main/res/xml/instance_settings.xml new file mode 100644 index 000000000..f76aa1fe1 --- /dev/null +++ b/app/src/main/res/xml/instance_settings.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/xml/settings.xml b/app/src/main/res/xml/settings.xml index 8a9a59986..942736b00 100644 --- a/app/src/main/res/xml/settings.xml +++ b/app/src/main/res/xml/settings.xml @@ -5,83 +5,59 @@ + app:key="region" + app:title="@string/region" + app:useSimpleSummaryProvider="true" /> - - - - - - - - - - - - - + app:key="language" + app:title="@string/changeLanguage" + app:useSimpleSummaryProvider="true" /> + android:icon="@drawable/ic_server" + app:key="instance" + app:summary="@string/instance_summary" + app:title="@string/instance" /> + + + app:title="@string/sponsorblock" /> + app:title="@string/advanced" /> + app:title="@string/about" /> From 162c1682c029a4818814ba9683b77131dcedc3ba Mon Sep 17 00:00:00 2001 From: Bnyro Date: Sat, 11 Jun 2022 11:53:43 +0200 Subject: [PATCH 038/118] ktlint --- .../com/github/libretube/preferences/InstanceSettings.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/github/libretube/preferences/InstanceSettings.kt b/app/src/main/java/com/github/libretube/preferences/InstanceSettings.kt index ed8a02d96..21753bb8d 100644 --- a/app/src/main/java/com/github/libretube/preferences/InstanceSettings.kt +++ b/app/src/main/java/com/github/libretube/preferences/InstanceSettings.kt @@ -23,13 +23,13 @@ import com.github.libretube.R import com.github.libretube.dialogs.LoginDialog import com.github.libretube.requireMainActivityRestart import com.github.libretube.util.RetrofitInstance -import org.json.JSONObject -import org.json.JSONTokener -import retrofit2.HttpException import java.io.IOException import java.io.InputStream import java.util.zip.ZipEntry import java.util.zip.ZipInputStream +import org.json.JSONObject +import org.json.JSONTokener +import retrofit2.HttpException class InstanceSettings : PreferenceFragmentCompat() { val TAG = "InstanceSettings" From 21b8e8bbc0cc64f469bcf2d28e04319bbd895db9 Mon Sep 17 00:00:00 2001 From: Bnyro Date: Sat, 11 Jun 2022 13:04:33 +0200 Subject: [PATCH 039/118] codebase --- .../java/com/github/libretube/MainActivity.kt | 2 +- .../libretube/dialogs/CustomInstanceDialog.kt | 43 ++++++++ .../github/libretube/dialogs/ShareDialog.kt | 2 +- .../libretube/preferences/InstanceSettings.kt | 34 ++++-- app/src/main/res/drawable/ic_add_instance.xml | 10 ++ .../res/layout/dialog_custom_instance.xml | 103 ++++++++++++++++++ app/src/main/res/values/strings.xml | 6 +- app/src/main/res/xml/instance_settings.xml | 9 +- 8 files changed, 192 insertions(+), 17 deletions(-) create mode 100644 app/src/main/java/com/github/libretube/dialogs/CustomInstanceDialog.kt create mode 100644 app/src/main/res/drawable/ic_add_instance.xml create mode 100644 app/src/main/res/layout/dialog_custom_instance.xml diff --git a/app/src/main/java/com/github/libretube/MainActivity.kt b/app/src/main/java/com/github/libretube/MainActivity.kt index a20f7971d..183fe853f 100644 --- a/app/src/main/java/com/github/libretube/MainActivity.kt +++ b/app/src/main/java/com/github/libretube/MainActivity.kt @@ -53,7 +53,7 @@ class MainActivity : AppCompatActivity() { CronetHelper.initCronet(this.applicationContext) val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this) RetrofitInstance.url = - sharedPreferences.getString("instance", "https://pipedapi.kavin.rocks/")!! + sharedPreferences.getString("selectInstance", "https://pipedapi.kavin.rocks/")!! SponsorBlockSettings.sponsorBlockEnabled = sharedPreferences.getBoolean("sb_enabled_key", false) SponsorBlockSettings.sponsorNotificationsEnabled = diff --git a/app/src/main/java/com/github/libretube/dialogs/CustomInstanceDialog.kt b/app/src/main/java/com/github/libretube/dialogs/CustomInstanceDialog.kt new file mode 100644 index 000000000..56c0f116b --- /dev/null +++ b/app/src/main/java/com/github/libretube/dialogs/CustomInstanceDialog.kt @@ -0,0 +1,43 @@ +package com.github.libretube.dialogs + +import android.app.Dialog +import android.os.Bundle +import android.util.TypedValue +import android.view.View +import android.widget.Button +import android.widget.TextView +import androidx.core.text.HtmlCompat +import androidx.fragment.app.DialogFragment +import com.github.libretube.R +import com.google.android.material.dialog.MaterialAlertDialogBuilder +import com.google.android.material.textfield.TextInputEditText + +class CustomInstanceDialog : DialogFragment() { + override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { + return activity?.let { + val builder = MaterialAlertDialogBuilder(it) + val inflater = requireActivity().layoutInflater + val view: View = inflater.inflate(R.layout.dialog_custom_instance, null) + + val instanceNameEditText = view.findViewById(R.id.instanceName) + val instanceApiUrlEditText = view.findViewById(R.id.instanceApiUrl) + val addInstanceButton = view.findViewById