Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Weblate 2018-04-01 15:38:23 +02:00
commit 4160bbb8c4
31 changed files with 63 additions and 95 deletions

View File

@ -5,7 +5,7 @@ android:
components:
# The BuildTools version used by NewPipe
- tools
- build-tools-27.0.1
- build-tools-27.0.3
# The SDK version used to compile NewPipe
- android-27

View File

@ -8,8 +8,8 @@ android {
applicationId "org.schabi.newpipe"
minSdkVersion 15
targetSdkVersion 27
versionCode 49
versionName "0.13.0"
versionCode 60
versionName "0.13.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
@ -26,13 +26,6 @@ android {
debuggable true
applicationIdSuffix ".debug"
}
beta {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
applicationIdSuffix ".beta"
}
}
lintOptions {
@ -98,7 +91,6 @@ dependencies {
annotationProcessor "frankiesardo:icepick-processor:$icepickLibVersion"
debugImplementation "com.squareup.leakcanary:leakcanary-android:$leakCanaryLibVersion"
betaImplementation "com.squareup.leakcanary:leakcanary-android-no-op:$leakCanaryLibVersion"
releaseImplementation "com.squareup.leakcanary:leakcanary-android-no-op:$leakCanaryLibVersion"
implementation 'com.squareup.okhttp3:okhttp:3.9.1'

View File

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<application
android:label="NewPipe Beta"
tools:replace="android:label">
</application>
</manifest>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

View File

@ -44,7 +44,6 @@ import android.view.View;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.TextView;
import android.widget.Toast;
import org.schabi.newpipe.extractor.NewPipe;
import org.schabi.newpipe.extractor.StreamingService;
@ -94,44 +93,48 @@ public class MainActivity extends AppCompatActivity {
drawer = findViewById(R.id.drawer_layout);
drawerItems = findViewById(R.id.navigation);
//drawerItems.setItemIconTintList(null); // Set null to use the original icon
for(StreamingService s : NewPipe.getServices()) {
String title =
s.getServiceInfo().getName() +
(ServiceHelper.isBeta(s) ? " (beta)" : "");
MenuItem item = drawerItems.getMenu()
.add(R.id.menu_services_group, s.getServiceId(), 0, title);
item.setIcon(ServiceHelper.getIcon(s.getServiceId()));
}
drawerItems.getMenu().getItem(ServiceHelper.getSelectedServiceId(this)).setChecked(true);
if (!BuildConfig.BUILD_TYPE.equals("release")) {
toggle = new ActionBarDrawerToggle(this, drawer, toolbar, R.string.drawer_open, R.string.drawer_close);
toggle.syncState();
drawer.addDrawerListener(toggle);
drawer.addDrawerListener(new DrawerLayout.SimpleDrawerListener() {
private int lastService;
toggle = new ActionBarDrawerToggle(this, drawer, toolbar, R.string.drawer_open, R.string.drawer_close);
toggle.syncState();
drawer.addDrawerListener(toggle);
drawer.addDrawerListener(new DrawerLayout.SimpleDrawerListener() {
private int lastService;
@Override
public void onDrawerOpened(View drawerView) {
lastService = ServiceHelper.getSelectedServiceId(MainActivity.this);
@Override
public void onDrawerOpened(View drawerView) {
lastService = ServiceHelper.getSelectedServiceId(MainActivity.this);
}
@Override
public void onDrawerClosed(View drawerView) {
if (lastService != ServiceHelper.getSelectedServiceId(MainActivity.this)) {
new Handler(Looper.getMainLooper()).post(MainActivity.this::recreate);
}
}
});
@Override
public void onDrawerClosed(View drawerView) {
if (lastService != ServiceHelper.getSelectedServiceId(MainActivity.this)) {
new Handler(Looper.getMainLooper()).post(MainActivity.this::recreate);
}
}
});
drawerItems.setNavigationItemSelectedListener(this::changeService);
drawerItems.setNavigationItemSelectedListener(this::changeService);
setupDrawerFooter();
setupDrawerHeader();
} else {
drawer.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);
}
setupDrawerFooter();
setupDrawerHeader();
}
private boolean changeService(MenuItem item) {
if (item.getGroupId() == R.id.menu_services_group) {
drawerItems.getMenu().getItem(ServiceHelper.getSelectedServiceId(this)).setChecked(false);
ServiceHelper.setSelectedServiceId(this, item.getTitle().toString());
ServiceHelper.setSelectedServiceId(this, item.getItemId());
drawerItems.getMenu().getItem(ServiceHelper.getSelectedServiceId(this)).setChecked(true);
headerServiceView.setText("gurken");
} else {
return false;
}
@ -176,11 +179,9 @@ public class MainActivity extends AppCompatActivity {
// when the user returns to MainActivity
drawer.closeDrawer(Gravity.START, false);
try {
if(BuildConfig.BUILD_TYPE != "release" ) {
String selectedServiceName = NewPipe.getService(
ServiceHelper.getSelectedServiceId(this)).getServiceInfo().getName();
headerServiceView.setText(selectedServiceName);
}
String selectedServiceName = NewPipe.getService(
ServiceHelper.getSelectedServiceId(this)).getServiceInfo().getName();
headerServiceView.setText(selectedServiceName);
} catch (Exception e) {
ErrorActivity.reportUiError(this, e);
}
@ -312,9 +313,6 @@ public class MainActivity extends AppCompatActivity {
case R.id.action_about:
NavigationHelper.openAbout(this);
return true;
case R.id.action_history:
NavigationHelper.openHistory(this);
return true;
default:
return super.onOptionsItemSelected(item);
}

View File

@ -65,7 +65,6 @@ public class ServiceHelper {
}
public static int getSelectedServiceId(Context context) {
if (BuildConfig.BUILD_TYPE.equals("release")) return DEFAULT_FALLBACK_SERVICE.getServiceId();
final String serviceName = PreferenceManager.getDefaultSharedPreferences(context)
.getString(context.getString(R.string.current_service_key), context.getString(R.string.default_service_value));
@ -110,4 +109,11 @@ public class ServiceHelper {
return TimeUnit.MILLISECONDS.convert(1, TimeUnit.HOURS);
}
}
public static boolean isBeta(final StreamingService s) {
switch(s.getServiceInfo().getName()) {
case "YouTube": return false;
default: return true;
}
}
}

View File

@ -75,8 +75,8 @@
android:layout_below="@id/drawer_header"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:menu="@menu/drawer_items"
app:elevation="0dp"/>
<!-- app:menu="@menu/drawer_items" -->
<LinearLayout
android:id="@+id/navigation_drawer_footer"

View File

@ -1,22 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item android:id="@+id/action_show_downloads"
android:orderInCategory="980"
android:title="@string/downloads"
app:showAsAction="never"/>
<item android:id="@+id/action_history"
android:orderInCategory="981"
android:title="@string/action_history"
app:showAsAction="never"/>
<item android:id="@+id/action_settings"
android:orderInCategory="990"
android:title="@string/settings"
app:showAsAction="never"/>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/action_about"
android:orderInCategory="1000"

View File

@ -154,7 +154,7 @@
<string name="error_snackbar_action">تقرير</string>
<string name="what_device_headline">معلومات:</string>
<string name="what_happened_headline">ماذا حدث:</string>
<string name="info_labels">What:\\nRequest:\\nContent Lang:\\nService:\\nGMT Time:\\nPackage:\\nVersion:\\nOS version:\\nGlob. IP range:</string>
<string name="info_labels">What:\\nRequest:\\nContent Lang:\\nService:\\nGMT Time:\\nPackage:\\nVersion:\\nOS version:</string>
<string name="your_comment">تعليقك (باللغة الإنجليزية):</string>
<string name="error_details_headline">تفاصيل:</string>

View File

@ -108,7 +108,6 @@
<string name="error_snackbar_action">প্রতিবেদন</string>
<string name="what_device_headline">তথ্য:</string>
<string name="what_happened_headline">কি হয়েছিল:</string>
<!-- <string name="info_labels">What:\\nRequest:\\nContent Lang:\\nService:\\nGMT Time:\\nPackage:\\nVersion:\\nOS version:\\nGlob. IP range:</string> -->
<string name="your_comment">তোমার মন্তব্য (ইংরেজিতে):</string>
<string name="error_details_headline">বর্ণনা:</string>

View File

@ -129,7 +129,7 @@
<string name="user_report">Hlášení uživatele</string>
<string name="info_labels">Co:\\nŽádost:\\nJazyk obsahu:\\nSlužba:\\nČas GMT:\\nBalíček:\\nVerze:\\nVerze OS:\\nGlobální rozsah IP:</string>
<string name="info_labels">Co:\\nŽádost:\\nJazyk obsahu:\\nSlužba:\\nČas GMT:\\nBalíček:\\nVerze:\\nVerze OS:</string>
<string name="all">Vše</string>
<string name="channel">Kanál</string>
<string name="yes">Ano</string>

View File

@ -236,7 +236,7 @@
<string name="delete_item_search_history">Haluatko poistaa tämän hakuhistoriasta?</string>
<string name="resume_on_audio_focus_gain_title">Jatka toistoa</string>
<string name="what_device_headline">Info:</string>
<string name="info_labels">Mikä:\\nPyyntö:\\nSisällön kieli:\\nPalvelu:\\nGMT Aika:\\nPaketti:\\nVersio:\\nOS versio:\\nGlob. IP väli:</string>
<string name="info_labels">Mikä:\\nPyyntö:\\nSisällön kieli:\\nPalvelu:\\nGMT Aika:\\nPaketti:\\nVersio:\\nOS versio:</string>
<string name="copyright" formatted="true">© %1$s %2$s %3$s alla</string>
<string name="main_page_content">Pääsivun sisältö</string>
<string name="blank_page_summary">Tyhjä sivu</string>

View File

@ -141,7 +141,7 @@
<string name="later">Plus tard</string>
<string name="disabled">Désactivé</string>
<string name="info_labels">Quoi :\\nRequête :\\nLangue du contenu :\\nService :\\nHeure GMT :\\nPaquet :\\nVersion :\\nVersion du système :\\nGlob. Plage IP :</string>
<string name="info_labels">Quoi :\\nRequête :\\nLangue du contenu :\\nService :\\nHeure GMT :\\nPaquet :\\nVersion :\\nVersion du système :</string>
<string name="use_old_player_title">Utiliser l\'ancien lecteur</string>
<string name="use_old_player_summary">Ancienne version du lecteur Mediaframework</string>
<string name="short_thousand">K</string>

View File

@ -165,7 +165,7 @@
<string name="error_snackbar_action">रिपोर्ट</string>
<string name="what_device_headline">जानकारी:</string>
<string name="what_happened_headline">क्या हुआ:</string>
<string name="info_labels">क्या:\\nमांग:\\nविषयवस्तु की भाषा:\\nसेवा:\\nजीएमटी समय:\\nपैकेज:\\nसंस्करण:\\nOS संस्करण:\\nGLOB. IP रेंज:</string>
<string name="info_labels">क्या:\\nमांग:\\nविषयवस्तु की भाषा:\\nसेवा:\\nजीएमटी समय:\\nपैकेज:\\nसंस्करण:\\nOS संस्करण:</string>
<string name="your_comment">आपकी टिप्पणी:</string>
<string name="error_details_headline">विवरण:</string>

View File

@ -124,7 +124,7 @@
<string name="error_snackbar_action">PRIJAVI</string>
<string name="what_device_headline">Informacije:</string>
<string name="what_happened_headline">Što se dogodilo:</string>
<string name="info_labels">Što:\\nRequest:\\nContent Jezik:\\nService:\\nGMT Vrijeme:\\nPackage:\\nVersion:\\nOS version:\\nGlob. IP range:</string>
<string name="info_labels">Što:\\nRequest:\\nContent Jezik:\\nService:\\nGMT Vrijeme:\\nPackage:\\nVersion:\\nOS version:</string>
<string name="your_comment">Vaš komentar (na engleskom):</string>
<string name="error_details_headline">Detalji:</string>

View File

@ -191,7 +191,7 @@
<string name="video_streams_empty">Nem található videó formátum</string>
<string name="audio_streams_empty">Nem található hang csatorna</string>
<string name="info_labels">Mi:\\nKérés:\\nTartalom nyelve:\\nSzolgáltatás:\\nGMT Idő:\\nCsomag:\\nVerzió:\\nOperációs Rendszer verzió:\\nGlobális IP tartomány:</string>
<string name="info_labels">Mi:\\nKérés:\\nTartalom nyelve:\\nSzolgáltatás:\\nGMT Idő:\\nCsomag:\\nVerzió:\\nOperációs Rendszer verzió:</string>
<string name="search_no_results">Nincs találat</string>
<string name="use_old_player_title">Régi lejátszó használata</string>
</resources>

View File

@ -127,7 +127,7 @@
<string name="could_not_load_image">Impossibile caricare l\'immagine</string>
<string name="app_ui_crash">L\'app/UI si è interrotta</string>
<string name="info_labels">Cosa:\\nRichiesta:\\nLingua contenuto:\\nServizio:\\nOrario GMT:\\nPacchetto:\\nVersione:\\nVersione SO:\\nRange IP glob.:</string>
<string name="info_labels">Cosa:\\nRichiesta:\\nLingua contenuto:\\nServizio:\\nOrario GMT:\\nPacchetto:\\nVersione:\\nVersione SO:</string>
<string name="reCaptchaActivity">reCAPTCHA</string>
<string name="reCaptcha_title">reCAPTCHA</string>

View File

@ -128,7 +128,7 @@
<string name="could_not_load_image">画像を読み込みできません</string>
<string name="app_ui_crash">アプリ/UI がクラッシュしました</string>
<string name="info_labels">何:\\n提案:\\nコンテンツ言語:\\nサービス:\\nGMT 時間:\\nパッケージ:\\nバージョン:\\nOS バージョン:\\nグローバル IP 範囲:</string>
<string name="info_labels">何:\\n提案:\\nコンテンツ言語:\\nサービス:\\nGMT 時間:\\nパッケージ:\\nバージョン:\\nOS バージョン:</string>
<string name="reCaptchaActivity">reCAPTCHA</string>
<string name="reCaptcha_title">reCAPTCHA の要求</string>

View File

@ -102,7 +102,7 @@
<string name="error_snackbar_action">ATASKAITA</string>
<string name="what_device_headline">Informacija:</string>
<string name="what_happened_headline">Kas nutiko:</string>
<string name="info_labels">Kas:\\nUžklausa:\\nTurinys Kalba:\\nPaslauga:\\nGMT Time:\\nPaketas:\\nVersija:\\nOperacinė Sistema versija:\\nGlob. IP diapazonas:</string>
<string name="info_labels">Kas:\\nUžklausa:\\nTurinys Kalba:\\nPaslauga:\\nGMT Time:\\nPaketas:\\nVersija:\\nOperacinė Sistema versija:</string>
<string name="your_comment">Jūsų komentaras (anglų kalba):</string>
<string name="error_details_headline">Detalės:</string>

View File

@ -148,7 +148,7 @@ pentru a deschide în mod pop-up</string>
<string name="could_not_load_image">Nu s-a putut încărca imaginea</string>
<string name="app_ui_crash">App/UI eroare</string>
<string name="info_labels">What:\\nRequest:\\nContent Lang:\\nService:\\nGMT Time:\\nPackage:\\nVersion:\\nOS version:\\nGlob. IP clasa:</string>
<string name="info_labels">What:\\nRequest:\\nContent Lang:\\nService:\\nGMT Time:\\nPackage:\\nVersion:\\nOS version:</string>
<string name="use_old_player_title">Folosește player vechi</string>
<string name="use_old_player_summary">Player Mediaframework implicit</string>

View File

@ -123,7 +123,7 @@
<string name="could_not_load_image">Nemožno načítať obrázok</string>
<string name="app_ui_crash">Aplikácia/UP zlyhalo</string>
<string name="info_labels">Čo:\\nPožiadavka:\\nJazyk obsahu:\\nSlužba:\\nČas v GMT:\\nBalík:\\nVerzia:\\nVerzia OS:\\nGlob. IP rozsah:</string>
<string name="info_labels">Čo:\\nPožiadavka:\\nJazyk obsahu:\\nSlužba:\\nČas v GMT:\\nBalík:\\nVerzia:\\nVerzia OS:</string>
<string name="reCaptchaActivity">reCAPTCHA</string>
<string name="reCaptcha_title">Výzva reCAPTCHA</string>

View File

@ -77,7 +77,7 @@
<string name="error_snackbar_action">BİLDİR</string>
<string name="what_device_headline">Bilgi:</string>
<string name="what_happened_headline">Ne oldu:</string>
<string name="info_labels">Ne:\\nİstek:\\nİçerik Dili:\\nHizmet:\\nGMT Zamanı:\\nPaket:\\nSürüm:\\nİşletim sistemi sürümü:\\nGlob. IP aralığı:</string>
<string name="info_labels">Ne:\\nİstek:\\nİçerik Dili:\\nHizmet:\\nGMT Zamanı:\\nPaket:\\nSürüm:\\nİşletim sistemi sürümü:</string>
<string name="detail_thumbnail_view_description">Video ön izleme küçük resmi</string>
<string name="detail_uploader_thumbnail_view_description">Yükleyenin küçük resmi</string>
<string name="detail_likes_img_view_description">Beğeni</string>

View File

@ -252,7 +252,7 @@
<string name="toggle_orientation">Перемкнути орієнтацію</string>
<string name="player_unrecoverable_failure">Фатальна помилка програвача</string>
<string name="external_player_unsupported_link_type">Зовнішні програвачі не підтримують такі види ланок</string>
<string name="info_labels">Що:\\nЗапит:\\nМова змісту:\\nСервіс:\\nЧас GMT:\\nПакунок:\\nВерсія:\\nВерсія ОС:\\nГлоб. діапазон IP :</string>
<string name="info_labels">Що:\\nЗапит:\\nМова змісту:\\nСервіс:\\nЧас GMT:\\nПакунок:\\nВерсія:\\nВерсія ОС:</string>
<string name="detail_uploader_thumbnail_view_description">Ескіз аватару користувача</string>
<string name="detail_likes_img_view_description">Сподобалося</string>
<string name="detail_dislikes_img_view_description">Не сподобалося</string>

View File

@ -102,7 +102,7 @@
<string name="error_snackbar_action">BÁo CÁO</string>
<string name="what_device_headline">Thông tin:</string>
<string name="what_happened_headline">Chuyện gì đã xảy ra:</string>
<string name="info_labels">Gì: \\nRequest:\\nContent Lang:\\nService:\\nGMT Time:\\nPackage:\\nVersion:\\nOS version:\\nGlob. IP range:</string>
<string name="info_labels">Gì: \\nRequest:\\nContent Lang:\\nService:\\nGMT Time:\\nPackage:\\nVersion:\\nOS version:</string>
<string name="your_comment">Nhận xét của bạn (bằng tiếng Anh):</string>
<string name="error_details_headline">Chi tiết:</string>

View File

@ -135,7 +135,7 @@
<string name="later">稍候</string>
<string name="could_not_load_image">無法取得圖片</string>
<string name="app_ui_crash">應用程式或介面出現問題</string>
<string name="info_labels">事件:\\n請求\\n內容語言\\n服務\\nGMT 時間:\\nPackage\\n版本\\n作業系統版本\\n全球 IP 域:</string>
<string name="info_labels">事件:\\n請求\\n內容語言\\n服務\\nGMT 時間:\\nPackage\\n版本\\n作業系統版本</string>
<string name="use_old_player_title">使用舊播放器</string>

View File

@ -113,7 +113,7 @@
<string name="error_snackbar_action">回報</string>
<string name="what_device_headline">資訊:</string>
<string name="what_happened_headline">發生了什麼事:</string>
<string name="info_labels">發生了什麼:\\n請求\\n內容語言\\n服務\\nGMT 時間:\\n套件\\n版本\\n系統版本\\nGlob. IP 範圍:</string>
<string name="info_labels">發生了什麼:\\n請求\\n內容語言\\n服務\\nGMT 時間:\\n套件\\n版本\\n系統版本</string>
<string name="your_comment">您的留言(請用英文)</string>
<string name="error_details_headline">詳細資訊:</string>

View File

@ -189,7 +189,7 @@
<string name="error_snackbar_action">REPORT</string>
<string name="what_device_headline">Info:</string>
<string name="what_happened_headline">What happened:</string>
<string name="info_labels">What:\\nRequest:\\nContent Lang:\\nService:\\nGMT Time:\\nPackage:\\nVersion:\\nOS version:\\nGlob. IP range:</string>
<string name="info_labels">What:\\nRequest:\\nContent Lang:\\nService:\\nGMT Time:\\nPackage:\\nVersion:\\nOS version:</string>
<string name="your_comment">Your comment (in English):</string>
<string name="error_details_headline">Details:</string>