Z*+F|o6k%kp_ZCz*f8E7%%&BG?e4K9{QVnG3Idx6wWEg3=( yCaKOAspDtYsZj%^&9$}{jhc)Z<41K8g*+a{2elMVpUX-nVD zO|sdbys|xLjrcu8D2 DJ;^@DWua?ZEHMY1TI~?Vh)N5VU5Wex6AXD4c=;?SL^ve5) zvSzt=h9sU{eYG?kP~+*?2d*LjtAvqfq!e3XL6qnNRe)dpgzD5W~#)45U#|`slMd z<;-Xwo1i?OIX>>*H&F;C%L=-ne< UgL-;;+^I&P!B77oG#_7&(Q0A|qUj$z**PHc7lOEWlSzFa=$CO6 zEb8Sl>NIF4UzkdVg%CXbY4D1I-xBB>xPgC9UbktsfZm== gWT4kG`dISzAQUGaj`S(oMFUA+=-QE9-Z&lf)d9CQ}} zfO_PJt$;MpD#7Mo)4@jbf;aWV%qv{RF7l}Z?Ss}ns|B6jo)5>RJ>skzYoa%Prsp3A zj&Q_~4Vd39L>~bQxBx?WuPUXM?dgZu)DhbbohyRehZur~3@`J5gO q!ZPjF%OP zQNRiIzQW36UbnKc3Jwko#2K$C6d&UH!`nH5AZT+jVb3ZncMoaM_`zJ>)d;xo04(ub zz3#~tzlk!3jF_$H>lVb3Yg&bXInt7VGBfZ#Y-t2bS}pWsXIw(%MVg@9_;w~~4R5i4 zxGvep2B a~e_0Hf$Jb zySl$wZ&{63ZY?}fi(d{<655Is&|80Nb7zLW0t1-JSMq^QlQOwhG}=YLVaL{LP6Hno zp`7lMpoK^1LEfF%I#MDFgdnZP2YTQs!8`>Yfi1Z^)E`3|#+|+qDCat+y@^~Bn0edi z$$kc2pz6Fqj23VqMT_^wwwf$~U}Z1 G?_`g1oUsH04INGqe#wD!Hbpw1jycmYV9ah3m_oFW_O`%dqN=a {ZI{=JIOkDhASIH5sIqc5>=0 QwoduxUl zbjM(zIcHuCA4}W|hV1xg7nEopF_jy4AdFKc&&NF$)Gi%hY#F274s`#P>HQ-L+)G;J zCrH!O6Kk3P5Q-KG#%*c@U-JCFdn5P%<1WSaO~N~;y!#DjKh}fyjuk+=eu(#pkW+?U z=T3nSXqTpzftuDXwOzZNG_?%1^bK|O)iiYtH8p7^W8l5!|Ko 1^@s6 literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xhdpi/ic_kiosklocal_black_24dp.png b/app/src/main/res/drawable-xhdpi/ic_kiosklocal_black_24dp.png new file mode 100755 index 0000000000000000000000000000000000000000..e20865ab0b15605d8c51d2386cecfaf674080a89 GIT binary patch literal 235 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA0wn)(8}b0DO`a}}Ar*{C3#=tr7bh?YT;kba zv?l2Xf6M9y9VrIAwq~CH3qL4Ka8Fg>%9!8NE78)(u#9KoEYTYcni5U1H+n^5F7ICW zbBksCp_e_Ur?Um9@;y4;Y|cDW!zDQ}Nx)eB &b =;`TVenJ literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xhdpi/ic_kiosklocal_white_24dp.png b/app/src/main/res/drawable-xhdpi/ic_kiosklocal_white_24dp.png new file mode 100755 index 0000000000000000000000000000000000000000..2d3474832d420c541225548569aba317a0ede07c GIT binary patch literal 226 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA0wn)(8}b0Dm7Xq+Ar*{oFE12qb`WrT*n8l? z#Vro(A&!DynilZwTEG rPAko^B0V9bB1fa&Kjb_1b)`yN=Iidrg1Qy0Yj{O;1P5Pl1`@T^te1G8C8uI~-V? aIQ&Z&u5O4^zOxMIXa-MLKbLh*2~7amL|PgE literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xhdpi/ic_kioskrecent_black_24dp.png b/app/src/main/res/drawable-xhdpi/ic_kioskrecent_black_24dp.png new file mode 100755 index 0000000000000000000000000000000000000000..54e81598012322cc3c06622fe2597cde8610b028 GIT binary patch literal 597 zcmV-b0;>IqP) uZrpewH=uD1?YC;c^D@nD -&Gbfc)nx)c?8!-e)%> j{?9e`5UUwVo1l{l8^BdtbC;&P00000NkvXXu0mjfTHO)h literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xhdpi/ic_kioskrecent_white_24dp.png b/app/src/main/res/drawable-xhdpi/ic_kioskrecent_white_24dp.png new file mode 100755 index 0000000000000000000000000000000000000000..3141a790d7100e25ca4be716c91e15ca93092f65 GIT binary patch literal 588 zcmV-S0<-;zP) HQ)4A=4-jdiCEDW-ZSn$mg}b}EBv*c9;b(5faQNDhH9l+G zpW#1xGM^1x1LP_jnMY5Hk3Ov848@#bC4DR^5>)dVKd-4KVc}82Rf4)oN!VlGfXGXB zGm{bYCP9*(3}+6zc!kJ@z~@0{4kG|}SwPA>kYWLM5rD&VF@LmWKLT0mNLw>VQ%4g5 z`)Fr=*nq%8CRzYY<{<*>{Z^ijzy 7-I`I^_7w-9{FZYnAbhctxgS=v- z=W@Yw*=SxOYt0+oXhh0P0tN_WNF&|N3pL0c5|IKD+(v55MN94@OH4up2uqNAv~(9v zL~ ZDukejqL7uCq^$e-&wNR4@+JB>(rq=0gyk#0ZY zmpPJG$lB&ASJa<=ALpm 87V|?p_5qTm3jgYu4O|_C zE>8LN3?a>8xBNz}?|YcV2zrwuNiRk)huyr6Sl^=$AU}PCia!LNjXnhWjjoanv^bivy@(76}`YDB`;iD)0iM}Xii0p(c#;<30ISP44;|Lnbn 4h3!22o7)XgFg2J7Y!Kd^}C zW)Z&td+)z2+-Z_kCm$=YTV^!ba}`Z!mU#kXpK# My85}Sb4q9e05FAaVgLXD literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xxhdpi/ic_kiosklocal_white_24dp.png b/app/src/main/res/drawable-xxhdpi/ic_kiosklocal_white_24dp.png new file mode 100755 index 0000000000000000000000000000000000000000..6b27fb23cb9c70d3538bee222ad7925ffe7b37cf GIT binary patch literal 284 zcmeAS@N?(olHy`uVBq!ia0vp^9w5xY0wn)GsXhaw9(%ethEy=Vy|R$EnL)($VtnJl z#gUD?Gny1{uwJyh(Zm_S*n2!7FLd&<%-Q)B6TZylT(>K+-N5+qIoowjO@a**mCm`J zJaXAZ^7*2qXIFhhpD#>%c-Kkx`GUl!lc%bE$+-C=Z85K|RaxE5mrm{TdhA4Y7)~&K zp*F)bXa$f6Tm>Y8SE|j}8n7BjTmp)1y$BTBdikZ=jH|DKk}uRe>ZYyYoHT!FR@0O8 zm9rFnMy^5;syx8by7>vi#AgcZmKyth%mz{?9QleSG|N0uV2_ mdKI;Vst0DS9xwg3PC literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xxhdpi/ic_kioskrecent_black_24dp.png b/app/src/main/res/drawable-xxhdpi/ic_kioskrecent_black_24dp.png new file mode 100755 index 0000000000000000000000000000000000000000..92fc748ec842d6660d15baa0cd921ff7dc2beb46 GIT binary patch literal 856 zcmV-e1E>6nP) cD5BbpwFoy(YKFBH)wZKG!rHdmur^k&LGkBi=MC?x-go0U=btma z7=i=|^2ZWR5zE;@C1-iW7e4WrbCk1#6%-Lp0Lfq}ckr3C+bkmm%`_*U^Z0DEa}>}F zO%(6|pM&;*0z9V^NAS65N9cry4B`nsm+c9I@PtlmH`v8}_Ar6|wBiS?>Bl7YaL>T8 zoldx YTOfEYJi{?$ zrtAf44J3Q$GcjbFkWJGXXsYmR!;q6gHcD%t(bnGA4}>fp6`zZy5+}!P81h2MdT0&Q z-P+^RC}eH525Kd?HDE}skhKa}pjr%hC1l+LcFA60$dli4Q$N9w<3ct%V2}MV4B0BX z9$EuU6P~TsJ{{8G*B|Nc8Ah1AaIin&SrAT zXpR>&SLV^SJD;%Hg%|8X)_g+`Y%tREDZL#^#o^dwsZyYf_Bf?IrAoD>*rpj(sMEr6 zI3bQ(UQ7!^dv0i(ICn@0ckrQxTJ3UaAp{q6=W>&aFWX7QAL+)6FFKc}_KM}HjwCUN zLT0gt`v#63bixw`@f4rS_LM>Y<`So%fX9x)Jf;9mG^daYw!)mJkmhJ6on;n&B)G#e iQvTClE$k2^NRV#`WILA%PrLL00000 wH)9K5Bb15QaH;#)-spDRFmYPIkUKpms`xHv6w|(25^ob&N7fZVg>`b zPZ;+ZC~>0%JBeZ^B_uv{B9*98=@i$0vxeN=V }E j)Z5qnn)|4Fk^>P)4%9{67biSHl`|St*4O1jHmb1EpaQ5YaY8z( zK+=NJ#R<<)Ws`Quo{1Auf5}OmDo!|t>YcR9{-`)%6>5yppwXyR{vI9Mj0SD<_vq-F zw1?|6R9C;RAFWIU(bD7fLvaGN$XL)K)bZc#6?UB0^f? ?RJP}|h(k&J3_2`c z=!(_k*n_5cd? n_1C3%k7$hMq;)gWaq!zv&=$H>oQjP?wt##=?rCT>mWw=ZebQhJ>gE z5myV9qb*-9k?139Xd*6XW@P!|xt`jj>nV!UkWLI@JR7-3?$%Nwt_5BiQKix8?_6;z z29iP;DGW5XCLhFkf;h(@@`_nByu#-0md3EaG3Hn%CG$(k1ry__FKnSCi*tePnMYlE_ L&P@G(Z_BF4Sz;%6mpm=5o(Q5@iIy$m`{LkxibZwFEj0I+~Sa@pgTd@gZl~FB{+As@9F1d8*cxL5ny0A%)s;c{V%?A yd$w>H*)lLR=rS`*VFHE-7+7$^SQAt{CoN$)b3@cq)zN+mNYvBS&t;ucLK6VShk<$k literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xxxhdpi/ic_kiosklocal_white_24dp.png b/app/src/main/res/drawable-xxxhdpi/ic_kiosklocal_white_24dp.png new file mode 100755 index 0000000000000000000000000000000000000000..b04fd7a885c3778ceaf8438d0ea1845193f2fa53 GIT binary patch literal 345 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD0wg^q?%&M7z^LHq;uuoF_~zh3-ev{?h6Cmj zHnT);G-%%Fw!G2A8Nt|lJYn4`&&yj%eSbW8zi3L3m*&zx-8W?-Gj$R!y4XdnULGpF z^F>Zv?yeKg`QP)dyYsQN`|~;9nSb%+?8_40(~5pRHL{(tx|q2kQKBR9+>TqW*4lTk zro|<3>a1URGw^gq-^-g uc3 -6c)I$ztaD0e0ssYYmtp__ literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xxxhdpi/ic_kioskrecent_black_24dp.png b/app/src/main/res/drawable-xxxhdpi/ic_kioskrecent_black_24dp.png new file mode 100755 index 0000000000000000000000000000000000000000..152259fabb9cf9b5b7b21c033fb6ac5f291f11d1 GIT binary patch literal 1178 zcmV;L1ZDe)P) ;6h-$dK9#?1+qP%lwyn0UQQPiG+nTp++qP{+L{%~}ve(KT)4ccQNd`_35fKp) z5#b}Z^B(`voWV?BKI=Kmem1ax2@Iw=|M4ET5=zp1MkiKq%tl*IXFeg1(C{E_*uyc0 zZ5Qo$2*YIaDPuY2p^fD;vN1vtHQ2y0AKE% L_c^RaE>dtwB{eN5n(hBkrw z2!Qw4%P~!DFYlq14C-5+#6d>Wo_~3phq<0O39jQI-r--`F`9#x@ePQfi8w>bEWME0 zyiBe|j+dy-!ZPy=C5{FzXHuypx6_aZaKimGVtc9iCQ*#f+`@8oF;?&=N!*a)4_2zP zvY1=&k*n2(I7%B*cp*(2wFFjj4L)(X`k7@luiyu-s4ou-xB?%DGfkPkANlx20lkzp zrV+<8EtQYXANb8*992|miAP>jp8i+p;5(&+H}Jq^Y*M8B5ncSGsJ4;Ia7_aFT=J44SqpU2Oi}e^T#&_5DbYw`*hP%BON`-C>=LqZ%x{XmP8zfefHVuF=-+Ti z7Hg$%&jS#M0C-6H9xWpaM|>-tKzj&G0CbSzzrhg;gzz0)7N~&B*&%f-9Ppx4z7_;3 z0BT7YUcffpr8%6!zy%bt%kBRl#eN~Q2?Q 3#aQyH5V8%734pCamRFtkf%+O1&`0bO zIq%NaGAcm)oi)RfkwVC4Mg@E(b?7abDTF+ZnqxjUHIEBN&BT)BLdeZV1>7vIuQ`A3 zFEc9Oa^a}0SRxK3;zk9;g` 3 zz6flQPd1nQfn&0nFQpkyhIRoNjFe*MlZ6YOabdpDV=j3bmvmPotAtJ}`)M_R%h(vG z+2aSLCH68r@P^WE^Bp?)QE9h%O^@N}FZ|{Yj_G;l;!M?UIm@S?vc^>6_&^B@P@Dc< z#t&X*HEPpe2|jU6skY13o^6+{tZbM1jjz9x#0^P)E7kbAoLj?fJ$}H#dVIMF^Y>!v zSem~Ryi8pdmzie>aWoOLWxpRod;U9PzfY3j`ZM t7>42h+FskXZ5P+JcgMC}8rxG?8@G(LjdRAft-Nb=C-(*?on)%=lyUII>Hb>6 zlS-vhsT9X^8|@g$TYSc^tY8m2SV@M@c#Dy=<2H_!B%+f0n8HH5Sin^7p-Pg1Ga1KL z{MyU}&XRah#Jzk>E i$@7WcQ $JhdNK=qw?!AMkJ#unf! zR3rDTVU=To4y#nK9o5iS0t`j9g9`D6>4_X#oGxB*1-ibG2k3|H^4x~k>!J)mEgMi} za-HCq5NUu3=pGe6C}b%ri?gB%z!_MmmQg7F&;ng1vPr%yx)wn?p}(Sgk9^Ys$fptA zuM~=ZTw `|R?7E0Sbj_`5pkY5&MOyZF0=w1hC&6(8b{3C`0X&I?-F0RP zPpu?mv;ZUL9Ho41ymD5}t2p_ZQpp_+WN@;Ct0e?n%@UksXpnGlNRze8u{qZ+$GFul z%@<#v4_JIH=Q$SPYyrn6yLx @color/dark_soundcloud_accent_color + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/values/attrs.xml b/app/src/main/res/values/attrs.xml index 7b879fb4c..c03defcd3 100644 --- a/app/src/main/res/values/attrs.xml +++ b/app/src/main/res/values/attrs.xml @@ -28,6 +28,8 @@ + + diff --git a/app/src/main/res/values/colors_services.xml b/app/src/main/res/values/colors_services.xml index 761b721d0..2aaa2d4e6 100644 --- a/app/src/main/res/values/colors_services.xml +++ b/app/src/main/res/values/colors_services.xml @@ -22,4 +22,15 @@ #FFFFFF #ff9100 + +#f97d46 +#c04e19 +#000000 +#f97d46 + +#f97d46 +#c04e19 +#FFFFFF +#f97d46 + \ No newline at end of file diff --git a/app/src/main/res/values/settings_keys.xml b/app/src/main/res/values/settings_keys.xml index be0709b66..7530bd8e8 100644 --- a/app/src/main/res/values/settings_keys.xml +++ b/app/src/main/res/values/settings_keys.xml @@ -143,6 +143,8 @@en GB content_language +peertube_instance_url +peertube_instance_name content_country show_age_restricted_content use_tor diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 12a5d8ca7..ff9c04737 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -107,6 +107,7 @@Default content country Service Default content language +PeerTube instance Player Behavior Video & audio diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 87e19cede..1ba7699eb 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -44,6 +44,8 @@- @drawable/ic_play_arrow_black_24dp
- @drawable/ic_settings_black_24dp
- @drawable/ic_whatshot_black_24dp
+- @drawable/ic_kiosklocal_black_24dp
+- @drawable/ic_kioskrecent_black_24dp
- @drawable/ic_channel_black_24dp
- @drawable/ic_bookmark_black_24dp
- @drawable/ic_playlist_add_black_24dp
@@ -104,6 +106,8 @@- @drawable/ic_play_arrow_white_24dp
- @drawable/ic_settings_white_24dp
- @drawable/ic_whatshot_white_24dp
+- @drawable/ic_kiosklocal_white_24dp
+- @drawable/ic_kioskrecent_white_24dp
- @drawable/ic_channel_white_24dp
- @drawable/ic_bookmark_white_24dp
- @drawable/ic_playlist_add_white_24dp
diff --git a/app/src/main/res/values/styles_services.xml b/app/src/main/res/values/styles_services.xml index 7ca9dacde..82eac26ab 100644 --- a/app/src/main/res/values/styles_services.xml +++ b/app/src/main/res/values/styles_services.xml @@ -28,4 +28,23 @@- @color/dark_soundcloud_accent_color
+ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/xml/content_settings.xml b/app/src/main/res/xml/content_settings.xml index bd623f833..e998c96ab 100644 --- a/app/src/main/res/xml/content_settings.xml +++ b/app/src/main/res/xml/content_settings.xml @@ -18,6 +18,11 @@ android:summary="%s" android:title="@string/content_language_title"/> ++ Date: Sun, 10 Mar 2019 17:30:21 +0530 Subject: [PATCH 004/270] init services in app onCreate --- app/src/main/java/org/schabi/newpipe/App.java | 5 +++-- app/src/main/java/org/schabi/newpipe/MainActivity.java | 3 --- .../org/schabi/newpipe/settings/ContentSettingsFragment.java | 4 +--- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/App.java b/app/src/main/java/org/schabi/newpipe/App.java index 3ac2d5014..fed38f1eb 100644 --- a/app/src/main/java/org/schabi/newpipe/App.java +++ b/app/src/main/java/org/schabi/newpipe/App.java @@ -6,7 +6,6 @@ import android.app.NotificationChannel; import android.app.NotificationManager; import android.content.Context; import android.os.Build; -import android.preference.PreferenceManager; import android.support.annotation.Nullable; import android.util.Log; @@ -23,12 +22,12 @@ import org.acra.config.ConfigurationBuilder; import org.acra.sender.ReportSenderFactory; import org.schabi.newpipe.extractor.Downloader; import org.schabi.newpipe.extractor.NewPipe; -import org.schabi.newpipe.extractor.utils.Localization; import org.schabi.newpipe.report.AcraReportSenderFactory; import org.schabi.newpipe.report.ErrorActivity; import org.schabi.newpipe.report.UserAction; import org.schabi.newpipe.settings.SettingsActivity; import org.schabi.newpipe.util.ExtractorHelper; +import org.schabi.newpipe.util.ServiceHelper; import org.schabi.newpipe.util.StateSaver; import java.io.IOException; @@ -100,6 +99,8 @@ public class App extends Application { StateSaver.init(this); initNotificationChannel(); + ServiceHelper.initServices(this); + // Initialize image loader ImageLoader.getInstance().init(getImageLoaderConfigurations(10, 50)); diff --git a/app/src/main/java/org/schabi/newpipe/MainActivity.java b/app/src/main/java/org/schabi/newpipe/MainActivity.java index cdb948436..3821af896 100644 --- a/app/src/main/java/org/schabi/newpipe/MainActivity.java +++ b/app/src/main/java/org/schabi/newpipe/MainActivity.java @@ -95,8 +95,6 @@ public class MainActivity extends AppCompatActivity { protected void onCreate(Bundle savedInstanceState) { if (DEBUG) Log.d(TAG, "onCreate() called with: savedInstanceState = [" + savedInstanceState + "]"); - ServiceHelper.initServices(this); - ThemeHelper.setTheme(this, ServiceHelper.getSelectedServiceId(this)); super.onCreate(savedInstanceState); @@ -302,7 +300,6 @@ public class MainActivity extends AppCompatActivity { drawerItems.getMenu() .add(R.id.menu_services_group, s.getServiceId(), ORDER, title) .setIcon(ServiceHelper.getIcon(s.getServiceId())); - } drawerItems.getMenu().getItem(ServiceHelper.getSelectedServiceId(this)).setChecked(true); } diff --git a/app/src/main/java/org/schabi/newpipe/settings/ContentSettingsFragment.java b/app/src/main/java/org/schabi/newpipe/settings/ContentSettingsFragment.java index da6d372f4..801a55fd7 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/ContentSettingsFragment.java +++ b/app/src/main/java/org/schabi/newpipe/settings/ContentSettingsFragment.java @@ -147,7 +147,6 @@ public class ContentSettingsFragment extends BasePreferenceFragment { if (!url.startsWith("https://")) { Toast.makeText(getActivity(), "instance url should start with https://", Toast.LENGTH_SHORT).show(); - return false; } else { pEt.setSummary("fetching instance details.."); Disposable disposable = Single.fromCallable(() -> { @@ -174,8 +173,8 @@ public class ContentSettingsFragment extends BasePreferenceFragment { Toast.LENGTH_SHORT).show(); }); disposables.add(disposable); - return false; } + return false; }); } @@ -360,5 +359,4 @@ public class ContentSettingsFragment extends BasePreferenceFragment { ErrorActivity.ErrorInfo.make(UserAction.UI_ERROR, "none", "", R.string.app_ui_crash)); } - } From a8b5534838328f4e5c20dab48790411e2a7fcda9 Mon Sep 17 00:00:00 2001 From: Ritvik Saraf <13ritvik@gmail.com> Date: Sun, 10 Mar 2019 19:08:08 +0530 Subject: [PATCH 005/270] darker color for peertube --- app/src/main/res/values/colors_services.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/main/res/values/colors_services.xml b/app/src/main/res/values/colors_services.xml index d2d759bc0..d38df003e 100644 --- a/app/src/main/res/values/colors_services.xml +++ b/app/src/main/res/values/colors_services.xml @@ -23,15 +23,15 @@ #ff9100 -#f97d46 -#c04e19 +#e65100 +#ac1900 #000000 -#f97d46 +#ff833a -#f97d46 -#c04e19 +#e65100 +#ac1900 #FFFFFF -#f97d46 +#ff833a #9e9e9e From 039a8e0b87eec61c9c6885818529fe7aaf04adbe Mon Sep 17 00:00:00 2001 From: yausername <13ritvik@gmail.com> Date: Sat, 23 Mar 2019 19:49:37 +0530 Subject: [PATCH 006/270] reordered services --- app/build.gradle | 2 +- app/src/main/java/org/schabi/newpipe/util/ServiceHelper.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 41c397d64..d037127d9 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -57,7 +57,7 @@ dependencies { exclude module: 'support-annotations' }) - implementation 'com.github.yausername:NewPipeExtractor:c220700' + implementation 'com.github.yausername:NewPipeExtractor:f60c973' testImplementation 'junit:junit:4.12' testImplementation 'org.mockito:mockito-core:2.23.0' diff --git a/app/src/main/java/org/schabi/newpipe/util/ServiceHelper.java b/app/src/main/java/org/schabi/newpipe/util/ServiceHelper.java index 582f3590b..6a4f65bcb 100644 --- a/app/src/main/java/org/schabi/newpipe/util/ServiceHelper.java +++ b/app/src/main/java/org/schabi/newpipe/util/ServiceHelper.java @@ -27,9 +27,9 @@ public class ServiceHelper { case 1: return R.drawable.place_holder_cloud; case 2: - return R.drawable.place_holder_peertube; - case 3: return R.drawable.place_holder_gadse; + case 3: + return R.drawable.place_holder_peertube; default: return R.drawable.place_holder_circle; } From 7e3eb5e14d616d85245a5da7cfa7079d220446d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E7=A8=8B=E5=AE=87?=Date: Fri, 11 Oct 2019 14:00:08 +0000 Subject: [PATCH 007/270] Added translation using Weblate (Chinese (Simplified)) --- app/src/main/res/values-b+zh+HANS+CN/strings.xml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 app/src/main/res/values-b+zh+HANS+CN/strings.xml diff --git a/app/src/main/res/values-b+zh+HANS+CN/strings.xml b/app/src/main/res/values-b+zh+HANS+CN/strings.xml new file mode 100644 index 000000000..a6b3daec9 --- /dev/null +++ b/app/src/main/res/values-b+zh+HANS+CN/strings.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file From 7d18eb8b023b56282a50242ef978d4aed97110e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E7=A8=8B=E5=AE=87?= Date: Fri, 11 Oct 2019 13:59:06 +0000 Subject: [PATCH 008/270] Translated using Weblate (Chinese (Hong Kong)) Currently translated at 28.0% (134 of 478 strings) --- app/src/main/res/values-zh-rHK/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values-zh-rHK/strings.xml b/app/src/main/res/values-zh-rHK/strings.xml index bb8551137..3294094dc 100644 --- a/app/src/main/res/values-zh-rHK/strings.xml +++ b/app/src/main/res/values-zh-rHK/strings.xml @@ -7,7 +7,7 @@ 下載 搜尋 設定 -您是不是要查:%1$s? +你是不是在寻找:%1$s? 選擇瀏覽器 旋轉 使用外置影片播放器 From 6f3d5e9fb8468f910aea1726495449c9f26292e6 Mon Sep 17 00:00:00 2001 From: Igor NedoboyDate: Wed, 9 Oct 2019 16:51:44 +0000 Subject: [PATCH 009/270] Translated using Weblate (Russian) Currently translated at 100.0% (478 of 478 strings) --- app/src/main/res/values-ru/strings.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 8529d6af5..6a5e2769e 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -33,7 +33,7 @@ Внешний вид Другое Миниатюра видео-превью -Миниатюра видео-превью +Воспроизвести видео, длительность: Миниатюра аватара пользователя Не понравилось Понравилось @@ -510,4 +510,5 @@Удалить все позиции воспроизведения Удалить все позиции воспроизведения\? Измените папки загрузки для вступления в силу +Переключение сервисов, сейчас выбрано: \ No newline at end of file From 84a52342ab842f8b98dbba55643f88ba489383fa Mon Sep 17 00:00:00 2001 From: AntonAkovPDate: Thu, 10 Oct 2019 16:50:16 +0000 Subject: [PATCH 010/270] Translated using Weblate (Bulgarian) Currently translated at 80.5% (385 of 478 strings) --- app/src/main/res/values-bg/strings.xml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/app/src/main/res/values-bg/strings.xml b/app/src/main/res/values-bg/strings.xml index 5758bfb90..a1f7a3136 100644 --- a/app/src/main/res/values-bg/strings.xml +++ b/app/src/main/res/values-bg/strings.xml @@ -60,7 +60,7 @@ Показвай предложения за търсене История на търсенията Съхранявай заявките за търсене локално -История и кеш-памет +История на гледане Запаметявай кои видеота са гледани Възобнови при връщане на фокус Продължавай възпроизвеждането след прекъсване (например телефонно обаждане) @@ -254,7 +254,7 @@Липсва стрийм плейър (можете да изтеглите VLC, за да пуснете стрийма). Изключете, за да спрете зареждането на всички миниатюри, спестявайки трафик и памет. При промяна на тази настройка, текущата кеш-памет на изображенията ще бъде изтрита. Показвай подсказка, когато е избран фонов режим или режим в прозорец на страницата с детайли на съответния клип -Изтрива историята на възпроизвежданите стриймове +Изтрива историята на възпроизвежданите стриймове и позицията на възпроизвеждането Не са намерени видео стриймове Не са намерени аудио стриймове Какво:\\nЗаявка:\\nЕзик на съдържанието:\\nУслуга:\\nВреме по GMT:\\nПакет:\\nВерсия:\\nОС версия: @@ -413,6 +413,11 @@Автоматично пускане + - Коментари
-- +
Нов раздел +Избери раздел +Промени +Продължи възпроизвеждане +Изтрии данни \ No newline at end of file From d2e065d273afa7437a12747fc899c909443602b0 Mon Sep 17 00:00:00 2001 From: ssantosDate: Wed, 9 Oct 2019 14:53:54 +0000 Subject: [PATCH 011/270] Translated using Weblate (Portuguese) Currently translated at 100.0% (478 of 478 strings) --- app/src/main/res/values-pt/strings.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index 8c6d6aa15..8b0a19319 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -33,7 +33,7 @@ Idioma do conteúdo predefinido Vídeo e áudio Miniatura de pré-visualização de vídeo -Miniatura de pré-visualização de vídeo +Reproduzir vídeo, duração: Miniatura do avatar do canal Não gostar Gostos @@ -505,4 +505,5 @@Elimina todas as posições de reprodução Eliminar todas as posições de reprodução\? Alterar as pastas de descarregamento para que tenham efeito +Alternar serviço, agora selecionado: \ No newline at end of file From 4688b1fe23181429ccef62f0ab1f79f2537572f8 Mon Sep 17 00:00:00 2001 From: Igor NedoboyDate: Sat, 12 Oct 2019 04:54:55 +0000 Subject: [PATCH 012/270] Translated using Weblate (Russian) Currently translated at 100.0% (478 of 478 strings) --- app/src/main/res/values-ru/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 6a5e2769e..fb6c3f877 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -375,7 +375,7 @@ Титры Приложение для воспроизведения этого файла не установлено Изменить размер текста и стиль титров. Нужен перезапуск -Очистить историю просмотров +Очистить историю Удалить всю историю просмотров\? История просмотров удалена Очистить историю поиска From 884528927eca5ed96e700ac66ac06ba45e2db356 Mon Sep 17 00:00:00 2001 From: Haggai EranDate: Sat, 12 Oct 2019 12:21:01 +0300 Subject: [PATCH 013/270] Fix Hebrew translation on some devices Hebrew on android uses two locale codes (iw and he). See details here: https://stackoverflow.com/a/8470980 For example, Nexus 7 (2013) uses iw, so it shows the English UI even when configuring the tablet to use Hebrew. Add a symbolic link from values-iw to values-he so both use the same strings. --- app/src/main/res/values-iw | 1 + 1 file changed, 1 insertion(+) create mode 120000 app/src/main/res/values-iw diff --git a/app/src/main/res/values-iw b/app/src/main/res/values-iw new file mode 120000 index 000000000..08adc17cc --- /dev/null +++ b/app/src/main/res/values-iw @@ -0,0 +1 @@ +values-he/ \ No newline at end of file From bd2b32bfbc790c29f3b93dd8f0c232975622aac7 Mon Sep 17 00:00:00 2001 From: Peter Hindes Date: Mon, 14 Oct 2019 11:55:55 -0600 Subject: [PATCH 014/270] Fixed Playlists With No Uploader Crashing The App --- .../playlist/model/PlaylistRemoteEntity.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistRemoteEntity.java b/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistRemoteEntity.java index bf446ca1f..c6a96ec13 100644 --- a/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistRemoteEntity.java +++ b/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistRemoteEntity.java @@ -16,6 +16,8 @@ import static org.schabi.newpipe.database.playlist.model.PlaylistRemoteEntity.RE import static org.schabi.newpipe.database.playlist.model.PlaylistRemoteEntity.REMOTE_PLAYLIST_TABLE; import static org.schabi.newpipe.database.playlist.model.PlaylistRemoteEntity.REMOTE_PLAYLIST_URL; +import android.text.TextUtils; + @Entity(tableName = REMOTE_PLAYLIST_TABLE, indices = { @Index(value = {REMOTE_PLAYLIST_NAME}), @@ -72,10 +74,18 @@ public class PlaylistRemoteEntity implements PlaylistLocalItem { @Ignore public boolean isIdenticalTo(final PlaylistInfo info) { - return getServiceId() == info.getServiceId() && getName().equals(info.getName()) && + boolean returnMe; + if (!TextUtils.isEmpty(getUploader())) { // If the playlist has an uploader + returnMe = getServiceId() == info.getServiceId() && getName().equals(info.getName()) && getStreamCount() == info.getStreamCount() && getUrl().equals(info.getUrl()) && getThumbnailUrl().equals(info.getThumbnailUrl()) && getUploader().equals(info.getUploaderName()); + } else { // Else ignore uploader + returnMe = getServiceId() == info.getServiceId() && getName().equals(info.getName()) && + getStreamCount() == info.getStreamCount() && getUrl().equals(info.getUrl()) && + getThumbnailUrl().equals(info.getThumbnailUrl()); + } + return returnMe; } public long getUid() { From 3794002c7b77bd17ba4ece5d9b6545c88a2cc92a Mon Sep 17 00:00:00 2001 From: Peter Hindes Date: Mon, 14 Oct 2019 14:56:04 -0600 Subject: [PATCH 015/270] much simpler, "uploader" will never change on a playlist --- .../playlist/model/PlaylistRemoteEntity.java | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistRemoteEntity.java b/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistRemoteEntity.java index c6a96ec13..e23b1cf20 100644 --- a/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistRemoteEntity.java +++ b/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistRemoteEntity.java @@ -74,18 +74,9 @@ public class PlaylistRemoteEntity implements PlaylistLocalItem { @Ignore public boolean isIdenticalTo(final PlaylistInfo info) { - boolean returnMe; - if (!TextUtils.isEmpty(getUploader())) { // If the playlist has an uploader - returnMe = getServiceId() == info.getServiceId() && getName().equals(info.getName()) && + return getServiceId() == info.getServiceId() && getName().equals(info.getName()) && getStreamCount() == info.getStreamCount() && getUrl().equals(info.getUrl()) && - getThumbnailUrl().equals(info.getThumbnailUrl()) && - getUploader().equals(info.getUploaderName()); - } else { // Else ignore uploader - returnMe = getServiceId() == info.getServiceId() && getName().equals(info.getName()) && - getStreamCount() == info.getStreamCount() && getUrl().equals(info.getUrl()) && - getThumbnailUrl().equals(info.getThumbnailUrl()); - } - return returnMe; + getThumbnailUrl().equals(info.getThumbnailUrl()); } public long getUid() { From cb5c219ffe0dc67b8868d30ac7c97e7d38abbb4f Mon Sep 17 00:00:00 2001 From: Peter Hindes Date: Mon, 14 Oct 2019 16:37:58 -0600 Subject: [PATCH 016/270] Added a restart song button to signle track expanded notification ... and some comments to the code --- .../schabi/newpipe/player/BackgroundPlayer.java | 14 ++++++++++++-- .../res/layout/player_notification_expanded.xml | 16 ++++++++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java b/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java index ab07ded22..42ed546f1 100644 --- a/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java @@ -219,20 +219,30 @@ public final class BackgroundPlayer extends Service { remoteViews.setOnClickPendingIntent(R.id.notificationContent, PendingIntent.getActivity(this, NOTIFICATION_ID, intent, PendingIntent.FLAG_UPDATE_CURRENT)); - if (basePlayerImpl.playQueue != null && basePlayerImpl.playQueue.size() > 1) { + // Lets check if we are playing more than one song in the background + if (basePlayerImpl.playQueue != null && basePlayerImpl.playQueue.size() > 1) { // If we have more than one song + // Use track skiping for forward and back remoteViews.setInt(R.id.notificationFRewind, SET_IMAGE_RESOURCE_METHOD, R.drawable.exo_controls_previous); remoteViews.setInt(R.id.notificationFForward, SET_IMAGE_RESOURCE_METHOD, R.drawable.exo_controls_next); remoteViews.setOnClickPendingIntent(R.id.notificationFRewind, PendingIntent.getBroadcast(this, NOTIFICATION_ID, new Intent(ACTION_PLAY_PREVIOUS), PendingIntent.FLAG_UPDATE_CURRENT)); remoteViews.setOnClickPendingIntent(R.id.notificationFForward, PendingIntent.getBroadcast(this, NOTIFICATION_ID, new Intent(ACTION_PLAY_NEXT), PendingIntent.FLAG_UPDATE_CURRENT)); - } else { + // We dont need a restart track button (skip track backwards) + remoteViews.setViewVisibility(R.id.notificationRestartTrack, View.INVISIBLE); + } else { // But if we only have one song + // Use time skipping for fastforward/rewind remoteViews.setInt(R.id.notificationFRewind, SET_IMAGE_RESOURCE_METHOD, R.drawable.exo_controls_rewind); remoteViews.setInt(R.id.notificationFForward, SET_IMAGE_RESOURCE_METHOD, R.drawable.exo_controls_fastforward); remoteViews.setOnClickPendingIntent(R.id.notificationFRewind, PendingIntent.getBroadcast(this, NOTIFICATION_ID, new Intent(ACTION_FAST_REWIND), PendingIntent.FLAG_UPDATE_CURRENT)); remoteViews.setOnClickPendingIntent(R.id.notificationFForward, PendingIntent.getBroadcast(this, NOTIFICATION_ID, new Intent(ACTION_FAST_FORWARD), PendingIntent.FLAG_UPDATE_CURRENT)); + // Add a restart track button (skip track backwards) + remoteViews.setViewVisibility(R.id.notificationRestartTrack, View.VISIBLE); + remoteViews.setOnClickPendingIntent(R.id.notificationRestartTrack, + PendingIntent.getBroadcast(this, NOTIFICATION_ID, new Intent(ACTION_PLAY_PREVIOUS), PendingIntent.FLAG_UPDATE_CURRENT)); + } setRepeatModeIcon(remoteViews, basePlayerImpl.getRepeatMode()); diff --git a/app/src/main/res/layout/player_notification_expanded.xml b/app/src/main/res/layout/player_notification_expanded.xml index 090642303..d8ed96bf0 100644 --- a/app/src/main/res/layout/player_notification_expanded.xml +++ b/app/src/main/res/layout/player_notification_expanded.xml @@ -116,6 +116,22 @@ android:src="@drawable/ic_repeat_white" tools:ignore="ContentDescription"/> + + Date: Mon, 14 Oct 2019 16:41:38 -0600 Subject: [PATCH 017/270] Revert "Added a restart song button to signle track expanded notification" This reverts commit cb5c219ffe0dc67b8868d30ac7c97e7d38abbb4f. --- .../schabi/newpipe/player/BackgroundPlayer.java | 14 ++------------ .../res/layout/player_notification_expanded.xml | 16 ---------------- 2 files changed, 2 insertions(+), 28 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java b/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java index 42ed546f1..ab07ded22 100644 --- a/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java @@ -219,30 +219,20 @@ public final class BackgroundPlayer extends Service { remoteViews.setOnClickPendingIntent(R.id.notificationContent, PendingIntent.getActivity(this, NOTIFICATION_ID, intent, PendingIntent.FLAG_UPDATE_CURRENT)); - // Lets check if we are playing more than one song in the background - if (basePlayerImpl.playQueue != null && basePlayerImpl.playQueue.size() > 1) { // If we have more than one song - // Use track skiping for forward and back + if (basePlayerImpl.playQueue != null && basePlayerImpl.playQueue.size() > 1) { remoteViews.setInt(R.id.notificationFRewind, SET_IMAGE_RESOURCE_METHOD, R.drawable.exo_controls_previous); remoteViews.setInt(R.id.notificationFForward, SET_IMAGE_RESOURCE_METHOD, R.drawable.exo_controls_next); remoteViews.setOnClickPendingIntent(R.id.notificationFRewind, PendingIntent.getBroadcast(this, NOTIFICATION_ID, new Intent(ACTION_PLAY_PREVIOUS), PendingIntent.FLAG_UPDATE_CURRENT)); remoteViews.setOnClickPendingIntent(R.id.notificationFForward, PendingIntent.getBroadcast(this, NOTIFICATION_ID, new Intent(ACTION_PLAY_NEXT), PendingIntent.FLAG_UPDATE_CURRENT)); - // We dont need a restart track button (skip track backwards) - remoteViews.setViewVisibility(R.id.notificationRestartTrack, View.INVISIBLE); - } else { // But if we only have one song - // Use time skipping for fastforward/rewind + } else { remoteViews.setInt(R.id.notificationFRewind, SET_IMAGE_RESOURCE_METHOD, R.drawable.exo_controls_rewind); remoteViews.setInt(R.id.notificationFForward, SET_IMAGE_RESOURCE_METHOD, R.drawable.exo_controls_fastforward); remoteViews.setOnClickPendingIntent(R.id.notificationFRewind, PendingIntent.getBroadcast(this, NOTIFICATION_ID, new Intent(ACTION_FAST_REWIND), PendingIntent.FLAG_UPDATE_CURRENT)); remoteViews.setOnClickPendingIntent(R.id.notificationFForward, PendingIntent.getBroadcast(this, NOTIFICATION_ID, new Intent(ACTION_FAST_FORWARD), PendingIntent.FLAG_UPDATE_CURRENT)); - // Add a restart track button (skip track backwards) - remoteViews.setViewVisibility(R.id.notificationRestartTrack, View.VISIBLE); - remoteViews.setOnClickPendingIntent(R.id.notificationRestartTrack, - PendingIntent.getBroadcast(this, NOTIFICATION_ID, new Intent(ACTION_PLAY_PREVIOUS), PendingIntent.FLAG_UPDATE_CURRENT)); - } setRepeatModeIcon(remoteViews, basePlayerImpl.getRepeatMode()); diff --git a/app/src/main/res/layout/player_notification_expanded.xml b/app/src/main/res/layout/player_notification_expanded.xml index d8ed96bf0..090642303 100644 --- a/app/src/main/res/layout/player_notification_expanded.xml +++ b/app/src/main/res/layout/player_notification_expanded.xml @@ -116,22 +116,6 @@ android:src="@drawable/ic_repeat_white" tools:ignore="ContentDescription"/> - - Date: Mon, 14 Oct 2019 16:48:44 -0600 Subject: [PATCH 018/270] Explain What we did in the code itself --- .../database/playlist/model/PlaylistRemoteEntity.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistRemoteEntity.java b/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistRemoteEntity.java index e23b1cf20..f57f8c5d9 100644 --- a/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistRemoteEntity.java +++ b/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistRemoteEntity.java @@ -74,6 +74,15 @@ public class PlaylistRemoteEntity implements PlaylistLocalItem { @Ignore public boolean isIdenticalTo(final PlaylistInfo info) { + // Returns boolean comparing the online playlist and the local copy. + // (False if info changed such as playlist name or track count) + // [Note that we don't check if the playlist creator changed: + // getUploader().equals(info.getUploaderName()) + // because this would crash the app on playlists that are auto-generated with no creator, + // and the creator can not change to my knowledge. + // if you need this functionality back please use + // getUploader() == info.getUploaderName() + // instead as it will work with blank names (Null value if I remember correctly). return getServiceId() == info.getServiceId() && getName().equals(info.getName()) && getStreamCount() == info.getStreamCount() && getUrl().equals(info.getUrl()) && getThumbnailUrl().equals(info.getThumbnailUrl()); From c93c52a58ce62b132f353eec8da5db7b0c009116 Mon Sep 17 00:00:00 2001 From: Peter Hindes Date: Mon, 14 Oct 2019 16:55:16 -0600 Subject: [PATCH 019/270] Wrap in multiline comment so it colapses --- .../newpipe/database/playlist/model/PlaylistRemoteEntity.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistRemoteEntity.java b/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistRemoteEntity.java index f57f8c5d9..2fc6cfde7 100644 --- a/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistRemoteEntity.java +++ b/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistRemoteEntity.java @@ -74,6 +74,7 @@ public class PlaylistRemoteEntity implements PlaylistLocalItem { @Ignore public boolean isIdenticalTo(final PlaylistInfo info) { + /* // Returns boolean comparing the online playlist and the local copy. // (False if info changed such as playlist name or track count) // [Note that we don't check if the playlist creator changed: @@ -83,6 +84,7 @@ public class PlaylistRemoteEntity implements PlaylistLocalItem { // if you need this functionality back please use // getUploader() == info.getUploaderName() // instead as it will work with blank names (Null value if I remember correctly). + */ return getServiceId() == info.getServiceId() && getName().equals(info.getName()) && getStreamCount() == info.getStreamCount() && getUrl().equals(info.getUrl()) && getThumbnailUrl().equals(info.getThumbnailUrl()); From bfc987f81b482ecab1669c3c35f3bd5b5107f33f Mon Sep 17 00:00:00 2001 From: Peter Hindes Date: Mon, 14 Oct 2019 18:01:15 -0600 Subject: [PATCH 020/270] Revert "Revert "Added a restart song button to signle track expanded notification"" This reverts commit 646e327ed2972811c595cac6d0543baaad61e44b. --- .../schabi/newpipe/player/BackgroundPlayer.java | 14 ++++++++++++-- .../res/layout/player_notification_expanded.xml | 16 ++++++++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java b/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java index ab07ded22..42ed546f1 100644 --- a/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java @@ -219,20 +219,30 @@ public final class BackgroundPlayer extends Service { remoteViews.setOnClickPendingIntent(R.id.notificationContent, PendingIntent.getActivity(this, NOTIFICATION_ID, intent, PendingIntent.FLAG_UPDATE_CURRENT)); - if (basePlayerImpl.playQueue != null && basePlayerImpl.playQueue.size() > 1) { + // Lets check if we are playing more than one song in the background + if (basePlayerImpl.playQueue != null && basePlayerImpl.playQueue.size() > 1) { // If we have more than one song + // Use track skiping for forward and back remoteViews.setInt(R.id.notificationFRewind, SET_IMAGE_RESOURCE_METHOD, R.drawable.exo_controls_previous); remoteViews.setInt(R.id.notificationFForward, SET_IMAGE_RESOURCE_METHOD, R.drawable.exo_controls_next); remoteViews.setOnClickPendingIntent(R.id.notificationFRewind, PendingIntent.getBroadcast(this, NOTIFICATION_ID, new Intent(ACTION_PLAY_PREVIOUS), PendingIntent.FLAG_UPDATE_CURRENT)); remoteViews.setOnClickPendingIntent(R.id.notificationFForward, PendingIntent.getBroadcast(this, NOTIFICATION_ID, new Intent(ACTION_PLAY_NEXT), PendingIntent.FLAG_UPDATE_CURRENT)); - } else { + // We dont need a restart track button (skip track backwards) + remoteViews.setViewVisibility(R.id.notificationRestartTrack, View.INVISIBLE); + } else { // But if we only have one song + // Use time skipping for fastforward/rewind remoteViews.setInt(R.id.notificationFRewind, SET_IMAGE_RESOURCE_METHOD, R.drawable.exo_controls_rewind); remoteViews.setInt(R.id.notificationFForward, SET_IMAGE_RESOURCE_METHOD, R.drawable.exo_controls_fastforward); remoteViews.setOnClickPendingIntent(R.id.notificationFRewind, PendingIntent.getBroadcast(this, NOTIFICATION_ID, new Intent(ACTION_FAST_REWIND), PendingIntent.FLAG_UPDATE_CURRENT)); remoteViews.setOnClickPendingIntent(R.id.notificationFForward, PendingIntent.getBroadcast(this, NOTIFICATION_ID, new Intent(ACTION_FAST_FORWARD), PendingIntent.FLAG_UPDATE_CURRENT)); + // Add a restart track button (skip track backwards) + remoteViews.setViewVisibility(R.id.notificationRestartTrack, View.VISIBLE); + remoteViews.setOnClickPendingIntent(R.id.notificationRestartTrack, + PendingIntent.getBroadcast(this, NOTIFICATION_ID, new Intent(ACTION_PLAY_PREVIOUS), PendingIntent.FLAG_UPDATE_CURRENT)); + } setRepeatModeIcon(remoteViews, basePlayerImpl.getRepeatMode()); diff --git a/app/src/main/res/layout/player_notification_expanded.xml b/app/src/main/res/layout/player_notification_expanded.xml index 090642303..d8ed96bf0 100644 --- a/app/src/main/res/layout/player_notification_expanded.xml +++ b/app/src/main/res/layout/player_notification_expanded.xml @@ -116,6 +116,22 @@ android:src="@drawable/ic_repeat_white" tools:ignore="ContentDescription"/> + + Date: Tue, 15 Oct 2019 07:18:06 -0600 Subject: [PATCH 021/270] Fixes Improved --- .../playlist/model/PlaylistRemoteEntity.java | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistRemoteEntity.java b/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistRemoteEntity.java index 2fc6cfde7..d51267220 100644 --- a/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistRemoteEntity.java +++ b/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistRemoteEntity.java @@ -16,8 +16,6 @@ import static org.schabi.newpipe.database.playlist.model.PlaylistRemoteEntity.RE import static org.schabi.newpipe.database.playlist.model.PlaylistRemoteEntity.REMOTE_PLAYLIST_TABLE; import static org.schabi.newpipe.database.playlist.model.PlaylistRemoteEntity.REMOTE_PLAYLIST_URL; -import android.text.TextUtils; - @Entity(tableName = REMOTE_PLAYLIST_TABLE, indices = { @Index(value = {REMOTE_PLAYLIST_NAME}), @@ -75,19 +73,18 @@ public class PlaylistRemoteEntity implements PlaylistLocalItem { @Ignore public boolean isIdenticalTo(final PlaylistInfo info) { /* - // Returns boolean comparing the online playlist and the local copy. - // (False if info changed such as playlist name or track count) - // [Note that we don't check if the playlist creator changed: - // getUploader().equals(info.getUploaderName()) - // because this would crash the app on playlists that are auto-generated with no creator, - // and the creator can not change to my knowledge. - // if you need this functionality back please use - // getUploader() == info.getUploaderName() - // instead as it will work with blank names (Null value if I remember correctly). + * Returns boolean comparing the online playlist and the local copy. + * (False if info changed such as playlist name or track count) + * [Note that + * getUploader().equals(info.getUploaderName()) + * crashes the app on playlists that are auto-generated with no creator, + * please use + * getUploader() == info.getUploaderName() + * instead as it will work with blank names (Null value if I remember correctly). */ return getServiceId() == info.getServiceId() && getName().equals(info.getName()) && getStreamCount() == info.getStreamCount() && getUrl().equals(info.getUrl()) && - getThumbnailUrl().equals(info.getThumbnailUrl()); + getThumbnailUrl().equals(info.getThumbnailUrl()) && getUploader() == info.getUploaderName(); } public long getUid() { From c68c35e0846cbecbbd1b35280d8647b2a4e74a23 Mon Sep 17 00:00:00 2001 From: Peter Hindes Date: Tue, 15 Oct 2019 07:19:11 -0600 Subject: [PATCH 022/270] Better FIx, Improved Comment Style --- .../playlist/model/PlaylistRemoteEntity.java | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistRemoteEntity.java b/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistRemoteEntity.java index 2fc6cfde7..a3efa20d5 100644 --- a/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistRemoteEntity.java +++ b/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistRemoteEntity.java @@ -16,8 +16,6 @@ import static org.schabi.newpipe.database.playlist.model.PlaylistRemoteEntity.RE import static org.schabi.newpipe.database.playlist.model.PlaylistRemoteEntity.REMOTE_PLAYLIST_TABLE; import static org.schabi.newpipe.database.playlist.model.PlaylistRemoteEntity.REMOTE_PLAYLIST_URL; -import android.text.TextUtils; - @Entity(tableName = REMOTE_PLAYLIST_TABLE, indices = { @Index(value = {REMOTE_PLAYLIST_NAME}), @@ -75,19 +73,18 @@ public class PlaylistRemoteEntity implements PlaylistLocalItem { @Ignore public boolean isIdenticalTo(final PlaylistInfo info) { /* - // Returns boolean comparing the online playlist and the local copy. - // (False if info changed such as playlist name or track count) - // [Note that we don't check if the playlist creator changed: - // getUploader().equals(info.getUploaderName()) - // because this would crash the app on playlists that are auto-generated with no creator, - // and the creator can not change to my knowledge. - // if you need this functionality back please use - // getUploader() == info.getUploaderName() - // instead as it will work with blank names (Null value if I remember correctly). - */ + * Returns boolean comparing the online playlist and the local copy. + * (False if info changed such as playlist name or track count) + * [Note that + * getUploader().equals(info.getUploaderName()) + * crashes the app on playlists that are auto-generated with no creator, + * please use + * getUploader() == info.getUploaderName() + * instead as it will work with blank names (Null value if I remember correctly). + */ return getServiceId() == info.getServiceId() && getName().equals(info.getName()) && getStreamCount() == info.getStreamCount() && getUrl().equals(info.getUrl()) && - getThumbnailUrl().equals(info.getThumbnailUrl()); + getThumbnailUrl().equals(info.getThumbnailUrl()) && getUploader() == info.getUploaderName(); } public long getUid() { From 4106645d6e89a2fbff494e3db4c482cfa1ded8f1 Mon Sep 17 00:00:00 2001 From: Peter Hindes Date: Tue, 15 Oct 2019 08:40:51 -0600 Subject: [PATCH 023/270] Polished Results --- .../playlist/model/PlaylistRemoteEntity.java | 27 +++++++++++++------ .../list/playlist/PlaylistFragment.java | 6 ++++- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistRemoteEntity.java b/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistRemoteEntity.java index a3efa20d5..e3b38851b 100644 --- a/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistRemoteEntity.java +++ b/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistRemoteEntity.java @@ -1,14 +1,19 @@ package org.schabi.newpipe.database.playlist.model; +import android.text.TextUtils; +import android.util.Log; + import androidx.room.ColumnInfo; import androidx.room.Entity; import androidx.room.Ignore; import androidx.room.Index; import androidx.room.PrimaryKey; +import org.schabi.newpipe.BuildConfig; import org.schabi.newpipe.database.playlist.PlaylistLocalItem; import org.schabi.newpipe.extractor.playlist.PlaylistInfo; import org.schabi.newpipe.util.Constants; +import org.w3c.dom.Text; import static org.schabi.newpipe.database.LocalItem.LocalItemType.PLAYLIST_REMOTE_ITEM; import static org.schabi.newpipe.database.playlist.model.PlaylistRemoteEntity.REMOTE_PLAYLIST_NAME; @@ -72,19 +77,25 @@ public class PlaylistRemoteEntity implements PlaylistLocalItem { @Ignore public boolean isIdenticalTo(final PlaylistInfo info) { + String TAG = "isIdenticalTo"; + boolean DEBUG = !BuildConfig.BUILD_TYPE.equals("release"); /* * Returns boolean comparing the online playlist and the local copy. * (False if info changed such as playlist name or track count) - * [Note that - * getUploader().equals(info.getUploaderName()) - * crashes the app on playlists that are auto-generated with no creator, - * please use - * getUploader() == info.getUploaderName() - * instead as it will work with blank names (Null value if I remember correctly). */ - return getServiceId() == info.getServiceId() && getName().equals(info.getName()) && + boolean returnMe = true; + String uploaderAction = ""; + if (!TextUtils.isEmpty(getUploader()) || !TextUtils.isEmpty(info.getUploaderName())) { // We have an uploader, add it to the comparison + returnMe &= getUploader().equals(info.getUploaderName()); // Use .equals for uploader names + uploaderAction = "We compared uploaders: "+returnMe; + } else { + uploaderAction = "No Uploader"; + } + returnMe &= getServiceId() == info.getServiceId() && getName().equals(info.getName()) && getStreamCount() == info.getStreamCount() && getUrl().equals(info.getUrl()) && - getThumbnailUrl().equals(info.getThumbnailUrl()) && getUploader() == info.getUploaderName(); + getThumbnailUrl().equals(info.getThumbnailUrl()); + if (DEBUG) Log.d(TAG, TAG+" Called With Result: "+returnMe+". And Uploader Action: "+uploaderAction); + return returnMe; } public long getUid() { diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java index 32b83bb22..c2defb0de 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java @@ -259,7 +259,8 @@ public class PlaylistFragment extends BaseListInfoFragment { animateView(headerRootLayout, true, 100); animateView(headerUploaderLayout, true, 300); headerUploaderLayout.setOnClickListener(null); - if (!TextUtils.isEmpty(result.getUploaderName())) { + if (!TextUtils.isEmpty(result.getUploaderName())) { // If we have an uploader : Put them into the ui + //headerUploaderLayout.setVisibility(View.VISIBLE); headerUploaderName.setText(result.getUploaderName()); if (!TextUtils.isEmpty(result.getUploaderUrl())) { headerUploaderLayout.setOnClickListener(v -> { @@ -273,6 +274,9 @@ public class PlaylistFragment extends BaseListInfoFragment { } }); } + } else { // Else : hide the uploader section + //headerUploaderLayout.setVisibility(View.INVISIBLE); + headerUploaderName.setText("Auto-Generated"); } playlistCtrl.setVisibility(View.VISIBLE); From 8c73253a52c3765ea54ffcaaa9406dfb84186d23 Mon Sep 17 00:00:00 2001 From: Peter Hindes Date: Tue, 15 Oct 2019 08:48:36 -0600 Subject: [PATCH 024/270] follow stye on debug --- .../database/playlist/model/PlaylistRemoteEntity.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistRemoteEntity.java b/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistRemoteEntity.java index e3b38851b..3c9085069 100644 --- a/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistRemoteEntity.java +++ b/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistRemoteEntity.java @@ -13,7 +13,6 @@ import org.schabi.newpipe.BuildConfig; import org.schabi.newpipe.database.playlist.PlaylistLocalItem; import org.schabi.newpipe.extractor.playlist.PlaylistInfo; import org.schabi.newpipe.util.Constants; -import org.w3c.dom.Text; import static org.schabi.newpipe.database.LocalItem.LocalItemType.PLAYLIST_REMOTE_ITEM; import static org.schabi.newpipe.database.playlist.model.PlaylistRemoteEntity.REMOTE_PLAYLIST_NAME; @@ -87,14 +86,14 @@ public class PlaylistRemoteEntity implements PlaylistLocalItem { String uploaderAction = ""; if (!TextUtils.isEmpty(getUploader()) || !TextUtils.isEmpty(info.getUploaderName())) { // We have an uploader, add it to the comparison returnMe &= getUploader().equals(info.getUploaderName()); // Use .equals for uploader names - uploaderAction = "We compared uploaders: "+returnMe; + uploaderAction = "compared uploaders: "+returnMe; } else { - uploaderAction = "No Uploader"; + uploaderAction = "no uploader"; } returnMe &= getServiceId() == info.getServiceId() && getName().equals(info.getName()) && getStreamCount() == info.getStreamCount() && getUrl().equals(info.getUrl()) && getThumbnailUrl().equals(info.getThumbnailUrl()); - if (DEBUG) Log.d(TAG, TAG+" Called With Result: "+returnMe+". And Uploader Action: "+uploaderAction); + if (DEBUG) Log.d(TAG, TAG+"() called with result: returnMe = "+returnMe+". and uploaderAction: "+uploaderAction); return returnMe; } From cc1e5edaec8784e56f69ba8a110a39909a8803b5 Mon Sep 17 00:00:00 2001 From: Peter Hindes Date: Tue, 15 Oct 2019 08:52:51 -0600 Subject: [PATCH 025/270] Revert "Merge branch 'dev-all-changes' into dev" This reverts commit f6060261a194d8744e73ee4c0c9d272d7198ec0c, reversing changes made to 8c73253a52c3765ea54ffcaaa9406dfb84186d23. --- .../schabi/newpipe/player/BackgroundPlayer.java | 14 ++------------ .../res/layout/player_notification_expanded.xml | 16 ---------------- 2 files changed, 2 insertions(+), 28 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java b/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java index 42ed546f1..ab07ded22 100644 --- a/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java @@ -219,30 +219,20 @@ public final class BackgroundPlayer extends Service { remoteViews.setOnClickPendingIntent(R.id.notificationContent, PendingIntent.getActivity(this, NOTIFICATION_ID, intent, PendingIntent.FLAG_UPDATE_CURRENT)); - // Lets check if we are playing more than one song in the background - if (basePlayerImpl.playQueue != null && basePlayerImpl.playQueue.size() > 1) { // If we have more than one song - // Use track skiping for forward and back + if (basePlayerImpl.playQueue != null && basePlayerImpl.playQueue.size() > 1) { remoteViews.setInt(R.id.notificationFRewind, SET_IMAGE_RESOURCE_METHOD, R.drawable.exo_controls_previous); remoteViews.setInt(R.id.notificationFForward, SET_IMAGE_RESOURCE_METHOD, R.drawable.exo_controls_next); remoteViews.setOnClickPendingIntent(R.id.notificationFRewind, PendingIntent.getBroadcast(this, NOTIFICATION_ID, new Intent(ACTION_PLAY_PREVIOUS), PendingIntent.FLAG_UPDATE_CURRENT)); remoteViews.setOnClickPendingIntent(R.id.notificationFForward, PendingIntent.getBroadcast(this, NOTIFICATION_ID, new Intent(ACTION_PLAY_NEXT), PendingIntent.FLAG_UPDATE_CURRENT)); - // We dont need a restart track button (skip track backwards) - remoteViews.setViewVisibility(R.id.notificationRestartTrack, View.INVISIBLE); - } else { // But if we only have one song - // Use time skipping for fastforward/rewind + } else { remoteViews.setInt(R.id.notificationFRewind, SET_IMAGE_RESOURCE_METHOD, R.drawable.exo_controls_rewind); remoteViews.setInt(R.id.notificationFForward, SET_IMAGE_RESOURCE_METHOD, R.drawable.exo_controls_fastforward); remoteViews.setOnClickPendingIntent(R.id.notificationFRewind, PendingIntent.getBroadcast(this, NOTIFICATION_ID, new Intent(ACTION_FAST_REWIND), PendingIntent.FLAG_UPDATE_CURRENT)); remoteViews.setOnClickPendingIntent(R.id.notificationFForward, PendingIntent.getBroadcast(this, NOTIFICATION_ID, new Intent(ACTION_FAST_FORWARD), PendingIntent.FLAG_UPDATE_CURRENT)); - // Add a restart track button (skip track backwards) - remoteViews.setViewVisibility(R.id.notificationRestartTrack, View.VISIBLE); - remoteViews.setOnClickPendingIntent(R.id.notificationRestartTrack, - PendingIntent.getBroadcast(this, NOTIFICATION_ID, new Intent(ACTION_PLAY_PREVIOUS), PendingIntent.FLAG_UPDATE_CURRENT)); - } setRepeatModeIcon(remoteViews, basePlayerImpl.getRepeatMode()); diff --git a/app/src/main/res/layout/player_notification_expanded.xml b/app/src/main/res/layout/player_notification_expanded.xml index d8ed96bf0..090642303 100644 --- a/app/src/main/res/layout/player_notification_expanded.xml +++ b/app/src/main/res/layout/player_notification_expanded.xml @@ -116,22 +116,6 @@ android:src="@drawable/ic_repeat_white" tools:ignore="ContentDescription"/> - - Date: Tue, 15 Oct 2019 09:01:30 -0600 Subject: [PATCH 026/270] describe what "Auto-Generated" Means --- .../newpipe/fragments/list/playlist/PlaylistFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java index c2defb0de..3bd03508b 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java @@ -276,7 +276,7 @@ public class PlaylistFragment extends BaseListInfoFragment { } } else { // Else : hide the uploader section //headerUploaderLayout.setVisibility(View.INVISIBLE); - headerUploaderName.setText("Auto-Generated"); + headerUploaderName.setText("Auto-Generated (no uploader found)"); } playlistCtrl.setVisibility(View.VISIBLE); From df2bb228c5ed6a7d5d39c8f342865c3578c81614 Mon Sep 17 00:00:00 2001 From: Peter Hindes Date: Tue, 15 Oct 2019 09:11:04 -0600 Subject: [PATCH 027/270] Much Simpler Fix --- .../database/playlist/model/PlaylistRemoteEntity.java | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistRemoteEntity.java b/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistRemoteEntity.java index 3c9085069..4a7ff06d2 100644 --- a/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistRemoteEntity.java +++ b/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistRemoteEntity.java @@ -83,17 +83,10 @@ public class PlaylistRemoteEntity implements PlaylistLocalItem { * (False if info changed such as playlist name or track count) */ boolean returnMe = true; - String uploaderAction = ""; - if (!TextUtils.isEmpty(getUploader()) || !TextUtils.isEmpty(info.getUploaderName())) { // We have an uploader, add it to the comparison - returnMe &= getUploader().equals(info.getUploaderName()); // Use .equals for uploader names - uploaderAction = "compared uploaders: "+returnMe; - } else { - uploaderAction = "no uploader"; - } returnMe &= getServiceId() == info.getServiceId() && getName().equals(info.getName()) && getStreamCount() == info.getStreamCount() && getUrl().equals(info.getUrl()) && - getThumbnailUrl().equals(info.getThumbnailUrl()); - if (DEBUG) Log.d(TAG, TAG+"() called with result: returnMe = "+returnMe+". and uploaderAction: "+uploaderAction); + getThumbnailUrl().equals(info.getThumbnailUrl()) && TextUtils.equals(getUploader(), info.getUploaderName()); + if (DEBUG) Log.d(TAG, TAG+"() called with result: returnMe = "+returnMe); return returnMe; } From 26a1b1377dc3ea878e2862ceeac8a009e016f3f2 Mon Sep 17 00:00:00 2001 From: Tushar Pandey Date: Tue, 15 Oct 2019 15:13:04 +0000 Subject: [PATCH 028/270] Added translation using Weblate (Pirate) --- app/src/main/res/values-pr/strings.xml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 app/src/main/res/values-pr/strings.xml diff --git a/app/src/main/res/values-pr/strings.xml b/app/src/main/res/values-pr/strings.xml new file mode 100644 index 000000000..a6b3daec9 --- /dev/null +++ b/app/src/main/res/values-pr/strings.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file From 9c00e7f45cd00330599bbec191cc5f5288dd4032 Mon Sep 17 00:00:00 2001 From: Peter Hindes Date: Tue, 15 Oct 2019 12:49:24 -0600 Subject: [PATCH 029/270] Using Strings still need to find out why its null on the library --- .../newpipe/fragments/list/playlist/PlaylistFragment.java | 2 +- app/src/main/res/values/strings.xml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java index 3bd03508b..38ae88efa 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java @@ -276,7 +276,7 @@ public class PlaylistFragment extends BaseListInfoFragment { } } else { // Else : hide the uploader section //headerUploaderLayout.setVisibility(View.INVISIBLE); - headerUploaderName.setText("Auto-Generated (no uploader found)"); + headerUploaderName.setText(R.string.playlist_no_uploader); } playlistCtrl.setVisibility(View.VISIBLE); diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index cb7adfe75..70bd9e0a8 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -428,6 +428,7 @@ Playlisted Playlist thumbnail changed. Could not delete playlist. +Auto-Generated (no uploader found) No Captions Fit From 797e1a105d7f40d5b9a9c613df049c670a16c741 Mon Sep 17 00:00:00 2001 From: Peter HindesDate: Tue, 15 Oct 2019 14:02:37 -0600 Subject: [PATCH 030/270] Comment out debuging code --- .../playlist/model/PlaylistRemoteEntity.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistRemoteEntity.java b/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistRemoteEntity.java index 4a7ff06d2..1a1474f80 100644 --- a/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistRemoteEntity.java +++ b/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistRemoteEntity.java @@ -76,18 +76,18 @@ public class PlaylistRemoteEntity implements PlaylistLocalItem { @Ignore public boolean isIdenticalTo(final PlaylistInfo info) { - String TAG = "isIdenticalTo"; - boolean DEBUG = !BuildConfig.BUILD_TYPE.equals("release"); + //String TAG = "isIdenticalTo"; + //boolean DEBUG = !BuildConfig.BUILD_TYPE.equals("release"); /* * Returns boolean comparing the online playlist and the local copy. * (False if info changed such as playlist name or track count) */ - boolean returnMe = true; - returnMe &= getServiceId() == info.getServiceId() && getName().equals(info.getName()) && + //boolean returnMe = true; + return getServiceId() == info.getServiceId() && getName().equals(info.getName()) && getStreamCount() == info.getStreamCount() && getUrl().equals(info.getUrl()) && getThumbnailUrl().equals(info.getThumbnailUrl()) && TextUtils.equals(getUploader(), info.getUploaderName()); - if (DEBUG) Log.d(TAG, TAG+"() called with result: returnMe = "+returnMe); - return returnMe; + //if (DEBUG) Log.d(TAG, TAG+"() called with result: returnMe = "+returnMe); + //return returnMe; } public long getUid() { From ad2de3a828707ef36ddbb355569bc491ce2f2869 Mon Sep 17 00:00:00 2001 From: Peter Hindes Date: Tue, 15 Oct 2019 17:22:17 -0600 Subject: [PATCH 031/270] only use TextUtils.equals (fixes more crashes) --- .../database/playlist/model/PlaylistRemoteEntity.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistRemoteEntity.java b/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistRemoteEntity.java index 1a1474f80..75515b33a 100644 --- a/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistRemoteEntity.java +++ b/app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistRemoteEntity.java @@ -83,9 +83,12 @@ public class PlaylistRemoteEntity implements PlaylistLocalItem { * (False if info changed such as playlist name or track count) */ //boolean returnMe = true; - return getServiceId() == info.getServiceId() && getName().equals(info.getName()) && - getStreamCount() == info.getStreamCount() && getUrl().equals(info.getUrl()) && - getThumbnailUrl().equals(info.getThumbnailUrl()) && TextUtils.equals(getUploader(), info.getUploaderName()); + return getServiceId() == info.getServiceId() + && getStreamCount() == info.getStreamCount() + && TextUtils.equals(getName(), info.getName()) + && TextUtils.equals(getUrl(), info.getUrl()) + && TextUtils.equals(getThumbnailUrl(), info.getThumbnailUrl()) + && TextUtils.equals(getUploader(), info.getUploaderName()); //if (DEBUG) Log.d(TAG, TAG+"() called with result: returnMe = "+returnMe); //return returnMe; } From 284228ef16a1ec8d26c8333f6f83f997694f5d6d Mon Sep 17 00:00:00 2001 From: Oguz Ersen Date: Fri, 11 Oct 2019 18:24:37 +0000 Subject: [PATCH 032/270] Translated using Weblate (Turkish) Currently translated at 100.0% (478 of 478 strings) --- app/src/main/res/values-tr/strings.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 1d5a3fba6..bb52d95d2 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -503,4 +503,8 @@ Tüm oynatım konumları silinsin mi\? Etkili olması için indirme dizinlerini değiştirin Hizmeti değiştir, şu anda seçili olan: ++ \ No newline at end of file From 19ba37dfad177f2416ce0fabc2dca075038f9c92 Mon Sep 17 00:00:00 2001 From: Daniele Lira Mereb- Videolar
+- +
Date: Mon, 14 Oct 2019 18:06:17 +0000 Subject: [PATCH 033/270] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (478 of 478 strings) --- app/src/main/res/values-pt-rBR/strings.xml | 32 ++++++++++++---------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 109d173b3..d5ecfe56f 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -7,7 +7,7 @@ Informações: %1$s visualizações Reproduzir -Mostra vídeo com restrições de idade. Permissão para vídeos com essa restrição pode ser dada no menu Configurações. +Contém vídeo com restrição de idade. É possível permitir vídeos com essa restrição em Configurações > Conteúdo. Vídeo Reproduz um vídeo quando o NewPipe for aberto a partir de outro aplicativo Reprodução automática @@ -80,13 +80,13 @@A interface do aplicativo parou Reproduzindo em segundo plano Não foi possível configurar o menu de download -Capa do vídeo +Reproduzir vídeo, duração: Miniatura do usuário que enviou o vídeo -Informe a pasta de download de áudios -Pasta para salvar áudios baixados +Escolha a pasta de download para áudios +Os áudios baixados serão salvos aqui Pasta para áudios baixados -Informe a pasta de download de vídeos -Pasta para salvar vídeos baixados +Escolha a pasta de download para vídeos +Os vídeos baixados serão salvos aqui Pasta para vídeos baixados Aplicativo Kore não instalado. Instalar? Não foi possível interpretar completamente o site @@ -122,9 +122,9 @@Sim Depois Desativado -k +M M -G +B Essa permissão é necessária para abrir em modo popup Modo de popup NewPipe @@ -177,7 +177,7 @@ abrir em modo popup
@@ -62,13 +65,30 @@ public class StreamInfoItemHolder extends StreamMiniInfoItemHolder {
viewsAndDate = Localization.shortViewCount(itemBuilder.getContext(), infoItem.getViewCount());
}
}
- if (!TextUtils.isEmpty(infoItem.getTextualUploadDate())) {
+
+ final String uploadDate = getFormattedRelativeUploadDate(infoItem);
+ if (!TextUtils.isEmpty(uploadDate)) {
if (viewsAndDate.isEmpty()) {
- viewsAndDate = infoItem.getTextualUploadDate();
- } else {
- viewsAndDate += " • " + infoItem.getTextualUploadDate();
+ return uploadDate;
}
+
+ return Localization.concatenateStrings(viewsAndDate, uploadDate);
}
+
return viewsAndDate;
}
+
+ private String getFormattedRelativeUploadDate(final StreamInfoItem infoItem) {
+ if (infoItem.getUploadDate() != null) {
+ String formattedRelativeTime = Localization.relativeTime(infoItem.getUploadDate().date());
+
+ if (DEBUG && PreferenceManager.getDefaultSharedPreferences(itemBuilder.getContext())
+ .getBoolean(itemBuilder.getContext().getString(R.string.show_original_time_ago_key), false)) {
+ formattedRelativeTime += " (" + infoItem.getTextualUploadDate() + ")";
+ }
+ return formattedRelativeTime;
+ } else {
+ return infoItem.getTextualUploadDate();
+ }
+ }
}
diff --git a/app/src/main/java/org/schabi/newpipe/util/Localization.java b/app/src/main/java/org/schabi/newpipe/util/Localization.java
index 9a6a9c96e..9274df848 100644
--- a/app/src/main/java/org/schabi/newpipe/util/Localization.java
+++ b/app/src/main/java/org/schabi/newpipe/util/Localization.java
@@ -2,25 +2,26 @@ package org.schabi.newpipe.util;
import android.content.Context;
import android.content.SharedPreferences;
-import android.content.res.Resources;
import android.preference.PreferenceManager;
-import androidx.annotation.NonNull;
-import androidx.annotation.PluralsRes;
-import androidx.annotation.StringRes;
import android.text.TextUtils;
+import org.ocpsoft.prettytime.PrettyTime;
+import org.ocpsoft.prettytime.units.Decade;
import org.schabi.newpipe.R;
import org.schabi.newpipe.extractor.localization.ContentCountry;
import java.text.DateFormat;
import java.text.NumberFormat;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
import java.util.Arrays;
+import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.Locale;
+import androidx.annotation.NonNull;
+import androidx.annotation.PluralsRes;
+import androidx.annotation.StringRes;
+
/*
* Created by chschtsch on 12/29/15.
*
@@ -43,11 +44,16 @@ import java.util.Locale;
public class Localization {
- public final static String DOT_SEPARATOR = " • ";
+ private static PrettyTime prettyTime;
+ private static final String DOT_SEPARATOR = " • ";
private Localization() {
}
+ public static void init() {
+ initPrettyTime();
+ }
+
@NonNull
public static String concatenateStrings(final String... strings) {
return concatenateStrings(Arrays.asList(strings));
@@ -188,4 +194,26 @@ public class Localization {
}
return output;
}
+
+ /*//////////////////////////////////////////////////////////////////////////
+ // Pretty Time
+ //////////////////////////////////////////////////////////////////////////*/
+
+ private static void initPrettyTime() {
+ prettyTime = new PrettyTime(Locale.getDefault());
+ // Do not use decades as YouTube doesn't either.
+ prettyTime.removeUnit(Decade.class);
+ }
+
+ private static PrettyTime getPrettyTime() {
+ // If pretty time's Locale is different, init again with the new one.
+ if (!prettyTime.getLocale().equals(Locale.getDefault())) {
+ initPrettyTime();
+ }
+ return prettyTime;
+ }
+
+ public static String relativeTime(Calendar calendarTime) {
+ return getPrettyTime().formatUnrounded(calendarTime);
+ }
}
diff --git a/app/src/main/res/values/settings_keys.xml b/app/src/main/res/values/settings_keys.xml
index fc7abf678..80f2bb1f4 100644
--- a/app/src/main/res/values/settings_keys.xml
+++ b/app/src/main/res/values/settings_keys.xml
@@ -111,8 +111,8 @@
+ * If there is an error, the function will safely fall back to doing nothing and printing the error to the console.
*
- * If there is an error, It will safely fall back to doing nothing and printing the Error to the console.
* @param builder The HTTPClient Builder on which TLS is enabled on (will be modified in-place)
*/
private static void enableModernTLS(OkHttpClient.Builder builder) {
try {
+ // get the default TrustManager
TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(
TrustManagerFactory.getDefaultAlgorithm());
trustManagerFactory.init((KeyStore) null);
@@ -189,9 +191,7 @@ public class DownloaderImpl extends Downloader {
}
X509TrustManager trustManager = (X509TrustManager) trustManagers[0];
- SSLContext sslContext = SSLContext.getInstance("TLS");
- sslContext.init(null, new TrustManager[] { trustManager }, null);
- //SSLSocketFactory sslSocketFactory = sslContext.getSocketFactory();
+ // insert our own TLSSocketFactory
SSLSocketFactory sslSocketFactory = TLSSocketFactoryCompat.getInstance();
builder.sslSocketFactory(sslSocketFactory, trustManager);
diff --git a/app/src/main/java/org/schabi/newpipe/MainActivity.java b/app/src/main/java/org/schabi/newpipe/MainActivity.java
index 2da01991c..90d299c7f 100644
--- a/app/src/main/java/org/schabi/newpipe/MainActivity.java
+++ b/app/src/main/java/org/schabi/newpipe/MainActivity.java
@@ -109,9 +109,10 @@ public class MainActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) {
if (DEBUG) Log.d(TAG, "onCreate() called with: savedInstanceState = [" + savedInstanceState + "]");
- //enable TLS1.1/1.2 for kitkat devices, to fix download and play for mediaCCC sources
- if (Build.VERSION.SDK_INT == Build.VERSION_CODES.KITKAT)
+ // enable TLS1.1/1.2 for kitkat devices, to fix download and play for mediaCCC sources
+ if (Build.VERSION.SDK_INT == Build.VERSION_CODES.KITKAT) {
TLSSocketFactoryCompat.setAsDefault();
+ }
ThemeHelper.setTheme(this, ServiceHelper.getSelectedServiceId(this));
diff --git a/app/src/main/java/org/schabi/newpipe/util/TLSSocketFactoryCompat.java b/app/src/main/java/org/schabi/newpipe/util/TLSSocketFactoryCompat.java
index 67d8273d2..2f6a650ff 100644
--- a/app/src/main/java/org/schabi/newpipe/util/TLSSocketFactoryCompat.java
+++ b/app/src/main/java/org/schabi/newpipe/util/TLSSocketFactoryCompat.java
@@ -21,14 +21,15 @@ import javax.net.ssl.TrustManager;
public class TLSSocketFactoryCompat extends SSLSocketFactory {
- private static TLSSocketFactoryCompat instance=null;
+ private static TLSSocketFactoryCompat instance = null;
private SSLSocketFactory internalSSLSocketFactory;
public static TLSSocketFactoryCompat getInstance() throws NoSuchAlgorithmException, KeyManagementException {
- if(instance!=null)
+ if (instance != null) {
return instance;
- return instance=new TLSSocketFactoryCompat();
+ }
+ return instance = new TLSSocketFactoryCompat();
}
@@ -93,7 +94,7 @@ public class TLSSocketFactoryCompat extends SSLSocketFactory {
}
private Socket enableTLSOnSocket(Socket socket) {
- if(socket != null && (socket instanceof SSLSocket)) {
+ if (socket != null && (socket instanceof SSLSocket)) {
/*
//Create list of supported protocols
ArrayList