Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DownloadDialog: remove thread selector #10735

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 13 additions & 22 deletions app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.RadioGroup;
import android.widget.SeekBar;
import android.widget.Toast;

import androidx.activity.result.ActivityResult;
Expand Down Expand Up @@ -65,7 +64,6 @@
import org.schabi.newpipe.util.ListHelper;
import org.schabi.newpipe.util.PermissionHelper;
import org.schabi.newpipe.util.SecondaryStreamHelper;
import org.schabi.newpipe.util.SimpleOnSeekBarChangeListener;
import org.schabi.newpipe.util.StreamItemAdapter;
import org.schabi.newpipe.util.StreamItemAdapter.StreamInfoWrapper;
import org.schabi.newpipe.util.AudioTrackAdapter;
Expand Down Expand Up @@ -323,21 +321,6 @@ public void onViewCreated(@NonNull final View view,

prefs = PreferenceManager.getDefaultSharedPreferences(requireContext());

final int threads = prefs.getInt(getString(R.string.default_download_threads), 3);
dialogBinding.threadsCount.setText(String.valueOf(threads));
dialogBinding.threads.setProgress(threads - 1);
dialogBinding.threads.setOnSeekBarChangeListener(new SimpleOnSeekBarChangeListener() {
@Override
public void onProgressChanged(@NonNull final SeekBar seekbar,
final int progress,
final boolean fromUser) {
final int newProgress = progress + 1;
prefs.edit().putInt(getString(R.string.default_download_threads), newProgress)
.apply();
dialogBinding.threadsCount.setText(String.valueOf(newProgress));
}
});

fetchStreamsSize();
}

Expand Down Expand Up @@ -590,8 +573,6 @@ public void onCheckedChanged(final RadioGroup group, @IdRes final int checkedId)
flag = false;
break;
}

dialogBinding.threads.setEnabled(flag);
}

@Override
Expand Down Expand Up @@ -1051,7 +1032,7 @@ private void continueSelectedDownload(@NonNull final StoredFileHelper storage) {
final Stream selectedStream;
Stream secondaryStream = null;
final char kind;
int threads = dialogBinding.threads.getProgress() + 1;
int threads = 4;
final String[] urls;
final List<MissionRecoveryInfo> recoveryInfo;
String psName = null;
Expand Down Expand Up @@ -1134,8 +1115,18 @@ private void continueSelectedDownload(@NonNull final StoredFileHelper storage) {
);
}

DownloadManagerService.startMission(context, urls, storage, kind, threads,
currentInfo.getUrl(), psName, psArgs, nearLength, new ArrayList<>(recoveryInfo));
DownloadManagerService.startMission(
context,
urls,
storage,
kind,
threads,
currentInfo.getUrl(),
psName,
psArgs,
nearLength,
new ArrayList<>(recoveryInfo)
);

Toast.makeText(context, getString(R.string.download_has_started),
Toast.LENGTH_SHORT).show();
Expand Down
37 changes: 0 additions & 37 deletions app/src/main/res/layout/download_dialog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,48 +106,11 @@
android:textSize="12sp" />

<org.schabi.newpipe.views.NewPipeTextView
android:id="@+id/threads_text_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/audio_track_present_in_video_text"
android:layout_marginLeft="24dp"
android:layout_marginRight="24dp"
android:layout_marginBottom="6dp"
android:text="@string/msg_threads" />

<LinearLayout
android:id="@+id/threads_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/threads_text_view"
android:layout_marginLeft="24dp"
android:layout_marginRight="24dp"
android:layout_marginBottom="12dp"
android:orientation="horizontal">

<org.schabi.newpipe.views.NewPipeTextView
android:id="@+id/threads_count"
android:layout_width="25dp"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:paddingLeft="2dp"
tools:ignore="RtlHardcoded,RtlSymmetry"
tools:text="3" />

<SeekBar
android:id="@+id/threads"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:max="31"
android:progress="3" />
</LinearLayout>

<org.schabi.newpipe.views.NewPipeTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/threads_layout"
android:layout_marginLeft="24dp"
android:layout_marginRight="24dp"
android:layout_marginBottom="12dp"
android:gravity="center"
android:text="@string/streams_not_yet_supported_removed"
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-ar-rLY/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,6 @@
<string name="recent">حديثة</string>
<string name="subscription_update_failed">تعذر تحديث الاشتراك</string>
<string name="clear_queue_confirmation_description">سيتم استبدال قائمة انتظار للمشغل النشط</string>
<string name="msg_threads">التقسيم</string>
<string name="subscribe_button_title">اشتراك</string>
<string name="channel_created_by">أنشأها %s</string>
<string name="settings_file_replacement_character_title">الحرف الإستبدالي</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-ar/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@
<string name="checksum">التوقيع</string>
<string name="ok">موافق</string>
<string name="msg_name">اسم الملف</string>
<string name="msg_threads">التقسيم</string>
<string name="msg_error">الخطأ</string>
<string name="msg_running">يقوم نيوبايب بالتنزيل</string>
<string name="msg_running_detail">انقر للحصول على التفاصيل</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-az/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,6 @@
<string name="msg_popup_permission">Bu icazə, ani görüntü rejimində
\naçmaq üçün lazımdır</string>
<string name="msg_copied">Buferə kopyalandı</string>
<string name="msg_threads">Parçalar</string>
<string name="rename">Adını dəyişdir</string>
<string name="create">Yarat</string>
<plurals name="subscribers">
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-b+ast/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
<string name="delete">Desaniciar</string>
<string name="checksum">Suma de comprobación</string>
<string name="ok">Aceutar</string>
<string name="msg_threads">Filos</string>
<string name="msg_error">Fallu</string>
<string name="msg_wait">Espera…</string>
<string name="msg_copied">Copióse al cartafueyu</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-b+uz+Latn/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@
<string name="msg_running_detail">Tafsilotlar uchun bosing</string>
<string name="msg_running">NePipe yuklab olinmoqda</string>
<string name="msg_error">Xato</string>
<string name="msg_threads">Iplar</string>
<string name="msg_name">Faylnomi</string>
<string name="ok">Ok</string>
<string name="rename">Nomni o\'zgartirish</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-be/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@
<string name="rename">Перайменаваць</string>
<string name="ok">ОК</string>
<string name="msg_name">Імя файла</string>
<string name="msg_threads">Патокі</string>
<string name="msg_error">Памылка</string>
<string name="msg_running">NewPipe спампоўвае</string>
<string name="msg_running_detail">Падрабязнасці</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-bg/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@
<string name="checksum">Контролна сума</string>
<string name="ok">ОК</string>
<string name="msg_name">Име на файла</string>
<string name="msg_threads">Нишки</string>
<string name="msg_error">Грешка</string>
<string name="msg_running">NewPipe Изтегляне</string>
<string name="msg_running_detail">Докосни за подробности</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-bn-rBD/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@
<string name="ok">ঠিক আছে</string>
<!-- Msg -->
<string name="msg_name">ফাইলের নাম</string>
<string name="msg_threads">থ্রেড</string>
<string name="msg_error">ত্রুটি</string>
<string name="msg_running">NewPipe ডাউনলোড হচ্ছে</string>
<string name="msg_running_detail">বিস্তারিত জানার জন্য আলতো চাপ</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-bn-rIN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
<string name="msg_running_detail">বিস্তারিত জানার জন্য আলতো চাপ</string>
<string name="msg_running">NewPipe ডাউনলোড হচ্ছে</string>
<string name="msg_error">ত্রুটি</string>
<string name="msg_threads">থ্রেড</string>
<string name="msg_name">ফাইলের নাম</string>
<string name="ok">ঠিক আছে</string>
<string name="rename">নাম পরিবর্তন করুন</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-bn/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@
<string name="msg_running_detail">বিস্তারিত জানার জন্য আলতো চাপ</string>
<string name="msg_running">NewPipe ডাউনলোড হচ্ছে</string>
<string name="msg_error">ত্রুটি</string>
<string name="msg_threads">থ্রেড</string>
<string name="msg_name">ফাইলের নাম</string>
<string name="ok">ঠিক আছে</string>
<string name="rename">নাম পরিবর্তন করুন</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-ca/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@
<string name="checksum">Suma de verificació</string>
<string name="dismiss">Tanca</string>
<string name="rename">Canvia el nom</string>
<string name="msg_threads">Fils</string>
<string name="msg_running">Baixada del NewPipe activa</string>
<string name="msg_wait">Un moment…</string>
<string name="msg_copied">S\'ha copiat al porta-retalls</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-ckb/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@
<string name="title_licenses">مۆڵەتنامەی لایەنی-سێیەم</string>
<string name="app_license_title">مۆڵەتنامەی نیوپایپ</string>
<string name="show_hold_to_append_title">پیشاندانی ڕێنمایی ”داگرتن تا پاشکۆ”</string>
<string name="msg_threads">دابەشکراوەکان</string>
<string name="title_most_played">زۆرترین لێدراو</string>
<string name="unbookmark_playlist">لادانی نیشانه‌كراو</string>
<string name="tab_licenses">مۆڵەتەکان</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-cs/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
<string name="msg_running_detail">Klepněte pro podrobnosti</string>
<string name="msg_error">Chyba</string>
<string name="msg_name">Jméno souboru</string>
<string name="msg_threads">Vlákna</string>
<string name="pause">Zastavit</string>
<string name="delete">Smazat</string>
<string name="start">Start</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-da/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@
<string name="rename">Omdøb</string>
<string name="ok">OK</string>
<string name="msg_name">Filnavn</string>
<string name="msg_threads">Tråde</string>
<string name="msg_error">Fejl</string>
<string name="msg_running">NewPiper downloader</string>
<string name="msg_running_detail">Tryk for detaljer</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@
<string name="pause">Pause</string>
<string name="ok">OK</string>
<string name="app_ui_crash">App/UI abgestürzt</string>
<string name="msg_threads">Threads</string>
<string name="msg_running">NewPipe lädt herunter</string>
<string name="msg_running_detail">Für Details antippen</string>
<string name="black_theme_title">Schwarz</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-el/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@
<string name="rename">Μετονομασία</string>
<string name="ok">Εντάξει</string>
<string name="msg_name">Όνομα αρχείου</string>
<string name="msg_threads">Νήματα</string>
<string name="msg_running">Λήψη NewPipe</string>
<string name="msg_wait">Παρακαλώ περιμένετε…</string>
<string name="msg_copied">Αντιγράφηκε στο πρόχειρο</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-eo/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,6 @@
<string name="checksum">Kontrolsumo</string>
<string name="ok">Bone</string>
<string name="msg_name">Dosiernomo</string>
<string name="msg_threads">Fadenoj</string>
<string name="msg_error">Eraro</string>
<string name="msg_running">NewPipe estas elŝutanta</string>
<string name="msg_running_detail">Premu por detaladoj</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
<string name="checksum">Suma de comprobación</string>
<string name="ok">Aceptar</string>
<string name="msg_name">Nombre del archivo</string>
<string name="msg_threads">Subprocesos</string>
<string name="msg_error">Error</string>
<string name="msg_running">NewPipe está descargando</string>
<string name="msg_running_detail">Toca para ver detalles</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-et/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@
<string name="rename">Nimeta ümber</string>
<string name="ok">OK</string>
<string name="msg_name">Faili nimi</string>
<string name="msg_threads">Lõimed</string>
<string name="msg_error">Viga</string>
<string name="msg_running">NewPipe allalaadimine</string>
<string name="msg_running_detail">Üksikasjade nägemiseks toksa</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-eu/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@
<string name="checksum">Egiaztaketa-batura</string>
<string name="ok">Ados</string>
<string name="msg_name">Fitxategi-izena</string>
<string name="msg_threads">Hariak</string>
<string name="msg_error">Errorea</string>
<string name="msg_running">NewPipe deskargatzen</string>
<string name="msg_running_detail">Ukitu xehetasunetarako</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-fa/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
<string name="checksum">مجموع مقابله‌ای</string>
<string name="ok">قبول</string>
<string name="msg_name">نام پرونده</string>
<string name="msg_threads">رشته‌ها</string>
<string name="msg_error">خطا</string>
<string name="msg_running">نیوپایپ در حال بارگیری است</string>
<string name="msg_running_detail">برای جزییات، ضربه بزنید</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-fi/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@
<string name="checksum">Tarkistussumma</string>
<string name="ok">OK</string>
<string name="msg_name">Tiedostonimi</string>
<string name="msg_threads">Säikeet</string>
<string name="msg_error">Virhe</string>
<string name="msg_running">NewPipe Lataus käynnissä</string>
<string name="msg_running_detail">Napauta nähdäksesi lisää</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@
<string name="checksum">Somme de contrôle</string>
<string name="ok">OK</string>
<string name="msg_name">Nom du fichier</string>
<string name="msg_threads">Connexions simultanées</string>
<string name="msg_error">Erreur</string>
<string name="msg_running">NewPipe télécharge</string>
<string name="msg_running_detail">Appuyer pour plus de détails</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-gl/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@
<string name="rename">Renomear</string>
<string name="ok">OK</string>
<string name="msg_name">Nome do ficheiro</string>
<string name="msg_threads">Fios</string>
<string name="msg_error">Erro</string>
<string name="msg_running">Descarga do NewPipe</string>
<string name="msg_running_detail">Toque para ver detalles</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-he/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@
<string name="checksum">גיבוב לאימות</string>
<string name="ok">אישור</string>
<string name="msg_name">שם קובץ</string>
<string name="msg_threads">תהליכי משנה</string>
<string name="msg_error">שגיאה</string>
<string name="msg_running">NewPipe בהורדה</string>
<string name="msg_running_detail">יש לגעת לפרטים נוספים</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-hi/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@
<string name="checksum">चेकसम</string>
<string name="ok">ठीक है</string>
<string name="msg_name">फाइल का नाम</string>
<string name="msg_threads">थ्रेड्स</string>
<string name="msg_error">त्रुटी</string>
<string name="msg_running">न्यूपाइप डाउनलोड कर रही है</string>
<string name="msg_running_detail">विवरण के लिए टैप करें</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-hr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@
<string name="checksum">Kontrolni zbroj</string>
<string name="ok">U redu</string>
<string name="msg_name">Naziv datoteke</string>
<string name="msg_threads">Komponente procesa</string>
<string name="msg_error">Greška</string>
<string name="msg_running">NewPipe preuzimanje</string>
<string name="msg_running_detail">Dodirni za prikaz detalja</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-hu/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
<string name="checksum">Ellenőrzőösszeg</string>
<string name="ok">Rendben</string>
<string name="msg_name">Fájlnév</string>
<string name="msg_threads">Szálak</string>
<string name="msg_error">Hiba</string>
<string name="msg_running">NewPipe letöltés folyamatban</string>
<string name="msg_running_detail">Koppintson a részletekért</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-hy/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,6 @@
<string name="app_language_title">Ափփի լեզու</string>
<string name="notification_action_nothing">Ոչինչ</string>
<string name="no_subscribers">Առանց հետևորդ</string>
<string name="msg_threads">Հոսքեր</string>
<string name="add_to_playlist">Ավելացնել նվագացանկին</string>
<string name="caption_none">Անենթագիր</string>
<string name="caption_setting_title">Ենթագրեր</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-in/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@
<string name="no_player_found">Pemutar stream tidak ada. Pasang VLC?</string>
<string name="app_ui_crash">App/UI rusak</string>
<string name="info_labels">Apa:\\nPermintaan:\\nBahasa Konten:\\nNegara Konten:\\nBahasa Apl:\\nLayanan:\\nWaktu GMT:\\nPaket:\\nVersi:\\nVersi OS:</string>
<string name="msg_threads">Thread</string>
<string name="title_activity_recaptcha">Tantangan reCAPTCHA</string>
<string name="recaptcha_request_toast">Meminta kode reCAPTCHA</string>
<string name="black_theme_title">Hitam</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-is/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,6 @@
<string name="no_comments">Engin ummæli</string>
<string name="comments_are_disabled">Ummæli eru óvirk</string>
<string name="checksum">Gátsumma</string>
<string name="msg_threads">Þræðir</string>
<string name="msg_error">Villa</string>
<string name="msg_running_detail">Pikkaðu á til að fá nánari upplýsingar</string>
<string name="msg_wait">Bíddu aðeins…</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-it/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
<string name="checksum">Checksum</string>
<string name="ok">OK</string>
<string name="msg_name">Nome del file</string>
<string name="msg_threads">Thread</string>
<string name="msg_error">Errore</string>
<string name="msg_running">NewPipe sta scaricando</string>
<string name="msg_running_detail">Tocca per maggiori dettagli</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-ja/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@
<string name="checksum">チェックサム</string>
<string name="ok">OK</string>
<string name="msg_name">ファイル名</string>
<string name="msg_threads">同時接続数</string>
<string name="msg_error">エラー</string>
<string name="msg_running">ダウンロード中 (NewPipe)</string>
<string name="msg_running_detail">タップして詳細を表示</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-ka/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,6 @@
<string name="pause">პაუზა</string>
<string name="rename">გადარქმევა</string>
<string name="msg_name">ფაილის სახელი</string>
<string name="msg_threads">ძაფები</string>
<string name="msg_error">შეცდომა</string>
<string name="msg_running">NewPipe-ის ჩამოტვირთვა</string>
<string name="msg_running_detail">შეეხეთ დეტალებისთვის</string>
Expand Down
Loading
Loading