Compare commits

...

1859 Commits

Author SHA1 Message Date
E T
f893edeb82 Translated using Weblate (Turkish)
Currently translated at 100.0% (205 of 205 strings)
2017-09-18 01:11:35 +02:00
Weblate
64e4adef29 Merge remote-tracking branch 'origin/master' 2017-09-16 10:36:43 +02:00
E T
c1fe03aab6 Translated using Weblate (Turkish)
Currently translated at 100.0% (205 of 205 strings)
2017-09-16 10:36:32 +02:00
Christian Schabesberger
4b0a071a35 Merge pull request #691 from TeamNewPipe/minify
enable minify
2017-09-13 21:07:55 +02:00
Christian Schabesberger
4ef69969a7 enable minify 2017-09-12 13:32:53 +02:00
Weblate
c5885d9ce4 Merge remote-tracking branch 'origin/master' 2017-09-11 23:15:20 +02:00
Allan Nordhøy
4c2d705311 Translated using Weblate (Norwegian Bokmål)
Currently translated at 100.0% (205 of 205 strings)
2017-09-11 23:15:16 +02:00
Mauricio Colli
939017ada9 Update extractor version 2017-09-11 11:21:01 -03:00
Matej U
322c5c05cf Translated using Weblate (Slovenian)
Currently translated at 100.0% (205 of 205 strings)
2017-09-11 11:29:26 +02:00
Jonas
cd174b8ce9 Translated using Weblate (French)
Currently translated at 100.0% (205 of 205 strings)
2017-09-11 10:12:00 +02:00
Oscar Hemelaar
f5999f28e9 Translated using Weblate (French)
Currently translated at 97.0% (199 of 205 strings)
2017-09-11 10:06:02 +02:00
Jonas
428a754bfc Translated using Weblate (French)
Currently translated at 96.5% (198 of 205 strings)
2017-09-11 10:05:38 +02:00
Weblate
9ba2a9d907 Merge remote-tracking branch 'origin/master' 2017-09-09 22:34:46 +02:00
Eduardo Caron
71a22348c9 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (205 of 205 strings)
2017-09-09 22:34:45 +02:00
Tobias Groza
4ac0db1869 Translated using Weblate (French)
Currently translated at 80.9% (166 of 205 strings)
2017-09-09 22:34:36 +02:00
Nathan Follens
bca9035302 Translated using Weblate (Dutch)
Currently translated at 100.0% (205 of 205 strings)
2017-09-09 22:34:25 +02:00
Christian Schabesberger
33b316d72f update extractor to not throw channelextractor exception 2017-09-09 22:22:27 +02:00
Christian Schabesberger
6068043fd4 Fix pullrequest teamplate markdown issue 2017-09-09 19:04:30 +02:00
Weblate
2bf4032a6f Merge remote-tracking branch 'origin/master' 2017-09-09 00:46:59 +02:00
Enrico Monese
5e659e3f46 Translated using Weblate (Italian)
Currently translated at 97.0% (199 of 205 strings)
2017-09-09 00:46:56 +02:00
Mauricio Colli
23f70d6b8b Update extractor 2017-09-08 11:34:02 -03:00
Osoitz
ddcf2c5206 Translated using Weblate (Basque)
Currently translated at 100.0% (205 of 205 strings)
2017-09-08 15:44:27 +02:00
Tobias Groza
6b88349c77 Translated using Weblate (German)
Currently translated at 98.0% (201 of 205 strings)
2017-09-07 18:46:03 +02:00
Marian Hanzel
4eb2d3805d Translated using Weblate (Slovak)
Currently translated at 84.8% (174 of 205 strings)
2017-09-06 00:48:04 +02:00
Gaman Gabriel
6cdddc4e9f Translated using Weblate (Romanian)
Currently translated at 77.5% (159 of 205 strings)
2017-09-05 18:48:21 +02:00
Freddy Morán Jr
406d844722 Translated using Weblate (Spanish)
Currently translated at 100.0% (205 of 205 strings)
2017-09-05 14:47:09 +02:00
Mladen Pejaković
09ee0357c7 Translated using Weblate (Serbian)
Currently translated at 100.0% (205 of 205 strings)
2017-09-04 16:23:20 +02:00
Mauricio Colli
f603f63361 Another fix for Weblate 2017-09-04 09:31:53 -03:00
Mauricio Colli
720bb5d615 Fix strings for Weblate 2017-09-04 09:26:00 -03:00
Mauricio Colli
eebd76661d Translated using Weblate (Portuguese (Brazil))
Currently translated at 98.5% (203 of 206 strings)
2017-09-04 14:10:52 +02:00
Mauricio Colli
7885ae5d3f Merge pull request #669 from mauriciocolli/refactor-newpipe
Update extractor and refactored NewPipe
2017-09-04 08:50:21 -03:00
Christian Schabesberger
08257cc5dd Merge pull request #671 from TobiGr/readme-typos
Fix typos in README
2017-09-04 01:39:23 +02:00
TobiGr
27f8144bb8 fix typos in README 2017-09-04 00:39:33 +02:00
Mauricio Colli
146d4a8365 Update extractor and refactored NewPipe 2017-09-03 13:57:12 -03:00
Walter White
bddd9b3409 Translated using Weblate (French)
Currently translated at 83.6% (164 of 196 strings)
2017-09-03 06:04:15 +02:00
Mauricio Colli
0d4d83f3a6 Translated using Weblate (English)
Currently translated at 100.0% (196 of 196 strings)
2017-09-03 06:04:14 +02:00
Anton Shestakov
4bb0bb4ff0 Translated using Weblate (Russian)
Currently translated at 97.9% (192 of 196 strings)
2017-09-02 18:48:04 +02:00
Mauricio Colli
2d75968532 Translated using Weblate (English)
Currently translated at 100.0% (196 of 196 strings)
2017-09-02 00:45:25 +02:00
Nathan Follens
aa0e759168 Translated using Weblate (Dutch)
Currently translated at 100.0% (196 of 196 strings)
2017-09-01 23:47:19 +02:00
Eduardo Caron
cdae745c00 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (196 of 196 strings)
2017-09-01 22:54:42 +02:00
Freddy Morán Jr
a8b6af1f03 Translated using Weblate (Spanish)
Currently translated at 100.0% (196 of 196 strings)
2017-09-01 06:58:52 +02:00
Mauricio Colli
c7106073b4 Translated using Weblate (German)
Currently translated at 90.8% (178 of 196 strings)
2017-09-01 00:17:13 +02:00
Mauricio Colli
d96139798f Translated using Weblate (English)
Currently translated at 100.0% (196 of 196 strings)
2017-09-01 00:17:13 +02:00
nautilusx
bd560644fe Translated using Weblate (German)
Currently translated at 97.9% (192 of 196 strings)
2017-08-31 22:09:52 +02:00
Tobias Groza
f6772c4138 Translated using Weblate (German)
Currently translated at 88.7% (174 of 196 strings)
2017-08-31 12:51:23 +02:00
Mauricio Colli
dd733640e5 Translated using Weblate (Portuguese (Brazil))
Currently translated at 86.7% (170 of 196 strings)
2017-08-31 05:20:12 +02:00
Allan Nordhøy
75a0c0a527 Translated using Weblate (Norwegian Bokmål)
Currently translated at 78.0% (153 of 196 strings)
2017-08-31 05:20:12 +02:00
Mauricio Colli
a5925875a7 Translated using Weblate (English)
Currently translated at 100.0% (196 of 196 strings)
2017-08-31 05:20:02 +02:00
Allan Nordhøy
84157f9247 Translated using Weblate (English)
Currently translated at 100.0% (196 of 196 strings)

Note that "Billion" is often "Milliard" in other languages.
2017-08-31 05:17:26 +02:00
Allan Nordhøy
fcf3ed7881 Translated using Weblate (English)
Currently translated at 100.0% (196 of 196 strings)
2017-08-31 03:45:01 +02:00
theVikac
dac3be69d6 Translated using Weblate (Croatian)
Currently translated at 100.0% (196 of 196 strings)
2017-08-30 09:15:40 +02:00
haseoxth
5118e5cceb Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (196 of 196 strings)
2017-08-30 08:15:06 +02:00
Janusz May
7ca0d20dda Translated using Weblate (Polish)
Currently translated at 98.9% (194 of 196 strings)
2017-08-29 15:47:28 +02:00
Marian Hanzel
378222e484 Translated using Weblate (Slovak)
Currently translated at 100.0% (196 of 196 strings)
2017-08-29 08:41:45 +02:00
mueller-ma
812bec205c Translated using Weblate (German)
Currently translated at 98.4% (193 of 196 strings)
2017-08-28 12:46:04 +02:00
Matej U
2ee8803e33 Translated using Weblate (Slovenian)
Currently translated at 100.0% (196 of 196 strings)
2017-08-27 12:48:39 +02:00
wb9688
007616ca42 Translated using Weblate (Dutch)
Currently translated at 100.0% (196 of 196 strings)
2017-08-27 09:45:09 +02:00
Osoitz
f3b235e4a7 Translated using Weblate (Basque)
Currently translated at 95.9% (188 of 196 strings)
2017-08-26 15:44:19 +02:00
anonymous
074d4be4ba Translated using Weblate (Dutch)
Currently translated at 100.0% (196 of 196 strings)
2017-08-26 09:34:35 +02:00
wb9688
03cd48257b Translated using Weblate (Dutch)
Currently translated at 100.0% (196 of 196 strings)
2017-08-26 09:33:21 +02:00
zmni
546db83de3 Translated using Weblate (Indonesian)
Currently translated at 95.4% (187 of 196 strings)
2017-08-25 18:46:09 +02:00
Matej U
cc11a39f7e Translated using Weblate (Slovenian)
Currently translated at 99.4% (195 of 196 strings)
2017-08-24 00:48:01 +02:00
Eduardo Caron
a83b365afd Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (196 of 196 strings)
2017-08-23 15:22:27 +02:00
Freddy Morán Jr
6a6cfac603 Translated using Weblate (Spanish)
Currently translated at 100.0% (196 of 196 strings)
2017-08-22 01:27:56 +02:00
Weblate
5270cedc56 Merge remote-tracking branch 'origin/master' 2017-08-20 21:45:05 +02:00
Michalis Nikolaidis
2ac833d2a6 Translated using Weblate (Greek)
Currently translated at 22.6% (44 of 194 strings)
2017-08-20 21:45:04 +02:00
Blader
f7be210b12 Translated using Weblate (Dutch)
Currently translated at 93.2% (181 of 194 strings)
2017-08-20 21:44:58 +02:00
Christian Schabesberger
24774d7921 Merge pull request #656 from karyogamy/exoplayer_update
Updated ExoPlayer to r2.5.1
2017-08-18 22:05:31 +02:00
John Zhen M
2b2e954b84 -Updated ExoPlayer to r2.5.1.
-Fixes some more deprecations due to Exoplayer and Android O notification updates.
2017-08-18 11:07:57 -07:00
Tonelico
85108be686 Android O Notification Building Fix (#655)
-Added simple notification channel for Android O.
-Fixes notification building failure for background and popup player on Android O.
-Reduce notification channel importance to low to avoid making noise on every notification update.
2017-08-18 09:05:31 -03:00
Oscar Hemelaar
9fbac943bb Translated using Weblate (French)
Currently translated at 98.4% (191 of 194 strings)
2017-08-18 00:45:31 +02:00
theVikac
d901eaa8d2 Translated using Weblate (Croatian)
Currently translated at 100.0% (194 of 194 strings)
2017-08-17 12:44:50 +02:00
mueller-ma
5fb0e8d007 Translated using Weblate (German)
Currently translated at 98.4% (191 of 194 strings)

In german there is no 's
2017-08-16 21:45:40 +02:00
theVikac
cd5c76cb76 Translated using Weblate (Croatian)
Currently translated at 100.0% (194 of 194 strings)
2017-08-16 10:56:32 +02:00
theVikac
b2a64f8bf3 Added translation using Weblate (Croatian) 2017-08-16 10:50:18 +02:00
mueller-ma
b91acc9de5 Translated using Weblate (German)
Currently translated at 96.9% (188 of 194 strings)
2017-08-15 19:40:37 +02:00
Weblate
07836c7ffa Merge remote-tracking branch 'origin/master' 2017-08-15 19:40:01 +02:00
Tobias Groza
8b30a0d7cc Translated using Weblate (German)
Currently translated at 96.9% (188 of 194 strings)
2017-08-15 19:39:58 +02:00
Mauricio Colli
13a3e2feb2 Merge pull request #654 from coffeemakr/feature-add-components
Add licenses for RxJava
2017-08-15 13:10:11 -03:00
Coffeemakr
f4dca71497 Add licenses for RxJava (and bindings) 2017-08-15 17:21:11 +02:00
Gian Maria Viglianti
e4c6e87338 Translated using Weblate (Italian)
Currently translated at 100.0% (194 of 194 strings)
2017-08-14 18:46:46 +02:00
Eduardo Caron
b2862520fd Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (194 of 194 strings)
2017-08-14 18:34:54 +02:00
Lucas Friederich
bb29f1ea95 Translated using Weblate (Portuguese (Brazil))
Currently translated at 96.3% (187 of 194 strings)
2017-08-14 18:32:58 +02:00
Freddy Morán Jr
69b92757f4 Translated using Weblate (Spanish)
Currently translated at 100.0% (194 of 194 strings)
2017-08-14 03:46:52 +02:00
Mladen Pejaković
62ae2652c7 Translated using Weblate (Serbian)
Currently translated at 95.3% (185 of 194 strings)
2017-08-14 00:46:35 +02:00
anonymous
6f6633050b Translated using Weblate (Italian)
Currently translated at 100.0% (194 of 194 strings)
2017-08-13 17:22:20 +02:00
Gian Maria Viglianti
d37bfd6651 Translated using Weblate (Italian)
Currently translated at 100.0% (194 of 194 strings)
2017-08-13 17:21:56 +02:00
anonymous
55a17a8a83 Translated using Weblate (Italian)
Currently translated at 100.0% (194 of 194 strings)
2017-08-13 17:21:04 +02:00
Gian Maria Viglianti
422b06b72d Translated using Weblate (Italian)
Currently translated at 100.0% (194 of 194 strings)
2017-08-13 17:17:58 +02:00
Freddy Morán Jr
873a1d1c3b Translated using Weblate (Spanish)
Currently translated at 100.0% (194 of 194 strings)
2017-08-13 03:06:27 +02:00
Weblate
44d06767b5 Merge remote-tracking branch 'origin/master' 2017-08-12 18:45:10 +02:00
Thomas Lavend'Homme
3f4379afbf Translated using Weblate (French)
Currently translated at 98.9% (181 of 183 strings)
2017-08-12 18:45:06 +02:00
Cyril Müller
c0515de6b7 Add search and watch history (#626)
Add search and watch history

* Make MainActicity a single task
* Remove some casting
* SearchFragment: start searching when created with query
* Handle settings change in onResume
* History: Log pop up and background playback
* History: Add swipe to remove functionallity
* Enable history by default
* Use stream item
* Store more information about the stream
* Integrate history database into AppDatabase
* Remove redundant casts
* Re-enable date converters
* History: Use Rx Java and run DB in background
 * Also make HistoryDAO extend BasicDAO
* History: RX-ify swipe to remove
* Sort history entries by creation date
* History: Set toolbar title
* Don't repeat history entries
  * Introduced setters so we can update entries in the database
  * If the latest entry has the same (main) values, just update it
2017-08-12 01:50:25 -03:00
anonymous
09159ec245 Translated using Weblate (French)
Currently translated at 93.9% (172 of 183 strings)
2017-08-11 17:05:11 +02:00
Thomas Lavend'Homme
ab0bf80888 Translated using Weblate (French)
Currently translated at 93.4% (171 of 183 strings)
2017-08-11 17:04:40 +02:00
anonymous
74b8eaed04 Translated using Weblate (French)
Currently translated at 86.3% (158 of 183 strings)
2017-08-11 16:05:34 +02:00
anonymous
d64b5ccae2 Translated using Weblate (French)
Currently translated at 85.7% (157 of 183 strings)
2017-08-11 15:58:59 +02:00
anonymous
3883212ca7 Translated using Weblate (French)
Currently translated at 85.2% (156 of 183 strings)
2017-08-11 15:56:20 +02:00
anonymous
1cec41dba0 Translated using Weblate (French)
Currently translated at 84.6% (155 of 183 strings)
2017-08-11 15:56:01 +02:00
anonymous
d00c0ff60c Translated using Weblate (French)
Currently translated at 84.1% (154 of 183 strings)
2017-08-11 15:55:42 +02:00
anonymous
1d597c5f5b Translated using Weblate (French)
Currently translated at 83.6% (153 of 183 strings)
2017-08-11 15:54:41 +02:00
anonymous
c004ef7d0b Translated using Weblate (French)
Currently translated at 83.0% (152 of 183 strings)
2017-08-11 15:54:22 +02:00
Freddy Morán Jr
1bfb977b28 Translated using Weblate (Spanish)
Currently translated at 100.0% (183 of 183 strings)
2017-08-10 19:18:55 +02:00
Osoitz
04138047f6 Translated using Weblate (Basque)
Currently translated at 100.0% (183 of 183 strings)
2017-08-10 14:03:01 +02:00
zmni
147e99a915 Translated using Weblate (Indonesian)
Currently translated at 97.2% (178 of 183 strings)
2017-08-09 15:45:45 +02:00
Matej U
6f7d162edc Translated using Weblate (Slovenian)
Currently translated at 97.8% (179 of 183 strings)
2017-08-09 12:46:52 +02:00
Weblate
910aee4b73 Merge remote-tracking branch 'origin/master' 2017-08-07 20:03:29 +02:00
mueller-ma
77e376751a Translated using Weblate (German)
Currently translated at 96.7% (177 of 183 strings)
2017-08-07 20:03:28 +02:00
Eduardo Caron
7e1264ac44 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (183 of 183 strings)
2017-08-07 20:03:26 +02:00
Christian Schabesberger
8f3a4a5a04 moved on to version v0.10.0 2017-08-07 18:16:19 +02:00
anonymous
2d2689362d Translated using Weblate (German)
Currently translated at 93.9% (172 of 183 strings)
2017-08-07 17:52:56 +02:00
Coffeemaker
913500a6de Translated using Weblate (German)
Currently translated at 93.9% (172 of 183 strings)
2017-08-07 17:51:43 +02:00
Weblate
81d7c54a55 Merge remote-tracking branch 'origin/master' 2017-08-07 17:50:22 +02:00
mueller-ma
4501d5a8fc Translated using Weblate (German)
Currently translated at 99.4% (172 of 173 strings)
2017-08-07 17:50:16 +02:00
Tonelico
becc90409f Added option to resume on audio focus regain. (#624) 2017-08-07 10:04:36 -03:00
Tonelico
10c4f7b465 Added basic channel subscription and feed pages (#620)
Added basic channel subscription and feed pages

- Room Persistence for sqlite support.
- RxJava2 for reactive async support.
- Stetho for database inspection support.
- Enabled Multidex for debug build.
2017-08-07 10:02:30 -03:00
Janusz May
cb5b0ff764 Translated using Weblate (Polish)
Currently translated at 98.8% (171 of 173 strings)
2017-08-04 18:46:15 +02:00
Wout B
277a817eaf Translated using Weblate (Dutch)
Currently translated at 100.0% (173 of 173 strings)
2017-08-04 17:07:20 +02:00
zmni
fbac6f6a57 Translated using Weblate (Indonesian)
Currently translated at 100.0% (173 of 173 strings)
2017-08-04 15:58:58 +02:00
monolifed
b1b0d6ceb6 Translated using Weblate (Turkish)
Currently translated at 100.0% (173 of 173 strings)
2017-08-03 21:38:20 +02:00
Eduardo Caron
07421542df Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (173 of 173 strings)
2017-08-03 14:19:56 +02:00
Weblate
74a8139ac9 Merge remote-tracking branch 'origin/master' 2017-08-03 14:16:37 +02:00
Osoitz
77eb76fefb Translated using Weblate (Basque)
Currently translated at 100.0% (167 of 167 strings)
2017-08-03 14:16:35 +02:00
Eduardo Caron
42a450c61f Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (167 of 167 strings)
2017-08-03 14:16:26 +02:00
TheAssassin
9e2ed10144 Fix bugs in CONTRIBUTING.md
Spelling and grammar bugs, a few additions here and there, make it sound like a team project instead of a one-man show.
2017-08-02 23:34:46 +02:00
Christian Schabesberger
27e5ce7f9b update sentry linkg 2017-08-02 23:19:34 +02:00
Mauricio Colli
f7b322da49 Fix audio focus bug 2017-08-02 14:14:45 -03:00
Mauricio Colli
16ad13c962 Update travis' android and build-tools version 2017-08-01 23:18:47 -03:00
Mauricio Colli
a8880bbc0a Merge pull request #642 from karyogamy/sdk_26_updrade
Upgrade target sdk and support library version to 26
2017-08-01 22:58:54 -03:00
Mauricio Colli
f020b88db3 Move maven repository declaration
- Remove redundant jcenter (already included in the "global application" build.gradle)
2017-08-01 22:56:04 -03:00
Mauricio Colli
a4f5c9e2a3 Merge pull request #636 from coffeemakr/feature-renaming-patterns
Add renaming filename preferences
2017-08-01 22:03:19 -03:00
Mauricio Colli
96d3841dba Fix issues #636 2017-08-01 21:56:51 -03:00
John Zhen M
39277d569f - Updated target, build tools and support libraries version to 26.
- Added dependency repositories jcenter and maven.google.com.
- Changed deprecated ActionBarActivity to AppCompatActivity.
2017-08-01 14:54:32 -07:00
Bruno Guerreiro
75b5bc03f7 Translated using Weblate (Portuguese)
Currently translated at 100.0% (167 of 167 strings)
2017-08-01 18:37:57 +02:00
Osoitz
01e17d9c2e Translated using Weblate (Basque)
Currently translated at 100.0% (167 of 167 strings)
2017-08-01 11:20:14 +02:00
Emilio Loi
8047ff96a8 Translated using Weblate (Italian)
Currently translated at 100.0% (167 of 167 strings)
2017-07-29 15:45:43 +02:00
Gian Maria Viglianti
0e737a2f3b Translated using Weblate (Italian)
Currently translated at 100.0% (167 of 167 strings)
2017-07-28 13:10:51 +02:00
Emilio Loi
854579d814 Translated using Weblate (Italian)
Currently translated at 100.0% (167 of 167 strings)
2017-07-28 13:10:42 +02:00
Emilio Loi
f3cbd99e45 Translated using Weblate (Italian)
Currently translated at 100.0% (167 of 167 strings)

"Cancellare" is "to clear" in writing context
2017-07-28 13:07:02 +02:00
Emilio Loi
c13ed3f347 Translated using Weblate (Italian)
Currently translated at 100.0% (167 of 167 strings)

There is enough space to more descriptive with this text
2017-07-28 13:05:33 +02:00
Emilio Loi
7409b58546 Translated using Weblate (Italian)
Currently translated at 99.4% (167 of 167 strings)
2017-07-28 13:00:17 +02:00
Emilio Loi
404ebb8810 Translated using Weblate (Italian)
Currently translated at 99.4% (166 of 167 strings)

I've inverted position of sentence "help is always welcome" from end to start, merging "The more is done the better it gets!" with the first part of the paragraph
2017-07-28 13:00:13 +02:00
Emilio Loi
b4a9a300c5 Translated using Weblate (Italian)
Currently translated at 97.6% (163 of 167 strings)
2017-07-28 12:58:37 +02:00
Fekrod
aa637e6a2b Translated using Weblate (Vietnamese)
Currently translated at 100.0% (167 of 167 strings)
2017-07-27 04:27:32 +02:00
Fekrod
85132e1e6e Added translation using Weblate (Vietnamese) 2017-07-27 02:59:08 +02:00
Eduardo Caron
f0aa5a4646 Translated using Weblate (Portuguese (Brazil))
Currently translated at 98.8% (165 of 167 strings)
2017-07-26 15:46:21 +02:00
Coffeemakr
b0479d0bd9 Add renaming filename patterns 2017-07-24 13:01:24 +02:00
riotism
e475b888aa Translated using Weblate (Chinese (Hong Kong))
Currently translated at 100.0% (167 of 167 strings)
2017-07-23 21:44:23 +02:00
Nigel
a8a3bbd9f5 Translated using Weblate (Chinese (Hong Kong))
Currently translated at 100.0% (167 of 167 strings)
2017-07-22 20:38:39 +02:00
riotism
f3cbd17598 Translated using Weblate (Chinese (Hong Kong))
Currently translated at 100.0% (167 of 167 strings)
2017-07-22 20:38:09 +02:00
riotism
3d7e4dc286 Translated using Weblate (Chinese (Hong Kong))
Currently translated at 100.0% (167 of 167 strings)
2017-07-22 20:35:53 +02:00
anonymous
2e98729527 Translated using Weblate (German)
Currently translated at 100.0% (167 of 167 strings)
2017-07-20 12:45:26 +02:00
Coffeemaker
3ac838a7ec Translated using Weblate (German)
Currently translated at 99.4% (167 of 167 strings)
2017-07-19 11:42:47 +02:00
Weblate
a1bd5bfc00 Merge remote-tracking branch 'origin/master' 2017-07-19 11:42:41 +02:00
Matej U
b99571a797 Translated using Weblate (Slovenian)
Currently translated at 98.8% (165 of 167 strings)
2017-07-19 11:42:41 +02:00
anonymous
43dec8914c Translated using Weblate (German)
Currently translated at 99.4% (166 of 167 strings)
2017-07-19 11:42:39 +02:00
Christian Schabesberger
5b5cb78595 Merge pull request #633 from coffeemakr/fix-time-links
Prevent "time links" from beeing clicked
2017-07-19 11:38:07 +02:00
Coffeemakr
cb8c919609 Prevent time links from beeing clicked 2017-07-19 10:26:26 +02:00
Anton Shestakov
be3810dfed Translated using Weblate (Russian)
Currently translated at 100.0% (167 of 167 strings)
2017-07-19 07:58:41 +02:00
Weblate
b961b59ad4 Merge remote-tracking branch 'origin/master' 2017-07-17 23:14:27 +02:00
Matej U
d2fbb86d8a Translated using Weblate (Slovenian)
Currently translated at 98.2% (164 of 167 strings)
2017-07-17 23:14:27 +02:00
Mauricio Colli
782c6211d0 Added translation using Weblate (Lithuanian) 2017-07-17 23:14:24 +02:00
Christian Schabesberger
c0dd11b61a move on to v0.9.10 2017-07-15 23:01:34 +02:00
Weblate
885830849e Merge remote-tracking branch 'origin/master' 2017-07-15 15:45:49 +02:00
Coffeemaker
079958f66b Translated using Weblate (German)
Currently translated at 97.6% (164 of 168 strings)
2017-07-15 15:45:48 +02:00
naofum
77c5d7d160 Translated using Weblate (Japanese)
Currently translated at 94.0% (158 of 168 strings)
2017-07-15 15:45:38 +02:00
Mauricio Colli
327195dcca Merge pull request #628 from coffeemakr/fix-make-github-url-untranslatable
Make github_url not translatable
2017-07-13 22:06:21 -03:00
Coffeemakr
cfbc88d375 Make github_url not translatable 2017-07-13 22:05:47 +02:00
Tobias Groza
d75a11b397 Translated using Weblate (German)
Currently translated at 94.6% (159 of 168 strings)
2017-07-13 22:02:54 +02:00
Freddy Morán Jr
8706da2890 Translated using Weblate (Spanish)
Currently translated at 100.0% (168 of 168 strings)
2017-07-13 20:25:43 +02:00
monolifed
824a06c39b Translated using Weblate (Turkish)
Currently translated at 100.0% (168 of 168 strings)
2017-07-12 19:52:00 +02:00
Nathan Follens
9c80c37ee9 Translated using Weblate (Dutch)
Currently translated at 100.0% (168 of 168 strings)
2017-07-12 18:51:06 +02:00
Weblate
ad6d383ee2 Merge remote-tracking branch 'origin/master' 2017-07-12 18:44:34 +02:00
Tobias Groza
5251f970b7 Translated using Weblate (German)
Currently translated at 100.0% (151 of 151 strings)
2017-07-12 18:44:33 +02:00
Coin
2225927bb1 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (151 of 151 strings)
2017-07-12 18:44:28 +02:00
Mauricio Colli
d210b600d7 Merge pull request #625 from coffeemakr/fix-nullpointer-in-background-handler
Check if view still exists in UICallback
2017-07-12 08:46:20 -03:00
Coffeemakr
70da5769d4 Check if view still exists in UICallback 2017-07-12 09:51:23 +02:00
Mauricio Colli
69e3814c77 Merge pull request #612 from coffeemakr/feature-about-activity
Add about activity
2017-07-11 12:49:14 -03:00
Coffeemakr
d950e11332 Small fixes for AboutActivity
* Remove parent activity
 * Finish activity on "up action"
 * Remove unused dimensions
2017-07-11 12:52:20 +02:00
Weblate
1a2b18f722 Merge remote-tracking branch 'origin/master' 2017-07-10 18:13:22 +02:00
George Netu
af78369f87 Translated using Weblate (Romanian)
Currently translated at 99.3% (150 of 151 strings)
2017-07-10 18:13:21 +02:00
Coin
8e4aca0582 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (151 of 151 strings)
2017-07-10 18:13:18 +02:00
Mauricio Colli
b603c178d1 Fix focus search fragment 2017-07-10 00:25:10 -03:00
Mauricio Colli
31e5a7afb0 Improve navigation/backstack 2017-07-10 00:14:24 -03:00
Mauricio Colli
6fb1847327 Update gradle wrapper version 2017-07-09 23:22:46 -03:00
Mauricio Colli
0c1d773134 Merge pull request #596 from marcobiscaro2112/master
Adds support for adjustable playback speed
2017-07-09 22:49:05 -03:00
Mauricio Colli
894ea27df2 Fix issues #596 2017-07-09 22:38:47 -03:00
Coffeemakr
f13731f91e Add about activity 2017-07-05 19:35:15 +02:00
Weblate
6742cbfd59 Merge remote-tracking branch 'origin/master' 2017-07-05 18:44:18 +02:00
Osoitz
6c0dea6138 Translated using Weblate (Basque)
Currently translated at 100.0% (151 of 151 strings)
2017-07-05 18:44:14 +02:00
Mauricio Colli
388e8d0c2f Merge pull request #607 from coffeemakr/fix-remove-bottom-margin-2
Fix margin at the bottom (v2)
2017-07-04 13:33:19 -03:00
Weblate
27b455592a Merge remote-tracking branch 'origin/master' 2017-07-03 16:36:40 +02:00
Osoitz
dad1c04528 Translated using Weblate (Basque)
Currently translated at 100.0% (151 of 151 strings)
2017-07-03 16:36:35 +02:00
Coffeemakr
4ad9fcdc6f Revert error/retry/loading changes 2017-07-02 22:22:37 +02:00
Christian Schabesberger
81b7fe0e9c Merge pull request #606 from edcaron/patch-1
fix f-droid repository link
2017-07-02 22:16:42 +02:00
Eduardo Caron
735cc8d6cc fix f-droid repository link 2017-07-02 16:14:22 -03:00
Christian Schabesberger
43a1c4ce11 move on to v0.9.9 2017-06-30 21:34:28 +02:00
Mauricio Colli
9ca048a881 Merge pull request #600 from coffeemakr/feature-code-improvements
Remove unused code
2017-06-29 17:51:33 -03:00
Coffeemakr
bab3dd417e Remove unused code
* Remove Giga crash handler
 * Some refactoring
 * Remove unused download dialog
 * Remove duplicated intent creation
2017-06-29 12:54:07 +02:00
Weblate
11541310d6 Merge remote-tracking branch 'origin/master' 2017-06-29 07:50:35 +02:00
Anton Shestakov
76740303c5 Translated using Weblate (Russian)
Currently translated at 100.0% (151 of 151 strings)
2017-06-29 07:50:32 +02:00
Mauricio Colli
0a7ecb89ce Adjust fragments' enter/exit animations
- Make a little bit faster
2017-06-28 16:38:13 -03:00
Mauricio Colli
c16a7d5da2 Merge pull request #599 from coffeemakr/feature-code-improvements
Code Improvements
2017-06-28 16:28:16 -03:00
Coffeemakr
b03723c3fb Code improvements
* Replace unchecked casts with checked casts
 * remove Utility.finViewById
 * Fix return activity checking
 * Create UserAction enum
 * Fix typos
 * Add instrumented test for error info
 * ErrorInfo make fields final
 * Log exception using logger
 * Add inherited annotations
 * Resolve deprecation warnings
 * Remove unused methods from utility
 * Reformat code
 * Remove unused methods from Utility and improve getFileExt
 * Create OnScrollBelowItemsListener
2017-06-28 18:56:05 +02:00
Mauricio Colli
40213b2d6a Fix autoplay
- Closes #595
2017-06-27 22:39:33 -03:00
Mauricio Colli
e8b71e867c Merge pull request #588 from coffeemakr/feature-speedup
Speed up detail page loading ⏱
2017-06-27 18:12:30 -03:00
Coffeemakr
8ab1b7fd8f Fix loading and retry positioning 2017-06-27 22:36:31 +02:00
Coffeemakr
8009aa975e Revert unused changes 2017-06-27 14:11:15 +02:00
Coffeemakr
cea706d14a Synchronize initRealtedVideoStreams* 2017-06-27 12:44:20 +02:00
Marco Biscaro
7b60648424 Adds support for adjustable playback speed
ExoPlayer was updated to 2.4.2, which supports playback speed change.

A speed selector was also added in the MainPlayer and PlayerPopup.

Fixes #153.
2017-06-26 19:22:16 -03:00
Eduardo Caron
3cb4952281 Translated using Weblate (Portuguese)
Currently translated at 93.3% (141 of 151 strings)
2017-06-26 21:46:21 +02:00
Coffeemakr
ec1ae647b0 Revert toolbar_search_clear 2017-06-26 14:19:42 +02:00
Coffeemakr
a3be9f36b3 Fix landscape stream item height 2017-06-26 12:42:35 +02:00
Weblate
451910763d Merge remote-tracking branch 'origin/master' 2017-06-19 12:46:26 +02:00
Coffeemaker
884dc38701 Translated using Weblate (German)
Currently translated at 100.0% (151 of 151 strings)
2017-06-19 12:46:26 +02:00
Anton Shestakov
3cca7aead9 Translated using Weblate (Russian)
Currently translated at 96.0% (145 of 151 strings)
2017-06-19 12:46:24 +02:00
Coffeemakr
4c4852129e Layout fixes
* Add selectableItemBackground to the player button
* Make uploader margin to padding
* Convert layout gravity center_horizontal to width=match_parent
2017-06-18 17:25:13 +02:00
Coffeemakr
ae2b0cc76b Format code and remove unused methods 2017-06-18 15:43:11 +02:00
Coffeemakr
71e963c853 Correct icons and title alignment 2017-06-17 14:19:55 +02:00
Coffeemakr
89b680f6d9 Revert RecyclerView to LinearLayout 2017-06-17 13:43:09 +02:00
Christian Schabesberger
f3eacac4ce Merge pull request #586 from coffeemakr/fix-spaces-in-folder
Fix download path handling (#580)
2017-06-16 18:05:05 +02:00
Anton Shestakov
26ec32cbe1 Translated using Weblate (Russian)
Currently translated at 95.3% (144 of 151 strings)
2017-06-16 15:46:23 +02:00
Coffeemakr
6d74038866 Improve speed
* Replace relative layouts and use Recycler view
 * Handle HTML in background
2017-06-16 14:02:45 +02:00
Kristoffer Grundström
7e45e88914 Translated using Weblate (Swedish)
Currently translated at 66.8% (101 of 151 strings)
2017-06-15 03:46:30 +02:00
Coffeemakr
62a4869eb7 Fix download path handling (#580) 2017-06-13 10:47:40 +02:00
Weblate
4f8b51701b Merge remote-tracking branch 'origin/master' 2017-06-13 00:53:12 +02:00
Kristoffer Grundström
169bcc2550 Added translation using Weblate (Swedish) 2017-06-13 00:53:09 +02:00
Christian Schabesberger
88b29cbbf9 moved on to v0.8.9 2017-06-11 14:16:43 +02:00
Christian Schabesberger
51d4d0d3dc Merge branch 'improve-backstack' of https://github.com/mauriciocolli/NewPipe into back 2017-06-11 14:08:47 +02:00
Christian Schabesberger
a482aa1e21 Merge branch 'master' of https://github.com/SpajicM/NewPipe into count 2017-06-11 14:03:49 +02:00
Christian Schabesberger
040b38689d update extractor to v0.9.8 2017-06-11 14:02:57 +02:00
Christian Schabesberger
8e8e53c4d5 update gradle 2017-06-11 13:54:44 +02:00
Marian Hanzel
d717c6d2f6 Translated using Weblate (Slovak)
Currently translated at 100.0% (151 of 151 strings)
2017-06-11 11:27:55 +02:00
Gian Maria Viglianti
9587ce97a8 Translated using Weblate (Italian)
Currently translated at 100.0% (151 of 151 strings)
2017-06-10 00:45:35 +02:00
Janusz May
aaaf573475 Translated using Weblate (Polish)
Currently translated at 100.0% (151 of 151 strings)
2017-06-09 21:45:56 +02:00
zmni
6c6f322d90 Translated using Weblate (Indonesian)
Currently translated at 100.0% (151 of 151 strings)
2017-06-09 19:21:07 +02:00
Matej U
c03f0ed1fb Translated using Weblate (Slovenian)
Currently translated at 100.0% (151 of 151 strings)
2017-06-09 09:46:56 +02:00
Benedikt Freisen
55287393be Translated using Weblate (German)
Currently translated at 100.0% (151 of 151 strings)
2017-06-09 00:45:04 +02:00
Eduardo Caron
9575f92165 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (151 of 151 strings)
2017-06-09 00:24:10 +02:00
SpajicM
a5cbaad804 BackgroundPlayer: Add timestamp in expanded notification 2017-06-08 23:28:45 +02:00
monolifed
f492414b5e Translated using Weblate (Turkish)
Currently translated at 100.0% (151 of 151 strings)
2017-06-08 18:46:54 +02:00
monolifed
3e6ddf7176 Translated using Weblate (English)
Currently translated at 100.0% (151 of 151 strings)
2017-06-08 18:44:44 +02:00
Gian Maria Viglianti
29ffb05653 Translated using Weblate (Italian)
Currently translated at 100.0% (151 of 151 strings)
2017-06-08 00:17:12 +02:00
Freddy Morán Jr
50c3ee2e9c Translated using Weblate (Spanish)
Currently translated at 100.0% (151 of 151 strings)
2017-06-07 21:40:04 +02:00
Janusz May
6292470677 Translated using Weblate (Polish)
Currently translated at 100.0% (151 of 151 strings)
2017-06-07 20:05:38 +02:00
Nathan Follens
8d912f2673 Translated using Weblate (Dutch)
Currently translated at 100.0% (151 of 151 strings)
2017-06-07 16:53:40 +02:00
Coffeemaker
227d129c3a Translated using Weblate (German)
Currently translated at 100.0% (151 of 151 strings)
2017-06-06 23:03:03 +02:00
Benedikt Freisen
d9eeb6afa0 Translated using Weblate (German)
Currently translated at 100.0% (151 of 151 strings)
2017-06-06 23:00:51 +02:00
anonymous
478aecb0f4 Translated using Weblate (German)
Currently translated at 100.0% (151 of 151 strings)
2017-06-06 23:00:14 +02:00
Benedikt Freisen
abb82154c9 Translated using Weblate (German)
Currently translated at 100.0% (151 of 151 strings)
2017-06-06 22:53:06 +02:00
nailyk
03c8b6b5f5 Translated using Weblate (French)
Currently translated at 100.0% (151 of 151 strings)
2017-06-06 20:13:20 +02:00
monolifed
2281300165 Translated using Weblate (Turkish)
Currently translated at 100.0% (151 of 151 strings)
2017-06-06 17:45:46 +02:00
Mauricio Colli
84068d101b Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (151 of 151 strings)
2017-06-06 17:19:26 +02:00
Mauricio Colli
62020fa85b Translated using Weblate (English)
Currently translated at 100.0% (151 of 151 strings)
2017-06-06 17:09:05 +02:00
Mauricio Colli
3c8bf5ccc9 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (151 of 151 strings)
2017-06-06 17:06:39 +02:00
Mauricio Colli
71d5762be8 Remove unnecessary check 2017-06-06 11:46:57 -03:00
monolifed
65d5358366 Translated using Weblate (Turkish)
Currently translated at 100.0% (151 of 151 strings)
2017-06-05 22:16:25 +02:00
Mauricio Colli
6ecdfaf19e Improve backstack and theme change 2017-06-05 16:33:01 -03:00
Nathan Follens
32bd6ae1ac Translated using Weblate (Dutch)
Currently translated at 100.0% (151 of 151 strings)
2017-06-05 18:48:51 +02:00
Mauricio Colli
92231a1e26 Translated using Weblate (French)
Currently translated at 98.6% (149 of 151 strings)
2017-06-05 16:13:31 +02:00
Koleon
38ad4dc440 Translated using Weblate (Czech)
Currently translated at 87.4% (132 of 151 strings)
2017-06-05 16:13:30 +02:00
Eduardo Caron
6645a47b0e Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (151 of 151 strings)
2017-06-05 16:05:12 +02:00
Freddy Morán Jr
75a2d20b0b Translated using Weblate (Spanish)
Currently translated at 100.0% (151 of 151 strings)
2017-06-05 16:00:44 +02:00
naofum
8c15d708e6 Translated using Weblate (Japanese)
Currently translated at 100.0% (151 of 151 strings)
2017-06-05 15:57:13 +02:00
Mauricio Colli
539b7ad87b Update some strings.xml files 2017-06-04 21:10:50 -03:00
Mauricio Colli
fc7c2c9f5a Merge remote-tracking branch 'weblate/master' into fix-strings
# Conflicts:
#	app/src/main/res/values-b+ast/strings.xml
#	app/src/main/res/values-fr/strings.xml
#	app/src/main/res/values-pl/strings.xml
#	app/src/main/res/values-pt-rBR/strings.xml
2017-06-04 20:57:00 -03:00
יובל הרמן
3cd760f654 Translated using Weblate (Hebrew)
Currently translated at 60.7% (107 of 176 strings)
2017-06-04 15:45:11 +02:00
Janusz May
2ec0a5d003 Translated using Weblate (Polish)
Currently translated at 100.0% (176 of 176 strings)
2017-06-02 12:52:45 +02:00
OrNicarZ
1a605e814b Translated using Weblate (French)
Currently translated at 99.4% (175 of 176 strings)
2017-06-02 12:52:44 +02:00
יובל הרמן
fe0053a15d Added translation using Weblate (Hebrew) 2017-06-02 12:52:43 +02:00
Eduardo Caron
014f3e5aff Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (176 of 176 strings)
2017-05-31 21:27:25 +02:00
Enol P
4a25e3b644 Translated using Weblate (Asturian)
Currently translated at 98.8% (174 of 176 strings)
2017-05-31 21:27:24 +02:00
anonymous
e7f59bc436 Translated using Weblate (Polish)
Currently translated at 100.0% (176 of 176 strings)
2017-05-31 21:27:22 +02:00
Christian Schabesberger
488d1ccd5a resolve another weblate crash 2017-05-30 22:08:08 +02:00
Janusz May
409b36c254 Translated using Weblate (Polish)
Currently translated at 100.0% (176 of 176 strings)
2017-05-30 17:33:52 +02:00
Janusz May
b0e567dbfa Translated using Weblate (Polish)
Currently translated at 100.0% (176 of 176 strings)
2017-05-30 17:29:14 +02:00
Freddy Morán Jr
c6086ba281 Translated using Weblate (Spanish)
Currently translated at 100.0% (176 of 176 strings)
2017-05-30 16:33:32 +02:00
Marian Hanzel
aede925351 Translated using Weblate (Slovak)
Currently translated at 100.0% (176 of 176 strings)
2017-05-30 16:33:29 +02:00
Christian Schabesberger
9d38c66510 add .weblate to git ignore 2017-05-29 22:50:41 +02:00
Christian Schabesberger
0c516189c3 try to fix another weblate crash 2017-05-29 22:42:23 +02:00
Freddy Morán Jr
c2936ea289 Translated using Weblate (Spanish)
Currently translated at 100.0% (176 of 176 strings)
2017-05-29 15:44:14 +02:00
Gian Maria Viglianti
dc33460a34 Translated using Weblate (Italian)
Currently translated at 100.0% (176 of 176 strings)
2017-05-29 15:44:14 +02:00
anonymous
ffacc93b55 Translated using Weblate (Armenian)
Currently translated at 18.7% (33 of 176 strings)
2017-05-29 15:44:12 +02:00
Christian Schabesberger
74f0ee2718 fix another weblate crash 2017-05-27 18:45:10 +02:00
ktln
7189791d9f Translated using Weblate (Armenian)
Currently translated at 18.1% (32 of 176 strings)
2017-05-27 13:24:00 +02:00
Eduardo Caron
dc18d53c8f Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (176 of 176 strings)
2017-05-27 13:22:42 +02:00
Bruno Guerreiro
f71ef8e130 Translated using Weblate (Portuguese)
Currently translated at 100.0% (176 of 176 strings)
2017-05-27 13:22:41 +02:00
anonymous
6eec9d8993 Translated using Weblate (Armenian)
Currently translated at 18.1% (32 of 176 strings)
2017-05-27 13:22:39 +02:00
Дима Гайнуллин
9560f98359 Translated using Weblate (Russian)
Currently translated at 100.0% (176 of 176 strings)
2017-05-26 01:30:12 +02:00
Eduardo Caron
217433bf69 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (176 of 176 strings)
2017-05-26 01:30:11 +02:00
ktln
ff5db1b939 Translated using Weblate (Armenian)
Currently translated at 16.4% (29 of 176 strings)
2017-05-26 01:30:10 +02:00
Bruno Guerreiro
455a46d3ad Translated using Weblate (Portuguese)
Currently translated at 100.0% (176 of 176 strings)
2017-05-26 01:30:08 +02:00
Christian Schabesberger
039a879104 fix weblate crash 2017-05-25 10:43:17 +02:00
ktln
dfba9ea53b Translated using Weblate (Russian)
Currently translated at 100.0% (176 of 176 strings)
2017-05-25 02:16:14 +02:00
anonymous
177cce5e8f Translated using Weblate (Russian)
Currently translated at 100.0% (176 of 176 strings)
2017-05-25 01:06:23 +02:00
ktln
309d36260e Translated using Weblate (Russian)
Currently translated at 100.0% (176 of 176 strings)
2017-05-25 01:04:29 +02:00
ktln
bdc73eb755 Translated using Weblate (Russian)
Currently translated at 100.0% (176 of 176 strings)
2017-05-25 00:57:39 +02:00
Anton Shestakov
0786750eb9 Translated using Weblate (Russian)
Currently translated at 96.5% (170 of 176 strings)
2017-05-25 00:54:12 +02:00
Слободан Симић(Slobodan Simić)
9f5d921275 Translated using Weblate (Serbian)
Currently translated at 100.0% (176 of 176 strings)
2017-05-25 00:50:25 +02:00
ktln
8991b2d8e3 Translated using Weblate (Armenian)
Currently translated at 7.3% (13 of 176 strings)
2017-05-25 00:50:24 +02:00
ktln
79dffce59b Translated using Weblate (Russian)
Currently translated at 96.5% (170 of 176 strings)
2017-05-25 00:50:22 +02:00
Christian Schabesberger
e0301a621b Merge pull request #575 from mauriciocolli/clean-up-strings
Remove unused strings
2017-05-24 23:29:08 +02:00
Mauricio Colli
1e4361abdc Merge branch 'master' into clean-up-strings 2017-05-24 18:18:50 -03:00
Mauricio Colli
80c26fd278 Merge new translations 2017-05-24 18:11:34 -03:00
Weblate
3339531086 Merge remote-tracking branch 'origin/master' 2017-05-24 18:37:33 +02:00
monolifed
07ad9fbb11 Translated using Weblate (Turkish)
Currently translated at 100.0% (176 of 176 strings)
2017-05-24 18:37:33 +02:00
ktln
6ddc581d76 Translated using Weblate (Russian)
Currently translated at 96.5% (170 of 176 strings)
2017-05-24 18:37:33 +02:00
Слободан Симић(Slobodan Simić)
dfe94172aa Translated using Weblate (Serbian)
Currently translated at 100.0% (176 of 176 strings)
2017-05-24 18:37:30 +02:00
Mauricio Colli
edb632f9c7 Remove unused strings 2017-05-23 11:53:50 -03:00
Christian Schabesberger
7f73612b9f add use english into contribution notes 2017-05-23 11:11:12 +02:00
Christian Schabesberger
7f130f18b6 Merge pull request #573 from sirekanyan/master
Initial string resources for Armenian language
2017-05-23 11:09:50 +02:00
Anton Shestakov
d05a4c53aa Translated using Weblate (Russian)
Currently translated at 93.7% (165 of 176 strings)
2017-05-22 23:38:03 +02:00
ktln
d99a9b90a0 Translated using Weblate (Russian)
Currently translated at 93.1% (164 of 176 strings)
2017-05-22 23:36:37 +02:00
sirekanyan
f311225312 Added initial string resources for Armenian language 2017-05-23 00:26:15 +03:00
Anton Shestakov
dee17fc313 Translated using Weblate (Russian)
Currently translated at 89.7% (158 of 176 strings)
2017-05-22 22:22:08 +02:00
Nathan Follens
0662538d60 Translated using Weblate (Dutch)
Currently translated at 100.0% (176 of 176 strings)
2017-05-21 21:11:27 +02:00
se7entime
5b52ad91ac Translated using Weblate (Indonesian)
Currently translated at 100.0% (176 of 176 strings)
2017-05-21 14:55:38 +02:00
ktln
8552c41bff Translated using Weblate (Russian)
Currently translated at 89.2% (157 of 176 strings)
2017-05-21 08:39:28 +02:00
Weblate
7ecd298285 Merge remote-tracking branch 'origin/master' 2017-05-21 08:35:39 +02:00
Mauricio Colli
2546f515d1 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (176 of 176 strings)
2017-05-21 08:35:39 +02:00
naofum
8804924d27 Translated using Weblate (Japanese)
Currently translated at 100.0% (176 of 176 strings)
2017-05-21 08:35:38 +02:00
Anton Shestakov
e410cae141 Translated using Weblate (Russian)
Currently translated at 88.0% (155 of 176 strings)
2017-05-21 08:35:34 +02:00
Christian Schabesberger
140cfaec90 moved on to version 0.9.7 2017-05-20 17:45:50 +02:00
Дима Гайнуллин
a0f20aac23 Translated using Weblate (Russian)
Currently translated at 86.9% (153 of 176 strings)
2017-05-20 15:40:42 +02:00
ktln
93fafb362f Translated using Weblate (Russian)
Currently translated at 86.9% (153 of 176 strings)
2017-05-20 15:39:44 +02:00
anonymous
9152df5512 Translated using Weblate (Russian)
Currently translated at 84.0% (148 of 176 strings)
2017-05-20 15:37:48 +02:00
Anton Shestakov
415bcd9f7e Translated using Weblate (Russian)
Currently translated at 83.5% (147 of 176 strings)
2017-05-20 15:37:13 +02:00
Дима Гайнуллин
2224033a85 Translated using Weblate (Russian)
Currently translated at 82.9% (146 of 176 strings)
2017-05-20 15:36:57 +02:00
Anton Shestakov
ade0498684 Translated using Weblate (Russian)
Currently translated at 82.9% (146 of 176 strings)
2017-05-20 15:34:06 +02:00
Дима Гайнуллин
211b00fff4 Translated using Weblate (Russian)
Currently translated at 82.9% (146 of 176 strings)
2017-05-20 15:33:52 +02:00
ktln
77c72d03a8 Translated using Weblate (Russian)
Currently translated at 82.9% (146 of 176 strings)
2017-05-20 15:32:32 +02:00
Anton Shestakov
f429d93351 Translated using Weblate (Russian)
Currently translated at 82.3% (145 of 176 strings)
2017-05-20 15:25:48 +02:00
Дима Гайнуллин
e428f8b116 Translated using Weblate (Russian)
Currently translated at 82.3% (145 of 176 strings)
2017-05-20 15:20:18 +02:00
Anton Shestakov
9482b9d638 Translated using Weblate (Russian)
Currently translated at 82.3% (145 of 176 strings)
2017-05-20 15:19:15 +02:00
Дима Гайнуллин
e019c9f720 Translated using Weblate (Russian)
Currently translated at 82.3% (145 of 176 strings)
2017-05-20 15:12:17 +02:00
Anton Shestakov
e2778366e9 Translated using Weblate (Russian)
Currently translated at 82.3% (145 of 176 strings)
2017-05-20 15:11:49 +02:00
ktln
36d2f8339c Translated using Weblate (Russian)
Currently translated at 82.3% (145 of 176 strings)
2017-05-20 15:11:30 +02:00
anonymous
a4a0c3b9fd Translated using Weblate (Russian)
Currently translated at 81.2% (143 of 176 strings)
2017-05-20 15:10:44 +02:00
ktln
1b1b6c8af8 Translated using Weblate (Russian)
Currently translated at 80.6% (142 of 176 strings)
2017-05-20 15:10:20 +02:00
Anton Shestakov
064fd2bc68 Translated using Weblate (Russian)
Currently translated at 80.1% (141 of 176 strings)
2017-05-20 15:10:11 +02:00
ktln
13152ab6ea Translated using Weblate (Russian)
Currently translated at 79.5% (140 of 176 strings)
2017-05-20 15:07:58 +02:00
Anton Shestakov
1743d821eb Translated using Weblate (Russian)
Currently translated at 78.9% (139 of 176 strings)
2017-05-20 15:04:08 +02:00
ktln
ff16e577ef Translated using Weblate (Russian)
Currently translated at 78.9% (139 of 176 strings)
2017-05-20 15:02:58 +02:00
Anton Shestakov
86062c6e94 Translated using Weblate (Russian)
Currently translated at 78.4% (138 of 176 strings)
2017-05-20 15:02:43 +02:00
ktln
8ce2350563 Translated using Weblate (Russian)
Currently translated at 78.4% (138 of 176 strings)
2017-05-20 15:00:51 +02:00
Anton Shestakov
cb8989af7f Translated using Weblate (Russian)
Currently translated at 77.8% (137 of 176 strings)
2017-05-20 15:00:25 +02:00
ktln
877fa45eb4 Translated using Weblate (Russian)
Currently translated at 77.2% (136 of 176 strings)
2017-05-20 14:59:24 +02:00
Anton Shestakov
e33942486d Translated using Weblate (Russian)
Currently translated at 76.7% (135 of 176 strings)
2017-05-20 14:58:50 +02:00
Дима Гайнуллин
9606e080ef Translated using Weblate (Russian)
Currently translated at 76.7% (135 of 176 strings)
2017-05-20 14:57:45 +02:00
Anton Shestakov
d5cd9c55be Translated using Weblate (Russian)
Currently translated at 76.7% (135 of 176 strings)
2017-05-20 14:56:39 +02:00
Дима Гайнуллин
9c197ced80 Translated using Weblate (Russian)
Currently translated at 75.0% (132 of 176 strings)
2017-05-20 14:40:15 +02:00
Anton Shestakov
f8424599e1 Translated using Weblate (Russian)
Currently translated at 75.0% (132 of 176 strings)
2017-05-20 14:38:59 +02:00
naofum
ccee18057a Translated using Weblate (Japanese)
Currently translated at 100.0% (176 of 176 strings)
2017-05-20 07:11:53 +02:00
Freddy Morán Jr
1ad0f342ad Translated using Weblate (Spanish)
Currently translated at 100.0% (176 of 176 strings)
2017-05-19 15:39:44 +02:00
Eduardo Caron
7a16ac574b Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (176 of 176 strings)
2017-05-19 15:16:03 +02:00
Matej U
f46738f750 Translated using Weblate (Slovenian)
Currently translated at 100.0% (176 of 176 strings)
2017-05-19 13:49:47 +02:00
monolifed
fb8ff3fece Translated using Weblate (Turkish)
Currently translated at 100.0% (176 of 176 strings)
2017-05-19 12:20:03 +02:00
Weblate
7498dd3800 Merge remote-tracking branch 'origin/master' 2017-05-19 03:46:42 +02:00
Freddy Morán Jr
957c31b9c5 Translated using Weblate (Spanish)
Currently translated at 100.0% (172 of 172 strings)
2017-05-19 03:46:40 +02:00
Mauricio Colli
b260570e8c Merge pull request #568 from mauriciocolli/option-search-suggestions
Add option to disable the search suggestions
2017-05-16 22:17:28 -03:00
Mauricio Colli
46542747b7 Merge pull request #567 from mauriciocolli/option-gestures-player
Add option to disable the gesture controls of the player
2017-05-16 22:14:31 -03:00
Mauricio Colli
d64480fc9b Add option to disable the search suggestions 2017-05-16 22:14:07 -03:00
Mauricio Colli
c00e694d40 Add option to disable the gesture controls of the player 2017-05-16 21:45:38 -03:00
Bruno Guerreiro
f0761cc95e Translated using Weblate (Portuguese)
Currently translated at 100.0% (172 of 172 strings)
2017-05-16 21:32:24 +02:00
Eduardo Caron
068554955c Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (172 of 172 strings)
2017-05-16 21:25:48 +02:00
Freddy Morán Jr
a2f915f556 Translated using Weblate (Spanish)
Currently translated at 100.0% (172 of 172 strings)
2017-05-16 14:38:29 +02:00
Mohamad Hasan Al Banna
cffd35c974 Translated using Weblate (Indonesian)
Currently translated at 100.0% (172 of 172 strings)
2017-05-15 17:53:50 +02:00
naofum
2ef2aa98a4 Translated using Weblate (Japanese)
Currently translated at 100.0% (172 of 172 strings)
2017-05-15 17:23:57 +02:00
Théophane
ba98b30aa4 Translated using Weblate (French)
Currently translated at 100.0% (172 of 172 strings)
2017-05-15 16:23:59 +02:00
E T
87c0f9c803 Translated using Weblate (Turkish)
Currently translated at 100.0% (172 of 172 strings)
2017-05-15 16:08:54 +02:00
Matej U
ce620b9e28 Translated using Weblate (Slovenian)
Currently translated at 100.0% (172 of 172 strings)
2017-05-15 14:44:49 +02:00
Weblate
fcbb5536eb Merge remote-tracking branch 'origin/master' 2017-05-15 14:42:35 +02:00
Matej U
72df6dbd80 Translated using Weblate (Slovenian)
Currently translated at 100.0% (171 of 171 strings)
2017-05-15 14:42:32 +02:00
Christian Schabesberger
3a6b023dbf update gradle to version 2.3.2 2017-05-15 12:27:46 +02:00
Mauricio Colli
8b67f1358d Implement no-audio icon 2017-05-15 00:57:57 -03:00
Mauricio Colli
2aebb3b8db Add and update resources 2017-05-15 00:57:04 -03:00
Weblate
f2b38be2b0 Merge remote-tracking branch 'origin/master' 2017-05-14 21:46:25 +02:00
E T
a43001f30d Translated using Weblate (Turkish)
Currently translated at 100.0% (171 of 171 strings)
2017-05-14 21:46:25 +02:00
cwgt
17abe1ea5c Translated using Weblate (Bengali (Bangladesh))
Currently translated at 100.0% (167 of 167 strings)
2017-05-14 21:46:24 +02:00
Bruno Guerreiro
6aaefab618 Translated using Weblate (Portuguese)
Currently translated at 98.2% (168 of 171 strings)
2017-05-14 21:46:22 +02:00
Mauricio Colli
cd867fb4d1 Merge pull request #559 from mauriciocolli/default-popup-resolution
Change popup default resolution
2017-05-14 14:01:12 -03:00
Mauricio Colli
25988f61a6 Change popup default resolution 2017-05-14 13:57:08 -03:00
Mauricio Colli
be421e580d Merge pull request #557 from mauriciocolli/fix-settings-rotation
Fix settings on screen rotation
2017-05-14 11:20:29 -03:00
Mauricio Colli
641ab25470 Fix Settings on screen rotation 2017-05-14 11:10:00 -03:00
Mauricio Colli
a508539c2e Merge pull request #556 from mauriciocolli/fix-audio-focus
Improve behavior on audio focus gain
2017-05-14 10:54:13 -03:00
Mauricio Colli
cac79d9a0d Improve behavior on audio focus gain 2017-05-14 10:46:28 -03:00
Christian Schabesberger
9ede8118da Merge pull request #553 from mauriciocolli/fix-screen-on
Fix keep screen on
2017-05-14 10:48:05 +02:00
Mauricio Colli
e47761750a Fix 'keep screen on' 2017-05-14 00:32:28 -03:00
Christian Schabesberger
2f181ce7c9 move on to version 0.9.6 2017-05-13 22:13:28 +02:00
Christian Schabesberger
3a13d4a1de Merge pull request #546 from mueller-ma/kodi
Change order of buttons in the title bar
2017-05-13 20:16:24 +02:00
Christian Schabesberger
719de00e0f Merge branch 'fix-menu-update' of https://github.com/mauriciocolli/NewPipe 2017-05-13 20:08:18 +02:00
cwgt
ddffe99f53 Translated using Weblate (Bengali (Bangladesh))
Currently translated at 100.0% (167 of 167 strings)
2017-05-13 11:36:43 +02:00
Eduardo Caron
9ade596f06 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (171 of 171 strings)
2017-05-11 20:33:38 +02:00
nailyk
46f413b7f2 Translated using Weblate (French)
Currently translated at 100.0% (171 of 171 strings)
2017-05-11 19:41:37 +02:00
nailyk
5fe2e7b8ad Translated using Weblate (French)
Currently translated at 92.3% (158 of 171 strings)

 popup_mode_share_menu_title a été traduit "Module popup de Newpipe", restons cohérents.
2017-05-11 19:33:46 +02:00
nailyk
3008cbb5f4 Translated using Weblate (French)
Currently translated at 91.8% (157 of 171 strings)
2017-05-11 19:20:57 +02:00
Weblate
f7983960e5 Merge remote-tracking branch 'origin/master' 2017-05-10 21:07:55 +02:00
monolifed
bb8007bb7c Translated using Weblate (Turkish)
Currently translated at 100.0% (171 of 171 strings)
2017-05-10 21:07:55 +02:00
Freddy Morán Jr
01751ba97a Translated using Weblate (Spanish)
Currently translated at 100.0% (171 of 171 strings)
2017-05-10 21:07:55 +02:00
Tobias Groza
f41475d11c Translated using Weblate (German)
Currently translated at 96.4% (165 of 171 strings)
2017-05-10 21:07:54 +02:00
Nathan Follens
d8914d9b6d Translated using Weblate (Dutch)
Currently translated at 100.0% (171 of 171 strings)
2017-05-10 21:07:52 +02:00
mueller-ma
94cc2ad365 change order of buttons, see https://github.com/TeamNewPipe/NewPipe/issues/471#issuecomment-300267118 2017-05-09 20:57:42 +02:00
Christian Schabesberger
e07464b81c Merge pull request #545 from mauriciocolli/fix-image-loader
Fix image loading bug
2017-05-09 20:19:43 +02:00
Jose Maeso
9d231b55b5 Translated using Weblate (Spanish)
Currently translated at 100.0% (171 of 171 strings)
2017-05-09 18:09:23 +02:00
Freddy Morán Jr
77d8dac3c1 Translated using Weblate (Spanish)
Currently translated at 100.0% (171 of 171 strings)
2017-05-09 18:07:54 +02:00
Freddy Morán Jr
e160015283 Translated using Weblate (Spanish)
Currently translated at 100.0% (171 of 171 strings)
2017-05-09 18:05:47 +02:00
mueller-ma
aeb0cac3ee change order of buttons. closes #471 2017-05-09 17:11:19 +02:00
naofum
a539f94837 Translated using Weblate (Japanese)
Currently translated at 100.0% (171 of 171 strings)
2017-05-09 16:19:42 +02:00
monolifed
df70751071 Translated using Weblate (Turkish)
Currently translated at 100.0% (171 of 171 strings)
2017-05-09 14:34:49 +02:00
E T
e55f1dff78 Translated using Weblate (Turkish)
Currently translated at 97.6% (167 of 171 strings)
2017-05-09 14:12:43 +02:00
Weblate
47646e1c62 Merge remote-tracking branch 'origin/master' 2017-05-09 14:11:45 +02:00
E T
80e673f20c Translated using Weblate (Turkish)
Currently translated at 100.0% (167 of 167 strings)
2017-05-09 14:11:41 +02:00
Mauricio Colli
9ca8c5480c Fix image loader bug 2017-05-09 00:12:06 -03:00
Mauricio Colli
4d0d3c7ead Update menu items after change in settings 2017-05-08 22:23:27 -03:00
Christian Schabesberger
58137aadc9 Merge pull request #543 from mueller-ma/patch-1
Remove untranslatable string
2017-05-08 22:45:21 +02:00
mueller-ma
82a59ae479 Remove untranslatable string 2017-05-08 20:51:13 +02:00
Mauricio Colli
affd23b14e Fix animations 2017-05-08 10:33:26 -03:00
Mauricio Colli
9c7f249756 Clean and move some classes 2017-05-08 10:28:33 -03:00
Christian Schabesberger
e2a0502171 Merge pull request #538 from cwgt/bn-bd-translation
Add Bangla translation (for Bangladesh)
2017-05-08 11:44:27 +02:00
cwgt
3832a4b355 Add Bangla translation (for Bangladesh) 2017-05-08 15:27:55 +06:00
cwgt
84f059415c Create strings.xml 2017-05-08 13:32:33 +06:00
Christian Schabesberger
bb292e3199 add some more screenshots 2017-05-07 20:41:44 +02:00
Christian Schabesberger
70541bf561 moved on to version 0.9.5 2017-05-07 20:05:00 +02:00
Christian Schabesberger
48dd8e88e3 Merge branch 'master' of github.com:theScrabi/NewPipe 2017-05-07 19:48:21 +02:00
Eduardo Caron
52c2e0899d Translated using Weblate (Portuguese (Brazil))
Currently translated at 99.4% (166 of 167 strings)
2017-05-07 18:46:09 +02:00
Christian Schabesberger
9955d5b62f Merge branch 'resize' 2017-05-04 21:31:38 +02:00
Marian Hanzel
8e26247fa1 Translated using Weblate (Slovak)
Currently translated at 100.0% (167 of 167 strings)
2017-05-04 21:02:23 +02:00
Weblate
72924e2692 Merge remote-tracking branch 'origin/master' 2017-05-04 18:46:39 +02:00
Eduardo Caron
8c2c8d630f Translated using Weblate (Portuguese (Brazil))
Currently translated at 98.8% (165 of 167 strings)
2017-05-04 18:46:39 +02:00
Freddy Morán Jr
5ccf0baa6b Translated using Weblate (Spanish)
Currently translated at 100.0% (167 of 167 strings)
2017-05-04 18:46:36 +02:00
Christian Schabesberger
8fff0ccdf2 Merge pull request #532 from mauriciocolli/improve-readme
Update Readme
2017-05-04 00:10:44 +02:00
Mauricio Colli
35264bfb97 Update Readme 2017-05-03 16:13:31 -03:00
Matej U
4c9b0dc8e9 Translated using Weblate (Slovenian)
Currently translated at 100.0% (167 of 167 strings)
2017-05-02 21:02:58 +02:00
Freddy Morán Jr
4deb7caa83 Translated using Weblate (Spanish)
Currently translated at 100.0% (167 of 167 strings)
2017-05-02 17:22:14 +02:00
Enol P
45f1a512b4 Translated using Weblate (Asturian)
Currently translated at 98.2% (164 of 167 strings)
2017-05-01 18:44:12 +02:00
Mladen Pejaković
ab95fdc087 Translated using Weblate (Serbian)
Currently translated at 99.4% (166 of 167 strings)
2017-05-01 15:46:36 +02:00
Christian Schabesberger
df608b9ded Merge branch 'feature-resize' of https://github.com/mauriciocolli/NewPipe into resize 2017-05-01 15:15:30 +02:00
Tobias Groza
6a4c81d160 Translated using Weblate (German)
Currently translated at 98.2% (164 of 167 strings)
2017-05-01 12:45:14 +02:00
Mauricio Colli
040d658540 Implement resizable popup 2017-05-01 02:23:50 -03:00
naofum
cbc9913e9c Translated using Weblate (Japanese)
Currently translated at 100.0% (167 of 167 strings)
2017-04-30 05:47:23 +02:00
Wout Bertrums
f007cbd5ee Translated using Weblate (Dutch)
Currently translated at 100.0% (167 of 167 strings)
2017-04-29 18:46:39 +02:00
zmni
7351591df7 Translated using Weblate (Indonesian)
Currently translated at 100.0% (167 of 167 strings)
2017-04-29 16:52:22 +02:00
monolifed
5222d4cbba Translated using Weblate (Turkish)
Currently translated at 100.0% (167 of 167 strings)
2017-04-29 09:48:33 +02:00
Weblate
ef9966815e Merge remote-tracking branch 'origin/master' 2017-04-29 08:27:55 +02:00
anonymous
ad73440ce9 Translated using Weblate (Czech)
Currently translated at 93.9% (154 of 164 strings)
2017-04-29 08:27:51 +02:00
Christian Schabesberger
c81cfdc455 moved on to version 0.9.4 2017-04-28 21:26:11 +02:00
Christian Schabesberger
134c3804db Merge branch 'fix-search' of https://github.com/mauriciocolli/NewPipe into fix-search 2017-04-28 20:42:37 +02:00
Christian Schabesberger
e355df5eda update NewPipeExtractor 2017-04-28 20:19:23 +02:00
Mauricio Colli
a68e0a95f4 Fix NullPointerException 2017-04-28 01:07:54 -03:00
Mauricio Colli
6fd6facf72 Improve animations of VideoDetailFragment 2017-04-28 00:58:50 -03:00
Mauricio Colli
00102d4048 Try to fix travis 2017-04-26 17:07:24 -03:00
Mauricio Colli
adbeff11d4 Minor improvements 2017-04-26 16:32:20 -03:00
Mauricio Colli
a8fe329678 Improve fragments
- They save the state now, that means, no more reloading after rotating the screen or switching between apps
2017-04-26 16:32:04 -03:00
Mauricio Colli
a4b61bf730 Add new workers 2017-04-26 16:25:09 -03:00
Mauricio Colli
ee592def0c Add drawables and improve layouts 2017-04-26 16:24:33 -03:00
Allan Nordhøy
c14e117239 Translated using Weblate (Norwegian Bokmål)
Currently translated at 100.0% (164 of 164 strings)
2017-04-25 03:46:10 +02:00
rapi3
b6e94dde0c Translated using Weblate (Romanian)
Currently translated at 100.0% (164 of 164 strings)
2017-04-23 15:46:17 +02:00
monolifed
63a4a44d7e Translated using Weblate (Turkish)
Currently translated at 100.0% (164 of 164 strings)
2017-04-23 12:46:56 +02:00
Allan Nordhøy
eb8ab5d527 Translated using Weblate (Norwegian Bokmål)
Currently translated at 100.0% (164 of 164 strings)
2017-04-23 00:57:22 +02:00
riotism
b778d40d65 Translated using Weblate (Chinese (Hong Kong))
Currently translated at 97.5% (160 of 164 strings)
2017-04-22 18:44:35 +02:00
rapi3
2f570672dc Translated using Weblate (Romanian)
Currently translated at 100.0% (164 of 164 strings)
2017-04-21 14:11:07 +02:00
anonymous
9290ed490f Translated using Weblate (Turkish)
Currently translated at 100.0% (164 of 164 strings)
2017-04-21 11:12:23 +02:00
monolifed
1bda812c75 Translated using Weblate (Turkish)
Currently translated at 100.0% (164 of 164 strings)
2017-04-21 11:11:23 +02:00
Weblate
ab82406c98 Merge remote-tracking branch 'origin/master' 2017-04-19 17:36:17 +02:00
Mladen Pejaković
be763349df Translated using Weblate (Serbian)
Currently translated at 99.3% (163 of 164 strings)
2017-04-19 17:36:16 +02:00
zmni
91764ad601 Translated using Weblate (Indonesian)
Currently translated at 100.0% (164 of 164 strings)
2017-04-19 17:36:14 +02:00
Christian Schabesberger
1c4031aa38 Merge branch 'master' of github.com:theScrabi/NewPipe 2017-04-18 22:39:16 +02:00
Christian Schabesberger
c3bc648dd4 moved on to version 0.9.3 2017-04-18 22:34:32 +02:00
Christian Schabesberger
c97d794272 updated sdk and support lib 2017-04-18 22:34:04 +02:00
Christian Schabesberger
8e7d2e91e9 Merge branch 'feature-backplayer' of https://github.com/mauriciocolli/NewPipe into mark 2017-04-18 22:06:47 +02:00
Laura Arjona Reina
cf0fbbbd3d Translated using Weblate (Spanish)
Currently translated at 100.0% (164 of 164 strings)
2017-04-18 20:19:12 +02:00
Tobias Groza
7d3ede7946 Translated using Weblate (German)
Currently translated at 100.0% (164 of 164 strings)
2017-04-18 12:58:44 +02:00
Eduardo Caron
1aa308eb5d Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (164 of 164 strings)
2017-04-18 00:35:02 +02:00
anonymous
4bfd30e34a Translated using Weblate (Portuguese (Brazil))
Currently translated at 99.3% (163 of 164 strings)
2017-04-18 00:28:43 +02:00
Eduardo Caron
0f46c90688 Translated using Weblate (Portuguese (Brazil))
Currently translated at 99.3% (163 of 164 strings)
2017-04-18 00:27:31 +02:00
Matej U
aa2173fc4a Translated using Weblate (Slovenian)
Currently translated at 100.0% (164 of 164 strings)
2017-04-17 18:09:10 +02:00
Mauricio Colli
932cb1d19c Remove ugly bitmap sharing and improvements
- Now it is just using the ImageLoader to load the image, and better yet, it already have cache implemented in it
- Improve MainActivity intent handler
- Improve utils classes
2017-04-17 01:21:48 -03:00
Mauricio Colli
18b038d8e4 Improve notification layouts 2017-04-17 01:20:14 -03:00
Mauricio Colli
2ac71c75c0 Improve players
- Background player is using ExoPlayer internally now
2017-04-17 01:19:53 -03:00
naofum
4067ba5232 Translated using Weblate (Japanese)
Currently translated at 100.0% (164 of 164 strings)
2017-04-16 16:48:37 +02:00
Marian Hanzel
ab47dd5a5b Translated using Weblate (Slovak)
Currently translated at 100.0% (164 of 164 strings)
2017-04-15 22:32:17 +02:00
Nathan Follens
3130910307 Translated using Weblate (Dutch)
Currently translated at 100.0% (164 of 164 strings)
2017-04-15 17:35:12 +02:00
Sérgio Marques
22113439a4 Translated using Weblate (Portuguese)
Currently translated at 100.0% (164 of 164 strings)
2017-04-15 16:09:58 +02:00
Weblate
2d25a9ad7a Merge remote-tracking branch 'origin/master' 2017-04-15 16:07:22 +02:00
Freddy Morán Jr
8f0a2cc2f0 Translated using Weblate (Spanish)
Currently translated at 100.0% (161 of 161 strings)
2017-04-15 16:07:22 +02:00
Marian Hanzel
4ca39258c9 Translated using Weblate (Slovak)
Currently translated at 100.0% (161 of 161 strings)
2017-04-15 16:07:21 +02:00
Enol P
d0c0238b8b Translated using Weblate (Asturian)
Currently translated at 98.1% (158 of 161 strings)
2017-04-15 16:07:20 +02:00
Sérgio Marques
f9f08e5169 Translated using Weblate (Portuguese)
Currently translated at 100.0% (161 of 161 strings)
2017-04-15 16:07:18 +02:00
Christian Schabesberger
cfc51b2401 Merge branch 'master' of github.com:theScrabi/NewPipe 2017-04-15 14:05:39 +02:00
Christian Schabesberger
54c2704cb5 switch to dark default theme 2017-04-15 14:05:31 +02:00
Christian Schabesberger
9b51c946fe add 1080p to available features 2017-04-15 13:43:21 +02:00
Christian Schabesberger
06f38cbcb4 Merge branch 'feature-4k60f' of git://github.com/mauriciocolli/NewPipe into 4k 2017-04-15 12:52:03 +02:00
Christian Schabesberger
f368d6b257 update extractor 2017-04-15 12:51:35 +02:00
Marian Hanzel
f4301da14d Translated using Weblate (Slovak)
Currently translated at 100.0% (161 of 161 strings)
2017-04-13 21:49:26 +02:00
Weblate
f34c09f165 Merge remote-tracking branch 'origin/master' 2017-04-13 20:51:06 +02:00
Freddy Morán Jr
6d1db56512 Translated using Weblate (Spanish)
Currently translated at 100.0% (161 of 161 strings)
2017-04-13 20:51:03 +02:00
Christian Schabesberger
b70c07d004 update extractor 2017-04-13 19:41:43 +02:00
Christian Schabesberger
f9f48a5eb6 Merge branch 'master' of github.com:theScrabi/NewPipe 2017-04-13 19:41:28 +02:00
Christian Schabesberger
14e4e73444 update gradle 2017-04-13 19:41:15 +02:00
Nathan Follens
f2ce4d2daf Translated using Weblate (Dutch)
Currently translated at 100.0% (161 of 161 strings)
2017-04-13 19:10:56 +02:00
naofum
468ebdda87 Translated using Weblate (Japanese)
Currently translated at 100.0% (161 of 161 strings)
2017-04-13 16:53:26 +02:00
nautilusx
a1f0fb3b14 Translated using Weblate (German)
Currently translated at 100.0% (161 of 161 strings)
2017-04-13 16:08:34 +02:00
zmni
3c9f4de234 Translated using Weblate (Indonesian)
Currently translated at 100.0% (161 of 161 strings)
2017-04-13 15:59:13 +02:00
Tobias Groza
8ae411619f Translated using Weblate (German)
Currently translated at 96.8% (156 of 161 strings)
2017-04-13 15:56:35 +02:00
nautilusx
61e5c9121a Translated using Weblate (German)
Currently translated at 96.2% (155 of 161 strings)
2017-04-13 15:55:28 +02:00
Weblate
8a3cf0d5dc Merge remote-tracking branch 'origin/master' 2017-04-13 15:53:52 +02:00
Freddy Morán Jr
ecb5df65ac Translated using Weblate (Spanish)
Currently translated at 100.0% (160 of 160 strings)
2017-04-13 15:53:52 +02:00
anonymous
5f1e98a0d3 Translated using Weblate (German)
Currently translated at 96.2% (154 of 160 strings)
2017-04-13 15:53:49 +02:00
Mauricio Colli
3b9a477499 Add resolution support up to 4k and 60 fps
- Up to 4k with 60 fps
    - Not every device can play in that resolution and bitrate
    - Add option to hide these high resolution greater than 1080p (2k,4k) for not clutter the menus
- Add a default resolution for the popup, wil be used when opening in popup mode from another app
2017-04-12 03:07:15 -03:00
Christian Schabesberger
e5bf98a741 move on to version 0.9.2 2017-04-11 22:51:04 +02:00
Christian Schabesberger
06fafc247e move to version 0.9.2 of NewPipeExtractor 2017-04-11 22:49:18 +02:00
Christian Schabesberger
e8bb17b631 Merge branch 'fix-next-video' of git://github.com/mauriciocolli/NewPipe into mul 2017-04-11 22:26:41 +02:00
Freddy Morán Jr
363cd07883 Translated using Weblate (Spanish)
Currently translated at 100.0% (160 of 160 strings)
2017-04-11 18:56:03 +02:00
Mladen Pejaković
2b4a9286c4 Translated using Weblate (Serbian)
Currently translated at 99.3% (159 of 160 strings)
2017-04-11 00:46:21 +02:00
Nathan Follens
34c985026f Translated using Weblate (Dutch)
Currently translated at 100.0% (160 of 160 strings)
2017-04-10 17:40:52 +02:00
naofum
4a0aa42914 Translated using Weblate (Japanese)
Currently translated at 100.0% (160 of 160 strings)
2017-04-10 17:21:54 +02:00
Mauricio Colli
746c2a15bf Migrate to fragments and improvements
- Migrate to fragments
- Fix #487
- Don't show "Open in popup mode" to channel links
- New backstack of videos
- Change the subscribers count to format using `NumberFormat`, for example some locales use `.`  others `,`, this handles it automatically (and the old method had a bug for leading zero, e.g. 4.82.125 instead of 4.082.125)
- Add string 'subscribers' for channels with more than 1 subscriber (plural)
- Popup player chooses the default format and resolution based on the new preference (format)
- Fix taskaffinity of the router activities
- Show title before loading, as it is available from the items already loaded
2017-04-09 14:34:00 -03:00
zmni
9318bb5306 Translated using Weblate (Indonesian)
Currently translated at 100.0% (160 of 160 strings)
2017-04-09 07:39:53 +02:00
Matej U
2a10ceb74f Translated using Weblate (Slovenian)
Currently translated at 100.0% (160 of 160 strings)
2017-04-08 22:08:31 +02:00
Weblate
83f4db59e2 Merge remote-tracking branch 'origin/master' 2017-04-08 21:47:50 +02:00
Olexandr Nesterenko
9f66f759ad Translated using Weblate (Ukrainian)
Currently translated at 84.9% (135 of 159 strings)
2017-04-08 21:47:47 +02:00
Christian Schabesberger
6f015349e8 moved on to v0.9.1 2017-04-08 17:17:58 +02:00
Christian Schabesberger
a37802c2b9 add prefered video format 2017-04-08 17:17:11 +02:00
Florian
4fa3baf5e1 Translated using Weblate (French)
Currently translated at 99.3% (158 of 159 strings)
2017-04-07 12:45:03 +02:00
Oscar Hemelaar
ef8c2c81d5 Translated using Weblate (Italian)
Currently translated at 98.7% (157 of 159 strings)
2017-04-07 03:45:31 +02:00
Mladen Pejaković
8c80d8c457 Translated using Weblate (Serbian)
Currently translated at 99.3% (158 of 159 strings)
2017-04-07 00:46:25 +02:00
Matej U
1596872c54 Translated using Weblate (Slovenian)
Currently translated at 100.0% (159 of 159 strings)
2017-04-05 14:47:22 +02:00
Oscar Hemelaar
da8873fa78 Translated using Weblate (French)
Currently translated at 99.3% (158 of 159 strings)
2017-04-05 12:14:32 +02:00
Oscar Hemelaar
ecd8439b3f Translated using Weblate (French)
Currently translated at 98.1% (156 of 159 strings)

if it's for a video restart button, it's "Relancer"
2017-04-05 02:53:08 +02:00
Oscar Hemelaar
5d178532ac Translated using Weblate (French)
Currently translated at 97.4% (155 of 159 strings)
2017-04-05 02:52:24 +02:00
Oscar Hemelaar
08e40a013d Translated using Weblate (French)
Currently translated at 96.8% (154 of 159 strings)

or "OK" ?
2017-04-05 02:50:49 +02:00
Oscar Hemelaar
c136f7363c Translated using Weblate (French)
Currently translated at 96.2% (153 of 159 strings)
2017-04-05 02:50:26 +02:00
Florian
a60f10d739 Translated using Weblate (French)
Currently translated at 90.5% (144 of 159 strings)
2017-04-04 21:45:44 +02:00
naofum
ae46afcb42 Translated using Weblate (Japanese)
Currently translated at 100.0% (159 of 159 strings)
2017-04-04 16:15:27 +02:00
mueller-ma
bffb9f6800 Translated using Weblate (German)
Currently translated at 95.5% (152 of 159 strings)
2017-04-03 09:29:35 +02:00
Tobias Groza
79aa9ad04b Translated using Weblate (German)
Currently translated at 94.9% (151 of 159 strings)
2017-04-03 09:26:41 +02:00
anonymous
ff5714f04a Translated using Weblate (French)
Currently translated at 89.9% (143 of 159 strings)
2017-04-02 18:59:25 +02:00
zmni
ce499a9766 Translated using Weblate (Indonesian)
Currently translated at 100.0% (159 of 159 strings)
2017-04-02 16:49:33 +02:00
Weblate
d3bb8b7651 Merge remote-tracking branch 'origin/master' 2017-04-02 16:48:37 +02:00
Freddy Morán Jr
6d9c23c4cb Translated using Weblate (Spanish)
Currently translated at 100.0% (158 of 158 strings)
2017-04-02 16:48:36 +02:00
Nathan Follens
b95a9332a9 Translated using Weblate (Dutch)
Currently translated at 100.0% (158 of 158 strings)
2017-04-02 16:48:35 +02:00
zmni
609715eb5c Translated using Weblate (Indonesian)
Currently translated at 100.0% (158 of 158 strings)
2017-04-02 16:48:33 +02:00
Christian Schabesberger
a1266c919c Merge branch 'fix-next-video' of git://github.com/mauriciocolli/NewPipe into strfx 2017-04-02 15:56:41 +02:00
Christian Schabesberger
a1925a0302 Merge branch 'master' of github.com:theScrabi/NewPipe 2017-04-02 15:48:53 +02:00
Christian Schabesberger
a7a4c03372 update features list, and moved on to v0.9.0 2017-04-02 15:47:21 +02:00
Christian Schabesberger
37201600e0 Merge pull request #494 from mueller-ma/patch-1
Fix list in readme
2017-04-02 15:44:14 +02:00
mueller-ma
a94f40ed62 Fix list in readme 2017-04-02 14:33:52 +02:00
naofum
0b08cf8c76 Translated using Weblate (Japanese)
Currently translated at 100.0% (158 of 158 strings)
2017-04-01 13:36:04 +02:00
Mauricio Colli
33e29be7db Fix next video and refactor
- Refactor VideoItemDetailActivity, StreamExtractorWorker
- Remove redundant styles
- Change dimensions
- Nicer animation/transitions
2017-03-31 20:39:54 -03:00
Freddy Morán Jr
bd1c7851c7 Translated using Weblate (Portuguese)
Currently translated at 100.0% (158 of 158 strings)
2017-04-01 01:02:49 +02:00
Freddy Morán Jr
82faea5965 Translated using Weblate (Spanish)
Currently translated at 100.0% (158 of 158 strings)
2017-04-01 00:51:34 +02:00
Weblate
0bbbfd3217 Merge remote-tracking branch 'origin/master' 2017-04-01 00:44:52 +02:00
Freddy Morán Jr
fb578ecda8 Translated using Weblate (Spanish)
Currently translated at 100.0% (156 of 156 strings)
2017-04-01 00:44:41 +02:00
Christian Schabesberger
e804647a65 make exoplayer default player 2017-03-29 09:17:03 +02:00
Christian Schabesberger
c3c3a94593 Merge branch 'feature-popup-fullscreen' of git://github.com/mauriciocolli/NewPipe into toogle 2017-03-29 08:48:00 +02:00
Mauricio Colli
9d55569f80 Fix keep screen on 2017-03-28 09:12:03 -03:00
Christian Schabesberger
5dd8271c15 Merge pull request #489 from mauriciocolli/master
Fix travis and some clean-up
2017-03-27 23:53:04 +02:00
Mauricio Colli
7a4a54c3ea Fix travis
- Remove duplicate of AndroidManifest
- Remove some non-translatable strings from "ar" translation, and general clean-up of other
2017-03-27 16:34:37 -03:00
Mauricio Colli
7c9078a625 Fix non-commited file 2017-03-27 11:26:36 -03:00
Mauricio Colli
71ae342f52 Implement screen orientation toggle 2017-03-27 10:12:22 -03:00
Mauricio Colli
b43c56085d Implement fullscreen and quality selector
- Implement cache
- Abstract player
- Quality selector
- Fullscreen switcher
- Change some drawables
2017-03-27 01:08:16 -03:00
Christian Schabesberger
83d2ab95e0 Merge branch 'master' of github.com:TeamNewPipe/NewPipe 2017-03-26 17:29:25 +02:00
Christian Schabesberger
20a8d7372c fix broken overlay on .svg icon 2017-03-26 17:29:16 +02:00
Weblate
c36ba88db7 Merge remote-tracking branch 'origin/master' 2017-03-25 14:05:16 +01:00
Nathan Follens
4aa23023ee Translated using Weblate (Dutch)
Currently translated at 100.0% (156 of 156 strings)
2017-03-25 14:05:13 +01:00
Christian Schabesberger
8735cf931a update to new backend with playlist support 2017-03-22 20:14:56 +01:00
Weblate
2473069326 Merge remote-tracking branch 'origin/master' 2017-03-21 09:44:34 +01:00
vesp
03bab57a97 Translated using Weblate (Czech)
Currently translated at 99.3% (155 of 156 strings)
2017-03-21 09:44:32 +01:00
Christian Schabesberger
e3baf69533 fix channel rotation problem 2017-03-17 20:35:22 +01:00
Christian Schabesberger
461f747af1 add IOException 2017-03-17 20:18:44 +01:00
Christian Schabesberger
028872a7d8 Merge pull request #483 from mauriciocolli/patch-2
Fix bug when fetching unavailable content
2017-03-17 17:10:03 +01:00
Christian Schabesberger
a1483b6c55 Merge pull request #481 from mauriciocolli/patch-1
Handle embed links
2017-03-17 17:09:13 +01:00
mauriciocolli
e406ba094c Improve bug detection
- Show a message with the appropriate error (network error)
2017-03-17 12:09:20 -03:00
mauriciocolli
c100d15ba8 Fix bug when fetching unavailable content
- Fix #482
- When opening a invalid/deleted/unavailable video, the popup was just printing the error, now it shows a message to the user and exits
2017-03-17 11:50:27 -03:00
mauriciocolli
b4ea592638 Handle embed links
- Fix #480
- Add /embed/ to intent filter, as the app already handles these type of links internally
2017-03-17 00:27:59 -03:00
Sérgio Marques
16b757d9a3 Translated using Weblate (Portuguese)
Currently translated at 100.0% (156 of 156 strings)
2017-03-17 00:46:17 +01:00
Sérgio Marques
2aa801a392 Translated using Weblate (Portuguese)
Currently translated at 100.0% (156 of 156 strings)
2017-03-14 23:24:24 +01:00
Matej U
b838344526 Translated using Weblate (Slovenian)
Currently translated at 100.0% (156 of 156 strings)
2017-03-13 10:30:41 +01:00
zmni
233a3df222 Translated using Weblate (Indonesian)
Currently translated at 100.0% (156 of 156 strings)
2017-03-11 13:27:00 +01:00
naofum
da6661b1ea Translated using Weblate (Japanese)
Currently translated at 100.0% (156 of 156 strings)
2017-03-11 12:37:49 +01:00
Mladen Pejaković
c6e120fc51 Translated using Weblate (Serbian)
Currently translated at 100.0% (156 of 156 strings)
2017-03-10 23:09:42 +01:00
Marian Hanzel
c416a1254d Translated using Weblate (Slovak)
Currently translated at 100.0% (156 of 156 strings)
2017-03-10 23:07:10 +01:00
Weblate
2aa4f6ddda Merge remote-tracking branch 'origin/master' 2017-03-10 21:45:11 +01:00
Enrico Monese
129597023d Translated using Weblate (Italian)
Currently translated at 100.0% (154 of 154 strings)
2017-03-10 21:45:10 +01:00
vesp
02aed86b7e Translated using Weblate (Czech)
Currently translated at 98.7% (152 of 154 strings)
2017-03-10 21:45:10 +01:00
Tobias Groza
e44f4b5823 Translated using Weblate (German)
Currently translated at 98.7% (152 of 154 strings)
2017-03-10 21:45:08 +01:00
Christian Schabesberger
2f0c0f0fc2 Merge branch 'master' of github.com:TeamNewPipe/NewPipe 2017-03-09 16:21:36 +01:00
Christian Schabesberger
e5ce3f3007 moved on to version 0.8.12 2017-03-09 16:21:20 +01:00
Christian Schabesberger
095a2be748 change popuplayer class description 2017-03-09 16:14:49 +01:00
Christian Schabesberger
c75fe88757 Merge branch 'feature-popup' of git://github.com/mauriciocolli/NewPipe 2017-03-09 16:08:33 +01:00
Christian Schabesberger
a8ff4b0744 Fix backbutton behaviour
- close on MainActivity when back pressed
- clear NavStack on rotation
2017-03-09 16:01:09 +01:00
Christian Schabesberger
c02c511e31 Update .travis.yml
update build-tools version for travis
2017-03-09 15:41:10 +01:00
Mauricio Colli
b9550fb528 Merge remote-tracking branch 'upstream/master' into feature-popup 2017-03-09 04:49:15 -03:00
Mauricio Colli
a37d8f083a Implement popup mode
- Add icons replay, fast_forward
- Add strings
- Add menu entry
- Add as option to open link directly to popup mode
2017-03-09 04:42:40 -03:00
Mauricio Colli
abff1f537b Add ExoMedia and remove ExoPlayer
- Remove ExoPlayer files
- Added ExoMedia library
2017-03-09 01:44:00 -03:00
Enrico Monese
483fde5e42 Translated using Weblate (Italian)
Currently translated at 100.0% (154 of 154 strings)
2017-03-08 23:52:45 +01:00
Weblate
761b7ea57b Merge remote-tracking branch 'origin/master' 2017-03-07 18:45:34 +01:00
zmni
af92631a0c Translated using Weblate (Indonesian)
Currently translated at 100.0% (154 of 154 strings)
2017-03-07 18:45:29 +01:00
Christian Schabesberger
ffe832d061 update gradle verson 2017-03-07 14:14:02 +01:00
Christian Schabesberger
a08cbfcef1 Merge branch 'master' of github.com:TeamNewPipe/NewPipe 2017-03-06 15:36:13 +01:00
Christian Schabesberger
d2d6ac1bf8 add CCC slides 2017-03-06 15:36:04 +01:00
Weblate
615ffca64b Merge remote-tracking branch 'origin/master' 2017-03-05 16:35:55 +01:00
Tobias Groza
2fcf6197c5 Translated using Weblate (German)
Currently translated at 97.4% (150 of 154 strings)
2017-03-05 16:35:54 +01:00
zmni
22d31ae14f Translated using Weblate (Indonesian)
Currently translated at 100.0% (154 of 154 strings)
2017-03-05 16:35:52 +01:00
Christian Schabesberger
8c786e121b get down to support lib 25.1.0 2017-03-04 13:30:21 +01:00
Christian Schabesberger
99d2a33c8c reset support lib to 25.1.1
25.2.0 is not yet supported by fdroid
2017-03-04 13:23:54 +01:00
Marian Hanzel
010a24db3f Translated using Weblate (Slovak)
Currently translated at 100.0% (154 of 154 strings)
2017-03-04 10:57:28 +01:00
Weblate
9408da453b Merge remote-tracking branch 'origin/master' 2017-03-02 15:26:33 +01:00
Jose Maeso
dbda4202fd Translated using Weblate (Spanish)
Currently translated at 98.7% (152 of 154 strings)
2017-03-02 15:26:32 +01:00
Mladen Pejaković
5776e91459 Translated using Weblate (Serbian)
Currently translated at 100.0% (154 of 154 strings)
2017-03-02 15:26:32 +01:00
Matej U
664d7b69b1 Translated using Weblate (Slovenian)
Currently translated at 100.0% (154 of 154 strings)
2017-03-02 15:26:30 +01:00
Christian Schabesberger
6b9140c60d make extractor sub use https 2017-03-01 19:25:19 +01:00
Christian Schabesberger
383857d110 add extractor submodule 2017-03-01 19:08:12 +01:00
Christian Schabesberger
cffd049c8a remove extractor 2017-03-01 19:06:27 +01:00
Christian Schabesberger
ecabc65e94 Merge branch 'master' of github.com:TeamNewPipe/NewPipe 2017-03-01 18:03:50 +01:00
Christian Schabesberger
780f1d5da3 made extractor systemindipendent again 2017-03-01 18:03:36 +01:00
naofum
e2d0fc34a3 Translated using Weblate (Japanese)
Currently translated at 100.0% (154 of 154 strings)
2017-03-01 17:41:48 +01:00
Christian Schabesberger
3404231457 get rid of xul xml parser 2017-03-01 16:40:04 +01:00
Mladen Pejaković
b17928570d Translated using Weblate (Serbian)
Currently translated at 100.0% (154 of 154 strings)
2017-03-01 14:15:48 +01:00
Weblate
8ed86261ef Merge remote-tracking branch 'origin/master' 2017-03-01 12:45:58 +01:00
RACER
a313b91a0a Translated using Weblate (Japanese)
Currently translated at 100.0% (149 of 149 strings)
2017-03-01 12:45:45 +01:00
Christian Schabesberger
7b6dae20be add loading footer to search fragment 2017-02-28 13:24:07 +01:00
Christian Schabesberger
552c70bb0d add adblocker for youtube red stuff 2017-02-28 13:05:20 +01:00
Christian Schabesberger
8f734737f0 fix bug and add footer cycle to channel 2017-02-28 12:13:29 +01:00
Christian Schabesberger
800e7bcb7a moved on to v0.8.11 2017-02-27 21:37:22 +01:00
Christian Schabesberger
2002234d86 fix channel load more videos error 2017-02-27 21:31:20 +01:00
Christian Schabesberger
5923663e08 add routed_intent activity 2017-02-27 21:14:03 +01:00
Christian Schabesberger
4cdf20ab8c fix differences 2017-02-27 19:21:41 +01:00
Christian Schabesberger
af65a1cfef Merge branch 'feature-theme-change' of git://github.com/mauriciocolli/NewPipe into conf 2017-02-27 19:04:38 +01:00
Christian Schabesberger
927057ab83 Merge pull request #465 from mauriciocolli/fix-travis
Fix travis and YoutubeStreamUrlIdHandler
2017-02-27 19:03:28 +01:00
Christian Schabesberger
ffbc001ad5 fix navstack channel problem 2017-02-27 19:00:06 +01:00
Christian Schabesberger
f5625a1151 fix dashmpd bug 2017-02-27 17:57:16 +01:00
Christian Schabesberger
ce2ceb8a1b fix layout 2017-02-27 16:38:01 +01:00
Christian Schabesberger
c14771534f redesign channel activity 2017-02-27 15:58:09 +01:00
59436419
553cec16d5 Removed old icons 2017-02-27 17:30:47 +05:30
59436419
d17496f720 Improved code for changing theme 2017-02-27 17:25:15 +05:30
Christian Schabesberger
89e70626eb update support framework 2017-02-26 21:38:02 +01:00
Mauricio Colli
2ccae841d6 Change variable names
For a better understanding of what is going on
2017-02-26 07:47:13 -03:00
Mauricio Colli
07f6d0f149 Fix bug lower case id
This method was passing the lowercase url
2017-02-25 18:15:50 -03:00
Mauricio Colli
319d769233 Change video Id
The previous wasn't working
2017-02-25 18:14:32 -03:00
Mauricio Colli
6ec393699e Check if selected theme it's not the current 2017-02-25 16:04:10 -03:00
Mauricio Colli
f8d9e0fa60 Implement restart dialog 2017-02-25 15:36:31 -03:00
Mauricio Colli
50ed962a82 Add necessary strings 2017-02-25 15:34:45 -03:00
Christian Schabesberger
8654705e9b Change T to K 2017-02-22 12:12:39 +01:00
Weblate
b79ed8185f Merge remote-tracking branch 'origin/master' 2017-02-21 17:48:35 +01:00
Rom1
0d6c67f64f Translated using Weblate (French)
Currently translated at 96.6% (144 of 149 strings)
2017-02-21 17:48:34 +01:00
Marian Hanzel
e97a6569a6 Translated using Weblate (Slovak)
Currently translated at 100.0% (149 of 149 strings)
2017-02-21 17:48:32 +01:00
Christian Schabesberger
d0d41c6b16 move on to v0.8.10 2017-02-19 16:09:39 +01:00
Christian Schabesberger
f7a531e71b Merge branch 'fix_nav' 2017-02-19 16:09:02 +01:00
Christian Schabesberger
c28fddc4dd did some finetuning 2017-02-19 16:07:45 +01:00
zmni
b6ea10fc73 Translated using Weblate (Indonesian)
Currently translated at 100.0% (149 of 149 strings)
2017-02-19 15:45:16 +01:00
Gian Maria Viglianti
320eb44061 Translated using Weblate (Italian)
Currently translated at 100.0% (149 of 149 strings)
2017-02-19 00:54:12 +01:00
Christian Schabesberger
7a6b5dd5b7 add initial support for NavStack 2017-02-18 21:59:48 +01:00
naofum
460653ed16 Translated using Weblate (Japanese)
Currently translated at 100.0% (149 of 149 strings)
2017-02-17 16:18:49 +01:00
Mladen Pejaković
b6fda788c5 Translated using Weblate (Serbian)
Currently translated at 100.0% (149 of 149 strings)
2017-02-16 22:12:17 +01:00
Matej U
da4b9306fa Translated using Weblate (Slovenian)
Currently translated at 100.0% (149 of 149 strings)
2017-02-16 22:00:25 +01:00
Weblate
d76c02cbf4 Merge remote-tracking branch 'origin/master' 2017-02-16 21:44:49 +01:00
nonamebg
4d5466b5cd Translated using Weblate (English)
Currently translated at 100.0% (141 of 141 strings)
2017-02-16 21:44:40 +01:00
Christian Schabesberger
e9c20ac8b0 add search channels to available features 2017-02-16 13:57:48 +01:00
Christian Schabesberger
961820a250 Merge branch 'search_channel' 2017-02-16 13:33:46 +01:00
Christian Schabesberger
4cc2976061 add unit test for new channel search 2017-02-16 00:46:15 +01:00
Christian Schabesberger
477f182b43 convert android tests to junit tests 2017-02-16 00:17:43 +01:00
Christian Schabesberger
a5252bb765 add search filter menu 2017-02-15 15:21:36 +01:00
Christian Schabesberger
3f0078f38a git channel item running 2017-02-15 12:59:36 +01:00
Christian Schabesberger
91434dd2ac setup core for search channel support 2017-02-13 00:55:11 +01:00
Christian Schabesberger
f29bd0a6e7 fix actionbar icon theming 2017-02-12 16:45:01 +01:00
Christian Schabesberger
7186f58374 remove StreamInfoItemSearchCollector 2017-02-12 14:22:39 +01:00
Christian Schabesberger
5c8bcf15ba make colector hirarchicall
remove broken commit()
2017-02-12 13:39:39 +01:00
Christian Schabesberger
130757ee99 Update CONTRIBUTING.md 2017-02-12 00:16:41 +01:00
Christian Schabesberger
5020a4f9dc add mailinglist to contributing 2017-02-11 22:26:00 +01:00
Christian Schabesberger
ef15902ec4 add InfoItem 2017-02-11 21:33:01 +01:00
zmni
ed8d13f837 Translated using Weblate (Indonesian)
Currently translated at 100.0% (141 of 141 strings)
2017-02-11 19:20:01 +01:00
ksyko
c2fcae7c43 Merge pull request #1 from TeamNewPipe/master
0.8.9 update
2017-02-11 23:21:58 +05:30
aladar42
27f2c65e6d Translated using Weblate (Czech)
Currently translated at 100.0% (141 of 141 strings)
2017-02-10 18:44:38 +01:00
Weblate
0b3428ede9 Merge remote-tracking branch 'origin/master' 2017-02-08 17:13:21 +01:00
aladar42
3e0102ad2a Translated using Weblate (Czech)
Currently translated at 100.0% (141 of 141 strings)
2017-02-08 17:13:19 +01:00
Christian Schabesberger
c42002ccc5 removed download notice again 2017-02-06 00:04:20 +01:00
Christian Schabesberger
e8101d5d91 change download link 2017-02-05 23:56:26 +01:00
Christian Schabesberger
ecdf4ad502 add np download to readme 2017-02-05 21:09:36 +01:00
Matej U
af760f9cdc Translated using Weblate (Slovenian)
Currently translated at 100.0% (141 of 141 strings)
2017-02-05 20:16:33 +01:00
Weblate
b3491da49f Merge remote-tracking branch 'origin/master' 2017-02-05 12:46:26 +01:00
Snob Malkowitch
c322feeaff Translated using Weblate (Russian)
Currently translated at 94.3% (134 of 142 strings)
2017-02-05 12:46:18 +01:00
Christian Schabesberger
b26f46a063 Merge pull request #439 from marcobiscaro2112/master
Adding brazilian portuguese translation
2017-02-03 12:37:22 +01:00
Christian Schabesberger
9f0944dc5a Merge pull request #441 from k3b/master
fix NullPointerExcpeption when opening "Downloads" with android-api < 23
2017-02-03 12:35:52 +01:00
k3b
e869098434 fix NullPointerExcpeption when opening "Downloads" with android-api < 23 2017-02-02 01:58:47 +01:00
Weblate
4baa23af5f Merge remote-tracking branch 'origin/master' 2017-02-01 20:58:21 +01:00
aladar42
78fc5bbbd5 Translated using Weblate (Czech)
Currently translated at 97.1% (138 of 142 strings)
2017-02-01 20:58:20 +01:00
Wiredframe
a69784d168 Translated using Weblate (German)
Currently translated at 100.0% (142 of 142 strings)
2017-02-01 20:58:11 +01:00
Marco Biscaro
d48a7f1a18 Adding brazilian portuguese translation
(Also set settings_keys as untranslatable)
2017-02-01 12:32:06 -02:00
Christian Schabesberger
082c6128ad moved on to 0.8.9 2017-01-31 18:28:47 +01:00
Christian Schabesberger
7c9771873b Merge branch 'master' of git://github.com/ksyko/NewPipe into jf 2017-01-31 18:25:30 +01:00
Christian Schabesberger
7257cdacc8 fix background button problem 2017-01-31 18:23:22 +01:00
Christian Schabesberger
140b480f82 url signature fix
* fixed stacktrace
* changed player url
* took regex fix from youtube-dl

final fix taken from youtube-dl
2017-01-31 18:06:44 +01:00
Christian Schabesberger
77db2f8a48 update support Framework 2017-01-31 10:58:53 +01:00
naofum
22bc81b0eb Translated using Weblate (Japanese)
Currently translated at 100.0% (142 of 142 strings)
2017-01-27 15:50:44 +01:00
Mladen Pejaković
b52b3d4be0 Translated using Weblate (Serbian)
Currently translated at 100.0% (142 of 142 strings)
2017-01-26 18:49:26 +01:00
Nathan Follens
f845098b42 Translated using Weblate (Dutch)
Currently translated at 100.0% (142 of 142 strings)
2017-01-26 16:48:57 +01:00
Weblate
0f7397e3b8 Merge remote-tracking branch 'origin/master' 2017-01-26 15:46:09 +01:00
Shaye Faletha
0b9d99fdc9 Translated using Weblate (Polish)
Currently translated at 99.2% (140 of 141 strings)
2017-01-26 15:46:06 +01:00
59436419
9a1da5cc75 Made changes for ICS and JB 2017-01-26 12:07:41 +05:30
Christian Schabesberger
9e76f94cf6 update support lib and move on to 0.8.8 2017-01-22 14:47:05 +01:00
Christian Schabesberger
7d6b92e064 Merge branch 'feature-improve-search-fragment' of git://github.com/coffeemakr/NewPipe into cofe 2017-01-22 14:42:36 +01:00
Christian Schabesberger
849a45a3ca resolve conflict 2017-01-22 14:26:01 +01:00
Christian Schabesberger
7ddea5a71b Merge branch 'feature-accept-embed-links' of git://github.com/coffeemakr/NewPipe into url 2017-01-22 13:55:53 +01:00
Christian Schabesberger
5d81358c15 rename Themer to ThemableActivity 2017-01-22 13:48:50 +01:00
Christian Schabesberger
492aad9d70 Merge branch 'master' of git://github.com/ksyko/NewPipe into kyko 2017-01-22 13:32:39 +01:00
Weblate
647cfcd401 Merge remote-tracking branch 'origin/master' 2017-01-21 15:44:14 +01:00
Yann Hodiesne
c60d98e52d Translated using Weblate (French)
Currently translated at 97.1% (137 of 141 strings)
2017-01-21 15:44:14 +01:00
Osoitz
d3cfac6b15 Translated using Weblate (Basque)
Currently translated at 37.5% (53 of 141 strings)
2017-01-21 15:44:11 +01:00
Coffeemakr
7fb4e5a143 Rename download db sqlite file
Rename the sqlite database to "downloads.db" instead of "newpipe.db"
to make sure the file will create a conflicts later.
2017-01-20 18:57:30 +01:00
Coffeemakr
8e451b2a83 Use fragments setHasOptionsMenu
Remove complications by allowing android to handle fragment's
options menu.

See https://developer.android.com/guide/components/fragments.html#ActionBar
2017-01-19 19:39:33 +01:00
ksyko
8083f06fe7 Update SettingsFragment.java 2017-01-18 00:12:36 +05:30
59436419
44521a2e56 Added dark theme 2017-01-17 22:35:23 +05:30
59436419
dfeed3d0eb Added dark theme 2017-01-17 22:31:00 +05:30
59436419
081a45b70d Added dark theme 2017-01-17 22:13:33 +05:30
59436419
616a721bba Added dark theme 2017-01-17 21:43:30 +05:30
59436419
c9aa553b32 Added dark theme 2017-01-17 20:54:00 +05:30
59436419
e3d59c3cff Added dark theme 2017-01-17 20:47:12 +05:30
59436419
df51635674 Added dark theme 2017-01-17 20:33:54 +05:30
59436419
1e81f61760 Added dark theme 2017-01-17 20:31:14 +05:30
59436419
a4043eab83 Merge remote-tracking branch 'origin/master'
# Conflicts:
#	app/src/main/java/org/schabi/newpipe/Themer.java
#	app/src/main/java/org/schabi/newpipe/download/DownloadActivity.java
#	app/src/main/java/org/schabi/newpipe/settings/SettingsActivity.java
#	app/src/main/res/layout-v18/fragment_videoitem_detail.xml
#	app/src/main/res/layout/fragment_videoitem_detail.xml
#	app/src/main/res/xml/settings.xml
2017-01-17 16:18:00 +05:30
59436419
60dc19d2bc Added Dark Theme 2017-01-17 16:13:14 +05:30
ksyko
a2e4585fe8 Update InfoItemHolder.java 2017-01-17 16:13:02 +05:30
ksyko
b5df281447 Update fragment_videoitem_detail.xml 2017-01-17 16:13:02 +05:30
ksyko
650917f9f9 Update fragment_videoitem_detail.xml 2017-01-17 16:13:02 +05:30
ksyko
3a9c95a9ae Update fragment_videoitem_detail.xml 2017-01-17 16:13:01 +05:30
59436419
5458acfcad Added dark theme 2017-01-17 16:13:01 +05:30
59436419
68e80e6054 Added dark theme 2017-01-17 16:13:01 +05:30
Christian Schabesberger
e4aa69b8d3 add some super.function() thingies 2017-01-16 16:06:54 +01:00
Coffeemakr
dfd40e43da Fix for #407 2017-01-16 13:01:52 +01:00
Coffeemakr
7efd111d9c Improve Search fragment
* Keep search query when fragment is restored
 * Simplify SuggestionListAdapter
   * Use ResourceCursorAdapter for view creation
 * Fix deprecation warning
 * Some clean code
2017-01-16 07:33:58 +01:00
Matej U
6809172203 Translated using Weblate (Slovenian)
Currently translated at 99.2% (140 of 141 strings)
2017-01-15 12:46:28 +01:00
Coffeemaker
40a4343f06 Translated using Weblate (German)
Currently translated at 98.5% (139 of 141 strings)
2017-01-13 18:45:02 +01:00
Matej U
cd9333b39e Translated using Weblate (Slovenian)
Currently translated at 98.5% (139 of 141 strings)
2017-01-12 21:46:19 +01:00
Mladen Pejaković
82d426c781 Translated using Weblate (Serbian)
Currently translated at 100.0% (141 of 141 strings)
2017-01-12 21:46:11 +01:00
YFdyh000
c7e773de25 Translated using Weblate (Chinese (Simplified))
Currently translated at 98.5% (139 of 141 strings)
2017-01-12 18:44:21 +01:00
Coffeemakr
2ded33110f Improve YoutubeStreamUrlIdHandler
* Make it a singelton
 * Accept embed links
 * Accept share links (youtube.com/shared?ci=...)
 * Add tests
 * Accept host case insensititve
2017-01-11 17:25:53 +01:00
zmni
b26c0aa9da Translated using Weblate (Indonesian)
Currently translated at 100.0% (141 of 141 strings)
2017-01-11 16:51:32 +01:00
Mladen Pejaković
2fc8fb6f17 Translated using Weblate (Serbian)
Currently translated at 100.0% (141 of 141 strings)
2017-01-10 21:08:24 +01:00
Coffeemakr
ea76f1d6e2 Improve DownloadManager and -Service
* Fix permission at some places
 * Fix access problem for downloaded files with external player
 * Store finished Downloads
 * Remove binding to DownloadService just to download a file
 * Javadoc
 * Code improvements
2017-01-10 17:48:55 +01:00
naofum
7cda1d116b Translated using Weblate (Japanese)
Currently translated at 100.0% (141 of 141 strings)
2017-01-10 17:03:28 +01:00
Weblate
8bf7a1a9db Merge remote-tracking branch 'origin/master' 2017-01-10 17:02:24 +01:00
naofum
0aa0ad65c0 Translated using Weblate (Japanese)
Currently translated at 100.0% (140 of 140 strings)
2017-01-10 17:02:21 +01:00
Coffeemakr
53ff58daa3 DownloadManagerService: Don't bind if no permissions 2017-01-10 13:35:16 +01:00
Christian Schabesberger
b3225bebe6 fix recaptch weblate conflict 2017-01-09 22:46:07 +01:00
Allan Nordhøy
4beafad71f Translated using Weblate (Norwegian Bokmål)
Currently translated at 92.8% (130 of 140 strings)
2017-01-09 21:45:13 +01:00
Allan Nordhøy
c96f933626 Translated using Weblate (English)
Currently translated at 100.0% (140 of 140 strings)
2017-01-09 21:45:12 +01:00
LNJ
bea6359d5f Translated using Weblate (German)
Currently translated at 99.2% (139 of 140 strings)
2017-01-09 21:45:04 +01:00
Christian Schabesberger
92db9cb59b update support lib and move on to 0.8.7 2017-01-04 17:20:01 +01:00
Benoît Mauduit
410c4ca736 Remove old comment 2017-01-03 14:38:22 +01:00
Benoît Mauduit
80c9dbf180 Cosmetic 2017-01-03 14:38:22 +01:00
Benoît Mauduit
c9edac2820 Change the way to start reCaptchaActivity
* Use startActivityForResult() and onActivityResult() to refresh the
  search request when returning from reCaptcha activity.
2017-01-03 14:38:22 +01:00
Benoît Mauduit
143df9a529 Start reCaptcha activity when starting video directly 2017-01-03 14:38:22 +01:00
Benoît Mauduit
c87da9903f Set result code and finish() Activity instead of starting MainActivity
* Activities will start reCaptchaActivity with startActivityForResult and
look for RECAPTCHA_REQUEST and RESULT_OK | RESULT_CANCELED in : 'onActivityResult()'
2017-01-03 14:38:22 +01:00
Andi Saputro
0f69e6c64d Translated using Weblate (Indonesian)
Currently translated at 100.0% (140 of 140 strings)
2016-12-31 18:45:16 +01:00
ksyko
1b9a6e53ce Update InfoItemHolder.java 2016-12-31 22:32:16 +05:30
ksyko
c7abf377eb Update fragment_videoitem_detail.xml 2016-12-31 21:51:41 +05:30
ksyko
175d8ce572 Update fragment_videoitem_detail.xml 2016-12-31 21:43:01 +05:30
ksyko
1708a401cf Update fragment_videoitem_detail.xml 2016-12-31 21:42:04 +05:30
59436419
141278e668 Added dark theme 2016-12-31 13:46:52 +05:30
59436419
754bd82699 Added dark theme 2016-12-30 01:07:27 +05:30
andideveloper
999efb6660 Translated using Weblate (Indonesian)
Currently translated at 100.0% (140 of 140 strings)
2016-12-29 17:25:23 +01:00
Weblate
0b391a9ef3 Merge remote-tracking branch 'origin/master' 2016-12-28 12:46:32 +01:00
naofum
2a99ac4430 Translated using Weblate (Japanese)
Currently translated at 100.0% (140 of 140 strings)
2016-12-28 12:46:22 +01:00
Christian Schabesberger
a5589d0865 Merge branch 'feature-background-progress' of git://github.com/coffeemakr/NewPipe into coffeemakr-feature-background-progress 2016-12-28 10:46:38 +01:00
Coffeemakr
83541a0d5d Add 8dp margin on the right side of the progress bar 2016-12-28 08:15:12 +01:00
Coffeemakr
ac0dff7aa1 Make shure thread quits before service 2016-12-27 16:17:59 +01:00
Coffeemakr
f22b5157f5 Notify thread on play/pause 2016-12-27 15:58:17 +01:00
Coffeemakr
659d0d6115 Add PlaybackState broadcast messages
They can be used to retrieve the current playback
 * Duration
 * Played time
 * If the media player is playing
2016-12-27 15:52:02 +01:00
Marian Hanzel
fd8c99fd8d Translated using Weblate (Slovak)
Currently translated at 100.0% (140 of 140 strings)
2016-12-27 15:47:58 +01:00
Coffeemakr
9494f3a299 Add progress bar to expanded notification 2016-12-27 14:49:59 +01:00
Coffeemakr
8021848b03 Remove note field completly
Always use noteBuilder directly to generate a notification
2016-12-27 14:41:30 +01:00
Coffeemakr
5a127c26e6 Improve notification building/updateing
* Use custom notification builder which has methods to set the artist
  and title and also a method to set the playing state
* Update builder instead of view -> resovles deprecated warnings
2016-12-27 14:37:18 +01:00
Coffeemakr
a7d734c20c Ignore vim's temporary files 2016-12-27 13:32:03 +01:00
Coffeemakr
7c7129f9a1 Notifications: Set customs views in builder 2016-12-27 13:31:34 +01:00
Coffeemakr
05cbc7891d Typos corrected in StreamInfo 2016-12-27 13:26:48 +01:00
Coffeemakr
14623456ff Correct typos 2016-12-27 13:19:12 +01:00
Coffeemakr
5064ec3ac4 Fix spelling 2016-12-27 13:16:51 +01:00
Gian Maria Viglianti
892888796d Translated using Weblate (Italian)
Currently translated at 100.0% (140 of 140 strings)
2016-12-26 14:57:31 +01:00
Weblate
4f2826d2c2 Merge remote-tracking branch 'origin/master' 2016-12-26 10:23:57 +01:00
YFdyh000
7f824d725b Translated using Weblate (Chinese (Simplified))
Currently translated at 98.5% (138 of 140 strings)
2016-12-26 10:23:56 +01:00
naofum
da4096c4ef Translated using Weblate (Japanese)
Currently translated at 100.0% (140 of 140 strings)
2016-12-26 10:23:55 +01:00
Christian Schabesberger
1aed11c156 change ip address provider
removed null bomb
2016-12-25 19:32:38 +01:00
Christian Schabesberger
e99e944ac3 make share with newpipe part of newpipe 2016-12-25 19:28:40 +01:00
Christian Schabesberger
6e523d37ba add copyright notice to DownloadListener 2016-12-25 15:24:37 +01:00
Christian Schabesberger
2aebf6b522 Merge branch 'master' of git://github.com/fr3ts0n/NewPipe into fr3ts0n-master 2016-12-25 15:20:31 +01:00
Mladen Pejaković
3f740980a3 Translated using Weblate (Serbian)
Currently translated at 100.0% (140 of 140 strings)
2016-12-25 14:16:58 +01:00
Weblate
66b73d1592 Merge remote-tracking branch 'origin/master' 2016-12-25 12:44:13 +01:00
RACER
be4b03b84b Translated using Weblate (Japanese)
Currently translated at 100.0% (138 of 138 strings)
2016-12-25 12:44:13 +01:00
Osoitz
3594037efe Translated using Weblate (Basque)
Currently translated at 34.0% (47 of 138 strings)
2016-12-25 12:44:11 +01:00
Christian Schabesberger
38c5cb50fb fixed Downloader.getInstance() in unit tests 2016-12-24 17:11:29 +01:00
Christian Schabesberger
3767a96e0f moved on to version 0.8.6 2016-12-24 16:06:24 +01:00
Christian Schabesberger
937a387f4e rename reCaptchaException to ReCaptchaException 2016-12-24 15:19:40 +01:00
Christian Schabesberger
cd65f1dffc Merge branch 'reCaptcha' of git://github.com/be-neth/NewPipe into be-neth-reCaptcha 2016-12-24 14:13:12 +01:00
Christian Schabesberger
d4e6856cbe Merge pull request #394 from ngoisaosang/master
Try to fix accept SDK Licenses
2016-12-24 14:12:36 +01:00
ngoisaosang
f61d779108 Try to fix travis 2016-12-24 07:25:27 +07:00
ngoisaosang
b8b22d4d91 Fix travis 2016-12-23 13:47:20 +07:00
ngoisaosang
25d0e39736 Update gradle 2016-12-22 22:45:42 +07:00
ngoisaosang
79a9497e65 Fix travis build 2016-12-22 17:40:01 +07:00
Christian Schabesberger
c55dcccb1e Merge branch 'fix-channel-bannel-url' of git://github.com/coffeemakr/NewPipe into coffeemakr-fix-channel-bannel-url 2016-12-21 21:01:47 +01:00
Christian Schabesberger
820e606719 fix duration_background name 2016-12-21 21:00:05 +01:00
Christian Schabesberger
96291a8522 Merge branch 'coffeemakr-fix-yt-dublicated-result-page' 2016-12-21 20:56:40 +01:00
Christian Schabesberger
e7b52bd3b0 Merge pull request #392 from ksyko/patch-1
Fixes spelling
2016-12-21 20:42:03 +01:00
ksyko
dd3251c08d Fixes spelling 2016-12-21 20:38:51 +05:30
Coffeemakr
f4aabdd9b8 Accept SDK Licenses 2016-12-19 19:40:28 +01:00
Coffeemakr
cb1fe5f017 Try to fix travis 2016-12-19 19:36:24 +01:00
Coffeemakr
83837bde11 Google begins with page 1 so we add 1 to our page starting with 0 2016-12-19 19:28:16 +01:00
Coffeemakr
05189dadbf Fix banner extaction 2016-12-19 13:32:03 +01:00
Selim
dbb1f371b3 Translated using Weblate (Turkish)
Currently translated at 94.2% (130 of 138 strings)
2016-12-13 21:46:13 +01:00
Benoît Mauduit
5cc1bbc4bb Add missing Override decorator 2016-12-07 22:26:54 +01:00
Benoît Mauduit
53796043c3 Start reCaptchaActivity when reCaptcha is requested and fix Typo
* Fix typo setSearchWorkerResultListner to setSearchWorkerResultListener
2016-12-07 22:26:54 +01:00
Benoît Mauduit
a5ac528c02 Add reCaptchaException 2016-12-07 22:26:54 +01:00
Benoît Mauduit
54eb353d0d Add ReCaptcha Activity
* ReCaptchas are implemented using a simple WebView with Javascript enable.

 * All HTTP responses inside the WebView are catched (using onPageFinished())
 ** When Google reCatcha cookies are detected, register cookies to the
    Downloader class and Return to MainActivity
2016-12-07 22:26:54 +01:00
Benoît Mauduit
3391067cab Adding cookies member to Downloader 2016-12-07 22:26:54 +01:00
Benoît Mauduit
b4f595eb75 Make Downloader class a Singleton 2016-12-07 22:26:54 +01:00
Weblate
58bc0c17d0 Merge remote-tracking branch 'origin/master' 2016-12-02 10:24:55 +01:00
Cyxae Dexyc
4385404ad6 Translated using Weblate (French)
Currently translated at 98.5% (136 of 138 strings)
2016-12-02 10:24:54 +01:00
Marian Hanzel
61aadcffd2 Translated using Weblate (Slovak)
Currently translated at 100.0% (138 of 138 strings)
2016-12-02 10:24:52 +01:00
Christian Schabesberger
f575826394 fix unit tests 2016-11-20 19:01:06 +01:00
Christian Schabesberger
389959dd18 Merge pull request #366 from coffeemakr/delete-swiss-high-german
Delete Swiss High German translation
2016-11-20 15:43:37 +01:00
Christian Schabesberger
af4734eee3 update to sdk version 25 2016-11-18 23:56:08 +01:00
Christian Schabesberger
f76b37ec39 Merge branch 'master' of github.com:TeamNewPipe/NewPipe 2016-11-18 23:52:34 +01:00
Christian Schabesberger
379149fe2f update unit tests so it works with current updates 2016-11-18 23:52:17 +01:00
Christian Schabesberger
3bd477631c fixed spelling error 2016-11-18 22:08:53 +01:00
Freddy Morán Jr
72c0987bad Translated using Weblate (Spanish)
Currently translated at 100.0% (138 of 138 strings)
2016-11-10 03:46:02 +01:00
fr3ts0n
5bba8e02a6 add media scanner notification after successful download 2016-11-06 21:08:57 +01:00
Freddy Morán Jr
b270de3335 Translated using Weblate (Spanish)
Currently translated at 100.0% (138 of 138 strings)
2016-11-03 21:46:25 +01:00
Freddy Morán Jr
e22bcf0ac5 Translated using Weblate (Serbian)
Currently translated at 100.0% (138 of 138 strings)
2016-11-03 21:46:13 +01:00
Freddy Morán Jr
c1d55d828f Translated using Weblate (Portuguese)
Currently translated at 100.0% (138 of 138 strings)
2016-11-03 21:45:51 +01:00
Freddy Morán Jr
da77970328 Translated using Weblate (Indonesian)
Currently translated at 100.0% (138 of 138 strings)
2016-11-03 21:45:12 +01:00
Freddy Morán Jr
32f3caaee0 Translated using Weblate (German)
Currently translated at 100.0% (138 of 138 strings)
2016-11-03 21:44:57 +01:00
Дима Гайнуллин
8bbacb1d78 Translated using Weblate (Russian)
Currently translated at 88.4% (122 of 138 strings)
2016-11-03 18:45:52 +01:00
Nathan Follens
5904510410 Translated using Weblate (Dutch)
Currently translated at 100.0% (138 of 138 strings)
2016-10-30 00:44:27 +02:00
Enol P
e16624251b Translated using Weblate (Asturian)
Currently translated at 97.1% (134 of 138 strings)
2016-10-21 03:44:09 +02:00
zmni
389f22a0e5 Translated using Weblate (Indonesian)
Currently translated at 99.2% (137 of 138 strings)
2016-10-16 12:45:00 +02:00
zmni
7b91aa16b6 Translated using Weblate (Indonesian)
Currently translated at 95.6% (132 of 138 strings)
2016-10-13 21:45:17 +02:00
Jona Abdinghoff
89ec688632 Translated using Weblate (German)
Currently translated at 99.2% (137 of 138 strings)
2016-10-12 00:44:52 +02:00
Nathan Follens
fdd0d586c9 Translated using Weblate (Dutch)
Currently translated at 99.2% (137 of 138 strings)
2016-10-12 00:44:25 +02:00
Coffeemakr
6f5604791f Delete swiss high german 2016-10-11 07:30:18 +02:00
Gian Maria Viglianti
eb9fba4147 Translated using Weblate (Italian)
Currently translated at 100.0% (138 of 138 strings)
2016-10-10 18:45:06 +02:00
Weblate
afb62f729f Merge remote-tracking branch 'origin/master' 2016-10-04 15:45:09 +02:00
Nathan Follens
1ccc23dc9c Translated using Weblate (Dutch)
Currently translated at 68.8% (95 of 138 strings)
2016-10-04 15:45:07 +02:00
intrnl
7ea5cb9c5c Translated using Weblate (Indonesian)
Currently translated at 37.6% (52 of 138 strings)
2016-10-04 15:44:59 +02:00
Christian Schabesberger
c301d6e5d5 Merge branch 'master' of github.com:TeamNewPipe/NewPipe 2016-10-01 23:22:18 +02:00
naofum
44ad69b94d Translated using Weblate (Japanese)
Currently translated at 100.0% (138 of 138 strings)
2016-10-01 18:45:10 +02:00
Christian Schabesberger
d14515ab88 Merge remote-tracking branch 'origin/master' 2016-09-28 17:13:23 +02:00
Christian Schabesberger
01875b389d clean up extractor 2016-09-28 17:13:15 +02:00
Christian Schabesberger
5eef116aaa put Suggestion extraction into its own class 2016-09-28 12:53:23 +02:00
Weblate
442220debc Merge remote-tracking branch 'origin/master' 2016-09-28 12:45:55 +02:00
kamadi
4914caad51 Translated using Weblate (Russian)
Currently translated at 48.5% (67 of 138 strings)
2016-09-28 12:45:54 +02:00
Gian Maria Viglianti
08cab863f1 Translated using Weblate (Italian)
Currently translated at 98.5% (136 of 138 strings)
2016-09-28 12:45:54 +02:00
Marian Hanzel
02458d4fc1 Translated using Weblate (Slovak)
Currently translated at 98.5% (136 of 138 strings)
2016-09-28 12:45:51 +02:00
Christian Schabesberger
6ed4130b66 fix collisions 2016-09-28 11:54:35 +02:00
Felix Ableitner
5f7ee15d1e Launch video player in single task mode (fixes #154) 2016-09-28 13:09:42 +09:00
Christian Schabesberger
43afd5a2b8 clean up downloader thing 2016-09-27 22:59:04 +02:00
Christian Schabesberger
f9ac199c1f fixed .webm download locatiion issue 2016-09-27 21:33:26 +02:00
Christian Schabesberger
920c169d55 update CI batch in README 2016-09-27 20:22:01 +02:00
Christian Schabesberger
76ba2824a2 stability improvements 2016-09-27 20:18:41 +02:00
Christian Schabesberger
ca0d594547 cleaning away android stuff from extractor 2016-09-27 20:06:33 +02:00
Christian Schabesberger
44b6d900f0 Merge branch 'master' of github.com:TeamNewPipe/NewPipe 2016-09-27 14:58:54 +02:00
Christian Schabesberger
3b2c0186aa update issue teamplate 2016-09-27 14:58:46 +02:00
Christian Schabesberger
efa605700d update contributions link in the readme 2016-09-27 14:33:30 +02:00
Christian Schabesberger
cac360d37b add .github folder 2016-09-27 14:30:03 +02:00
Christian Schabesberger
75e28893fb update contribution guidelines once again 2016-09-27 14:14:59 +02:00
Christian Schabesberger
360a44b5a0 update contribution guidelines 2016-09-27 13:43:43 +02:00
Christian Schabesberger
2b89e24a4b make download dialog use radio button 2016-09-26 20:18:32 +02:00
Christian Schabesberger
931f34d2fd fixed related videos nullpointer exception 2016-09-26 18:01:39 +02:00
Christian Schabesberger
abfdcea4db moved on to 0.8.5 2016-09-26 17:32:03 +02:00
Christian Schabesberger
80b3b8ac0f change readme layout 2016-09-26 17:04:54 +02:00
Christian Schabesberger
60e18aa045 similar videos scroll bug workaround 2016-09-26 17:02:55 +02:00
Christian Schabesberger
85e2b124ab Merge branch 'master' of github.com:theScrabi/NewPipe 2016-09-25 21:22:37 +02:00
Christian Schabesberger
81a8cd0641 update to gradle2.2.0 2016-09-25 21:22:29 +02:00
Weblate
303805755d Merge remote-tracking branch 'origin/master' 2016-09-25 19:23:20 +02:00
Gian Maria Viglianti
38837d6424 Translated using Weblate (Italian)
Currently translated at 97.1% (134 of 138 strings)
2016-09-25 19:23:19 +02:00
Christian Schabesberger
8a582c2a24 fix weblate merge conflict 2016-09-25 19:23:10 +02:00
Tiago Roque Medeiros
5cfb65002d Translated using Weblate (Portuguese)
Currently translated at 99.2% (137 of 138 strings)
2016-09-22 18:45:35 +02:00
Benedikt Freisen
fa6dee45ec Translated using Weblate (German)
Currently translated at 98.5% (136 of 138 strings)
2016-09-20 16:56:29 +02:00
Sérgio Marques
af25fe93da Translated using Weblate (Portuguese)
Currently translated at 99.2% (137 of 138 strings)
2016-09-20 16:56:28 +02:00
naofum
395ad3e8ef Translated using Weblate (Japanese)
Currently translated at 99.2% (137 of 138 strings)
2016-09-18 09:45:36 +02:00
marxsouza12
2cbaca8968 Translated using Weblate (Portuguese)
Currently translated at 97.1% (134 of 138 strings)
2016-09-18 09:45:34 +02:00
Christian Schabesberger
bf90788e04 update featurs at readme
update featurs at readme once again
2016-09-15 10:35:22 +02:00
Christian Schabesberger
83ffb849cd update featurs at readme 2016-09-15 10:31:48 +02:00
Christian Schabesberger
a34a33e419 Merge branch 'master' of github.com:theScrabi/NewPipe 2016-09-14 18:35:22 +02:00
Christian Schabesberger
57f620485f fix ui crash bug 2016-09-14 18:35:17 +02:00
Weblate
18cdde963b Merge remote-tracking branch 'origin/master' 2016-09-14 15:45:35 +02:00
Mladen Pejaković
6c1f472de3 Translated using Weblate (Serbian)
Currently translated at 99.2% (137 of 138 strings)
2016-09-14 15:45:35 +02:00
Christian Schabesberger
efd2ac353e fix WORLD_MODE_READABLE bug
blub
2016-09-14 11:29:40 +02:00
Christian Schabesberger
863bf9dc8b fix channel has no second page bug 2016-09-14 11:15:08 +02:00
Weblate
fd411c17cd Merge remote-tracking branch 'origin/master' 2016-09-14 00:50:31 +02:00
YFdyh000
5424c23d69 Translated using Weblate (Simplified Chinese)
Currently translated at 97.8% (135 of 138 strings)
2016-09-14 00:50:31 +02:00
Christian Schabesberger
b8a0801786 fixed bug regarding channels
acual fix
2016-09-14 00:50:18 +02:00
Christian Schabesberger
39ff1cd898 Merge pull request #357 from theScrabi/ref_crashreport
Refactore crashreport
2016-09-14 00:05:37 +02:00
Christian Schabesberger
a2a3b0575d gather all bug shit things 2016-09-13 23:39:32 +02:00
Christian Schabesberger
2b8954353d removed crash test line 2016-09-13 23:31:28 +02:00
Christian Schabesberger
9bd5aa0da4 add package field to crash report 2016-09-13 23:31:06 +02:00
Christian Schabesberger
af2cddee91 made acra catch and report errors 2016-09-13 23:24:49 +02:00
Christian Schabesberger
27bc414616 add copyright notice 2016-09-13 22:38:45 +02:00
Christian Schabesberger
14eaedd73a use intent system to pass errors to error activity 2016-09-13 22:36:47 +02:00
Christian Schabesberger
a2effef346 fix build tooles for CI 2016-09-13 00:21:02 +02:00
Christian Schabesberger
caf938f79f add channel extractor tests 2016-09-12 23:44:57 +02:00
Christian Schabesberger
8ececc11d2 Merge branch 'master' of github.com:theScrabi/NewPipe 2016-09-12 23:07:31 +02:00
Christian Schabesberger
cf1d546683 add new play icon 2016-09-12 23:07:23 +02:00
Weblate
e8144f4906 Merge remote-tracking branch 'origin/master' 2016-09-12 22:35:28 +02:00
naofum
bfb6f14769 Translated using Weblate (Japanese)
Currently translated at 99.2% (136 of 137 strings)
2016-09-12 22:35:27 +02:00
Christian Schabesberger
ff1ba2b5bf Merge branch 'master' of github.com:theScrabi/NewPipe 2016-09-12 22:35:15 +02:00
Christian Schabesberger
8c26f29f94 shitty fix for detail progressbar 2016-09-12 17:49:49 +02:00
Weblate
bdd57f3b3e Merge remote-tracking branch 'origin/master' 2016-09-12 16:22:16 +02:00
YFdyh000
e09bf4d09c Translated using Weblate (Simplified Chinese)
Currently translated at 98.5% (135 of 137 strings)
2016-09-12 16:22:16 +02:00
Christian Schabesberger
e0dbf4c2cd fix settings updateSummary 2016-09-12 16:22:02 +02:00
Christian Schabesberger
4bba84af8a Merge pull request #316 from jaytj95/master
Added rewind capability to notification control
2016-09-12 00:57:53 +02:00
Christian Schabesberger
bd7077c1cf fix rising exception for empty related videos 2016-09-12 00:56:20 +02:00
Christian Schabesberger
a63128bd45 add addblock 2016-09-12 00:51:03 +02:00
Christian Schabesberger
6944f4a68a add copyright headers and update sdk 2016-09-12 00:33:11 +02:00
Christian Schabesberger
54ab0ab17e fix merge with add_cahnnels 2016-09-12 00:12:00 +02:00
Christian Schabesberger
2080bb2da1 Merge pull request #350 from KeizerDev/splash-screen
Added Splash Screen to bypass blank screen on start up.
2016-09-11 23:57:30 +02:00
Christian Schabesberger
cc74c98509 add bugrepport to channel acitivty 2016-09-11 23:15:22 +02:00
Christian Schabesberger
dd6c6ae03f seems to made it working 2016-09-10 18:47:35 +02:00
Christian Schabesberger
4f8ca9ef16 fucking brought it almost to work fuck 2016-09-10 18:28:48 +02:00
Christian Schabesberger
53059bcb91 level 1 of making loading more content work 2016-09-10 16:26:21 +02:00
Filip Sebastian
cb056f4f80 Translated using Weblate (Romanian)
Currently translated at 100.0% (133 of 133 strings)
2016-08-24 12:45:40 +02:00
Robert-Jan Keizer
05bfa8b85e Added splash screen to bypass blank screen on start up. 2016-08-22 01:13:09 +02:00
Christian Schabesberger
6dc5350c43 update gradle and fix load image error string 2016-08-20 00:56:10 +02:00
Enol P
5cdf807d92 Translated using Weblate (Asturian)
Currently translated at 100.0% (133 of 133 strings)
2016-08-18 06:44:10 +02:00
Enol P
9c2a9e64c2 Translated using Weblate (Asturian)
Currently translated at 100.0% (133 of 133 strings)
2016-08-16 03:43:01 +02:00
Enol P
3b60b801c2 Added translation using Weblate (Asturian) 2016-08-16 02:38:40 +02:00
Danial Behzadi
c78eb80686 Translated using Weblate (Persian)
Currently translated at 100.0% (133 of 133 strings)
2016-08-12 15:45:23 +02:00
Danial Behzadi
9b9da648c9 Translated using Weblate (Persian)
Currently translated at 100.0% (133 of 133 strings)
2016-08-10 15:33:17 +02:00
Danial Behzadi
adc2b9c43a Added translation using Weblate (Persian) 2016-08-10 14:21:05 +02:00
Weblate
b3954e9acd Merge remote-tracking branch 'origin/master' 2016-08-08 22:05:14 +02:00
Christian Schabesberger
6e36f0ef83 Merge branch 'master' of github.com:theScrabi/NewPipe 2016-08-08 22:11:40 +02:00
Christian Schabesberger
64afb907e6 change icon 2016-08-08 22:11:32 +02:00
Rom1
3552125075 Translated using Weblate (French)
Currently translated at 100.0% (133 of 133 strings)
2016-08-08 22:05:13 +02:00
Christian Schabesberger
2601bf6d81 change view naming in detail fragment 2016-08-08 20:21:18 +02:00
David
3da032b7ee Update filepicker to the newest version and Fix for #343 2016-08-03 18:36:46 -03:00
Christian Schabesberger
7bea94144e fix search fragment progressbar 2016-08-03 17:18:05 +02:00
Dawid
40b08a593f Translated using Weblate (Polish)
Currently translated at 95.4% (127 of 133 strings)
2016-08-03 15:45:26 +02:00
Christian Schabesberger
5d06e8310d animate item button and made channel layout use recyclerview propper 2016-08-03 15:32:25 +02:00
Christian Schabesberger
1ab82dfa32 made channel activity use recycler view 2016-08-03 13:09:48 +02:00
Sérgio Marques
b93372926a Translated using Weblate (Portuguese)
Currently translated at 100.0% (133 of 133 strings)
2016-08-03 12:45:28 +02:00
Christian Schabesberger
557bcc40ef made detail fragment use recycler view 2016-08-03 00:54:03 +02:00
Christian Schabesberger
06e2e548be restructure detail activity 2016-08-03 00:12:58 +02:00
Christian Schabesberger
7a25588995 remove listactivity layout 2016-08-02 21:30:55 +02:00
Christian Schabesberger
8107337566 restructure ui 2016-08-02 21:17:54 +02:00
Christian Schabesberger
d6de11f54c remove video item list plemp 2016-08-02 20:59:53 +02:00
Christian Schabesberger
2f2334eac4 make search fagment handle video items 2016-08-02 18:38:05 +02:00
Christian Schabesberger
3a5b9203d8 put search fragment into own package 2016-08-02 15:06:02 +02:00
Christian Schabesberger
c46ce1170c add search fragment 2016-08-02 01:42:05 +02:00
Christian Schabesberger
1170c508b4 add new architecture 2016-08-02 01:26:12 +02:00
Christian Schabesberger
f34cacbc5c add recycler view adapter 2016-08-02 00:58:52 +02:00
Christian Schabesberger
4164195fae show channelvideos 2016-08-01 21:50:41 +02:00
Christian Schabesberger
c03b106118 add channel avatar 2016-08-01 11:48:52 +02:00
Dawid
c760a4e0ef Added translation using Weblate (Polish) 2016-08-01 09:28:48 +02:00
Christian Schabesberger
f3a73ecc4a add feed function 2016-08-01 02:10:38 +02:00
Christian Schabesberger
6beb36f92f get channel banner 2016-08-01 01:56:19 +02:00
Christian Schabesberger
033a4ecbe8 add now (actual) logo 2016-07-31 17:23:46 +02:00
Sérgio Marques
6360d61721 Translated using Weblate (Portuguese)
Currently translated at 100.0% (133 of 133 strings)
2016-07-31 16:20:39 +02:00
Christian Schabesberger
5dd3f6cd02 add new logo to assets 2016-07-31 14:40:19 +02:00
Utku BERBEROĞLU
cb3c595d2b Translated using Weblate (Turkish)
Currently translated at 34.5% (46 of 133 strings)
2016-07-30 18:46:18 +02:00
Marian Hanzel
f4414851be Translated using Weblate (Slovak)
Currently translated at 100.0% (133 of 133 strings)
2016-07-27 10:01:18 +02:00
Christian Schabesberger
9a0f61e60b add basics 2016-07-26 13:50:52 +02:00
naofum
22fc690c65 Translated using Weblate (Japanese)
Currently translated at 100.0% (133 of 133 strings)
2016-07-25 13:23:40 +02:00
Christian Schabesberger
c5583bd77b try to fix failing CI 2016-07-25 12:28:00 +02:00
Christian Schabesberger
8fbee92255 try to fix failing CI 2016-07-25 12:11:55 +02:00
Christian Schabesberger
1fd6685b3b removed orebot/tor support 2016-07-25 11:59:37 +02:00
Christian Schabesberger
e6fe1d2008 Merge branch 'master' of github.com:theScrabi/NewPipe 2016-07-25 11:13:04 +02:00
Christian Schabesberger
c0ce14dba5 moved on to new sdk, and put settings activity result into its fragment 2016-07-25 11:12:54 +02:00
YFdyh000
9f315fb021 Translated using Weblate (Simplified Chinese)
Currently translated at 100.0% (133 of 133 strings)
2016-07-25 03:56:47 +02:00
Christian Schabesberger
dc46b3f6c0 Merge pull request #314 from satiricon/pref-filepicker
File picker for download preferences.
2016-07-25 00:48:48 +02:00
Christian Schabesberger
24dd94fba3 Merge pull request #317 from ggppjj/master
Change "click" to "tap".
2016-07-25 00:46:49 +02:00
Christian Schabesberger
d3d4e8c721 Merge pull request #321 from DevFactory/release/collection-interfaces-should-be-used-fix-1
Code quality fix - Declarations should use Java collection interfaces such as "List" rather than specific implementation.
2016-07-25 00:46:33 +02:00
Nigel
990d3fc714 Translated using Weblate (Chinese (Hong Kong))
Currently translated at 97.7% (130 of 133 strings)
2016-07-24 12:44:17 +02:00
Christian Schabesberger
9c82f0b12a moved to sdk version 24 2016-07-21 16:43:24 +02:00
Christian Schabesberger
47bdd2e565 Merge pull request #331 from Gracecr/patch-1
Allow for large times stamps fixing #330
2016-07-21 07:15:13 +02:00
David
9a5e82cb1e Updating code to make it compatible with master 2016-07-19 16:56:53 -03:00
David
2ab9db3c07 A little cleanup 2016-07-19 16:53:20 -03:00
David
b3fdd2b0cb Done with the file picker for the download settings 2016-07-19 16:53:20 -03:00
David
bd43efd2c2 The file picker is working and I'm reordering the code to make it easier to follow 2016-07-19 16:52:37 -03:00
David
36babcaf36 Trying to make last filepicker version work, maybe I'm having some memory problems 2016-07-19 16:51:14 -03:00
David
45be3fb0e8 Starting to add a filepicker to the directory preferences 2016-07-19 16:51:14 -03:00
Gracecr
c880047c4f Allows for large times stamps fixing #330
@scde submitted #330, along with a couple proposed fixes.
This is the second proposed fix, which allows for arbitrarily large
timestamps. All credit to @scde for this.
2016-07-14 16:50:57 -04:00
Christian Schabesberger
66e88829dd Merge pull request #327 from adelolmo/master
fix build. remove wrong xliff namespaces from spanish translation.
2016-07-04 17:46:52 +02:00
Andoni del Olmo
3add3d75a1 skip ads and channels from test. 2016-07-04 12:05:43 +02:00
Andoni del Olmo
8644a4542a skip ads and channels from test. 2016-07-04 11:43:18 +02:00
andoni
0b6bae6ce3 change test search term to avoid google ads. 2016-07-03 16:25:32 +02:00
Faisal Hameed
13346ab750 Fixing squid:S1319 - Declarations should use Java collection interfaces such as "List" rather than specific implementation. 2016-07-01 04:05:55 +05:00
andoni
f65c08431c support all variants of vnd.youtube url. 2016-06-30 20:21:54 +02:00
andoni
4cde97e65d fix build. remove wrong xliff namespaces from spanish translation. 2016-06-30 20:14:27 +02:00
Christian Schabesberger
049b36b1b6 Merge pull request #323 from DevFactory/release/public-static-fields-should-be-constants-fix-1
Code quality fix - "public static" fields should be constant.
2016-06-30 16:57:42 +02:00
Christian Schabesberger
faed0958b3 Merge pull request #322 from DevFactory/release/string-literals-should-not-be-duplicated-fix-1
Code quality fix - String literals should not be duplicated.
2016-06-30 16:56:41 +02:00
Christian Schabesberger
3b36b7f01b Merge pull request #324 from DevFactory/release/redundant-modifiers-should-not-be-used-fix-1
Code quality fix - Redundant modifiers should not be used.
2016-06-30 16:56:11 +02:00
Weblate
5a2b236e71 Merge remote-tracking branch 'origin/master' 2016-06-30 16:55:41 +02:00
Riccardo Boninsegna
e5db08b0a8 Translated using Weblate (Italian)
Currently translated at 100.0% (133 of 133 strings)
2016-06-30 16:55:41 +02:00
Coffeemaker
e29eeb5d3d Translated using Weblate (German)
Currently translated at 96.2% (128 of 133 strings)
2016-06-30 16:55:41 +02:00
Christian Schabesberger
6dac88c394 Merge pull request #325 from DevFactory/release/redundant-field-initializers-fix-1
Code quality fix - Redundant Field Initializer.
2016-06-30 16:55:35 +02:00
Riccardo Boninsegna
580a0069dc Translated using Weblate (Italian)
Currently translated at 100.0% (133 of 133 strings)
2016-06-29 22:28:04 +02:00
Coffeemaker
187d65ffa5 Added translation using Weblate (Swiss High German) 2016-06-29 18:54:53 +02:00
Christian Schabesberger
7b0ef1824f add warning to nod add newpipe to playstore 2016-06-28 22:37:24 +02:00
Faisal Hameed
404017cba3 Fixing squid:S1192 - String literals should not be duplicated. 2016-06-24 14:54:18 +05:00
Faisal Hameed
dd2398efad Fixing pmd:RedundantFieldInitializer - Redundant Field Initializer. 2016-06-24 05:44:42 +05:00
Faisal Hameed
a44518a757 Fixing squid:S2333 - Redundant modifiers should not be used. 2016-06-24 05:44:09 +05:00
Faisal Hameed
83eb83025a Fixing squid:S1444 - "public static" fields should be constant. 2016-06-24 05:30:46 +05:00
Gabriel Jones
464a113f11 Change "click" to "tap". 2016-06-23 11:41:01 -04:00
Weblate
25a776cc93 Merge remote-tracking branch 'origin/master' 2016-06-22 23:41:13 +02:00
Rom1
7d19fb878d Translated using Weblate (French)
Currently translated at 100.0% (133 of 133 strings)
2016-06-22 23:41:12 +02:00
Christian Schabesberger
f5aef6879a Update CONTRIBUTING.md
fixed broken slack link
2016-06-22 23:41:09 +02:00
hatsunearu
29014d7b4a Translated using Weblate (Korean)
Currently translated at 85.7% (114 of 133 strings)
2016-06-22 09:45:15 +02:00
hd hd
9668a78732 Translated using Weblate (Hungarian)
Currently translated at 100.0% (133 of 133 strings)
2016-06-22 03:44:49 +02:00
devnoname120
a1aafb17c9 Translated using Weblate (French)
Currently translated at 100.0% (133 of 133 strings)

Not literally translated because used here: ddc3b47dfa/app/src/main/java/org/schabi/newpipe/VideoItemListFragment.java (L182)
2016-06-22 00:44:36 +02:00
Murat Dikici
9883678fd9 Translated using Weblate (Turkish)
Currently translated at 17.2% (23 of 133 strings)
2016-06-20 09:45:49 +02:00
hd hd
ba72379aa9 Translated using Weblate (Hungarian)
Currently translated at 100.0% (133 of 133 strings)
2016-06-20 00:58:09 +02:00
devnoname120
3206fef865 Translated using Weblate (French)
Currently translated at 81.2% (108 of 133 strings)
2016-06-19 22:55:25 +02:00
Freddy Morán Jr
06b6216b9d Translated using Weblate (Spanish)
Currently translated at 100.0% (133 of 133 strings)
2016-06-18 21:45:48 +02:00
Marian Hanzel
5458606abe Translated using Weblate (Slovak)
Currently translated at 100.0% (133 of 133 strings)
2016-06-18 12:35:17 +02:00
Murat Dikici
ad5cf99d9e Added translation using Weblate (Turkish) 2016-06-18 08:40:56 +02:00
Freddy Morán Jr
0445086e67 Translated using Weblate (Spanish)
Currently translated at 100.0% (133 of 133 strings)
2016-06-16 15:11:35 +02:00
Jason John
51641dcc9a Added rewind capability to notification control ( seekTo(0) ) 2016-06-16 09:11:18 -04:00
David
d1e698185e A little cleanup 2016-06-16 07:58:09 -03:00
David
d145a3e967 Done with the file picker for the download settings 2016-06-15 12:56:03 -03:00
David
4a5190292c The file picker is working and I'm reordering the code to make it easier to follow 2016-06-15 12:56:03 -03:00
David
1b7cece306 Trying to make last filepicker version work, maybe I'm having some memory problems 2016-06-15 12:55:37 -03:00
David
181c83090d Starting to add a filepicker to the directory preferences 2016-06-15 12:53:02 -03:00
Christian Schabesberger
54c32b9fe2 moved on to version 0.8.0:
* moved on to version 0.8.0
* removed posibility to use *.jar files
* updated dependend libraries
2016-06-12 18:24:16 +02:00
David
9d5951765f Fix for #310 2016-06-08 12:35:54 -03:00
David
ddc3b47dfa Fix for #308 part 2 2016-06-07 11:43:13 -03:00
David
59523d6a08 Fix for #308 2016-06-07 11:32:31 -03:00
Christian Schabesberger
686f395158 Merge pull request #307 from mingchen/master
Upgrade gradle wrapper to 2.10 and fix compile errors.
2016-06-04 10:54:12 +02:00
Ming Chen
f7b7340b30 Fix compile error due to improper define of xmlns 2016-06-03 16:13:30 -07:00
Ming Chen
9bcdad0218 Upgrade wrapper to 2.10 2016-06-03 15:53:02 -07:00
Matej U
ff4601f487 Translated using Weblate (Slovenian)
Currently translated at 100.0% (133 of 133 strings)
2016-06-03 10:49:16 +02:00
Renan Souza do Nascimento
535cebde51 Translated using Weblate (Portuguese)
Currently translated at 99.2% (132 of 133 strings)
2016-05-31 00:45:17 +02:00
Weblate
ed23faa455 Merge remote-tracking branch 'origin/master' 2016-05-27 15:29:12 +02:00
naofum
0c695d721d Translated using Weblate (Japanese)
Currently translated at 100.0% (133 of 133 strings)
2016-05-27 15:29:12 +02:00
Benedikt Freisen
d7a208dcee Translated using Weblate (German)
Currently translated at 91.7% (122 of 133 strings)
2016-05-27 15:29:11 +02:00
Christian Schabesberger
3eb2a26e4e blub commit 2016-05-27 15:29:02 +02:00
Mladen Pejaković
cc2d365e5a Translated using Weblate (Serbian)
Currently translated at 100.0% (133 of 133 strings)
2016-05-26 22:41:03 +02:00
naofum
76ac2cc58e Translated using Weblate (Japanese)
Currently translated at 100.0% (133 of 133 strings)
2016-05-26 12:44:04 +02:00
Christian Schabesberger
aee26fcffc add downloads menu item to detail fragment 2016-05-26 00:11:42 +02:00
Christian Schabesberger
685eebeb56 add title to activitys 2016-05-25 23:51:22 +02:00
Christian Schabesberger
f23ae091cc add icons for progress tiles 2016-05-25 23:35:27 +02:00
Christian Schabesberger
1421dca35f clean up gigaget code 2016-05-25 23:08:15 +02:00
Christian Schabesberger
39c2f31a22 changed color of download blocks 2016-05-25 22:59:32 +02:00
Christian Schabesberger
239ef1c238 add action for downloads menu item 2016-05-25 22:34:36 +02:00
Christian Schabesberger
466ba93750 Merge branch 'master' of github.com:theScrabi/NewPipe 2016-05-25 22:19:47 +02:00
Marian Hanzel
72007a0162 Translated using Weblate (Slovak)
Currently translated at 100.0% (129 of 129 strings)
2016-05-25 19:50:47 +02:00
David
26c0445b83 Fix for #273 2016-05-25 08:27:15 -03:00
Christian Schabesberger
6f6c1704d4 add downloads menu item 2016-05-24 14:06:49 +02:00
Weblate
14aa6de422 Merge remote-tracking branch 'origin/master' 2016-05-24 13:51:33 +02:00
Mladen Pejaković
eeb770ffe3 Translated using Weblate (Serbian)
Currently translated at 100.0% (129 of 129 strings)
2016-05-24 13:51:33 +02:00
David
382ac3470b Fix for #298 2016-05-24 08:51:08 -03:00
naofum
3abfb08090 Translated using Weblate (Japanese)
Currently translated at 100.0% (129 of 129 strings)
2016-05-23 13:24:57 +02:00
Matej U
b4aac839c9 Translated using Weblate (Slovenian)
Currently translated at 100.0% (129 of 129 strings)
2016-05-22 22:29:22 +02:00
YFdyh000
da984c23df Translated using Weblate (Simplified Chinese)
Currently translated at 100.0% (129 of 129 strings)
2016-05-22 16:14:29 +02:00
Mladen Pejaković
cab770159d Translated using Weblate (Serbian)
Currently translated at 100.0% (129 of 129 strings)
2016-05-22 13:56:29 +02:00
Christian Schabesberger
7c2ff977d8 Merge branch 'download-manager' of git://github.com/satiricon/NewPipe into satiricon-download-manager 2016-05-22 12:47:24 +02:00
Christian Schabesberger
5bd9334f8f Merge branch 'master' of github.com:theScrabi/NewPipe 2016-05-22 12:44:41 +02:00
Christian Schabesberger
c5544df64c made StreamExtractor use StreamPreviewInfoCollector 2016-05-22 12:39:57 +02:00
Christian Schabesberger
c85e3c07d6 Merge pull request #287 from prashantkhurana/fix/Media-controls-on-main-screen
Added media volume control on main screen Fixes #38
2016-05-22 09:18:23 +02:00
Christian Schabesberger
674e1c0519 Merge pull request #294 from prashantkhurana/Feature/Hide-uploader-bug
Fix to hide uploader correctly
2016-05-22 09:16:37 +02:00
Prashant Khurana
7154a1edb8 Fix to hide uploader correctly 2016-05-15 22:20:28 -04:00
Licaon Kter
be1252e0e6 Translated using Weblate (Romanian)
Currently translated at 64.8% (70 of 108 strings)
2016-05-12 15:45:25 +02:00
Christian Schabesberger
a4ce6c707c update support lib 2016-05-10 00:26:32 +02:00
David
affce74b84 Added menu to download activity 2016-05-02 10:47:18 -03:00
David
730de4061f deleted some unused code and assets 2016-05-02 10:47:18 -03:00
David
3beafa2a74 Added new download dialog 2016-05-02 10:47:18 -03:00
David
c622923edd Fixed the download dialog. Next take it to the previous activity 2016-05-02 10:47:18 -03:00
David
6940021293 Fixed dir settings 2016-05-02 10:47:18 -03:00
David
0156a4f39e Added back button to download activity ActionBar 2016-05-02 10:47:18 -03:00
David
4bae12aa55 Embedded GigaGet download manager. First try. 2016-05-02 10:47:18 -03:00
M2ck
f08b1224c9 Translated using Weblate (French)
Currently translated at 100.0% (108 of 108 strings)
2016-05-02 15:44:32 +02:00
Prashant Khurana
477355db8f Added media volume control on main screen Fixes #38 2016-05-01 21:49:14 -04:00
Allan Nordhøy
11c89165c5 Translated using Weblate (Norwegian Bokmål)
Currently translated at 92.5% (100 of 108 strings)
2016-05-01 00:44:56 +02:00
riotism
825f28ab9a Translated using Weblate (Chinese (Hong Kong))
Currently translated at 92.5% (100 of 108 strings)
2016-04-28 00:44:12 +02:00
Marian Hanzel
54ff5e1dc6 Translated using Weblate (Slovak)
Currently translated at 100.0% (108 of 108 strings)
2016-04-27 18:45:19 +02:00
Gian Maria Viglianti
9b46418628 Translated using Weblate (Italian)
Currently translated at 100.0% (108 of 108 strings)
2016-04-25 13:12:42 +02:00
Benedikt Freisen
04597a9faf Translated using Weblate (German)
Currently translated at 100.0% (108 of 108 strings)
2016-04-18 21:24:55 +02:00
naofum
5b0994dc85 Translated using Weblate (Japanese)
Currently translated at 100.0% (108 of 108 strings)
2016-04-18 15:02:56 +02:00
Christian Schabesberger
7c852c69a3 add queeing videos as an future feature 2016-04-17 15:49:35 +02:00
devnoname120
df47e94ceb Translated using Weblate (French)
Currently translated at 100.0% (108 of 108 strings)
2016-04-17 03:44:30 +02:00
Sérgio Marques
3b68004005 Translated using Weblate (Portuguese)
Currently translated at 100.0% (108 of 108 strings)
2016-04-16 18:39:29 +02:00
devnoname120
5a9c327938 Translated using Weblate (French)
Currently translated at 99.0% (108 of 108 strings)
2016-04-15 01:10:28 +02:00
M2ck
3e31e9783c Translated using Weblate (French)
Currently translated at 99.0% (107 of 108 strings)
2016-04-15 01:10:25 +02:00
Yoo
46fb3639ec Translated using Weblate (Hungarian)
Currently translated at 99.0% (107 of 108 strings)
2016-04-14 18:44:40 +02:00
Rom1
a6eba57099 Translated using Weblate (French)
Currently translated at 99.0% (107 of 108 strings)
2016-04-13 14:49:46 +02:00
M2ck
c8481f961a Translated using Weblate (French)
Currently translated at 98.1% (106 of 108 strings)
2016-04-13 14:49:07 +02:00
Robin van der Vliet
56329f43fb Translated using Weblate (Esperanto)
Currently translated at 71.2% (77 of 108 strings)
2016-04-11 18:44:19 +02:00
Matej U
793fbfb5be Translated using Weblate (Slovenian)
Currently translated at 100.0% (108 of 108 strings)
2016-04-09 20:51:20 +02:00
Rom1
1d8334b762 Translated using Weblate (French)
Currently translated at 93.5% (101 of 108 strings)
2016-04-09 18:44:35 +02:00
Rom1
19330ac415 Translated using Weblate (English)
Currently translated at 100.0% (108 of 108 strings)
2016-04-09 18:44:21 +02:00
Ibrahim Derraz
7a015a0bda Translated using Weblate (French)
Currently translated at 91.6% (99 of 108 strings)
2016-04-07 16:49:27 +02:00
Rom1
f29c422c61 Translated using Weblate (French)
Currently translated at 90.7% (98 of 108 strings)
2016-04-07 16:49:10 +02:00
Ibrahim Derraz
99a369f604 Translated using Weblate (French)
Currently translated at 90.7% (98 of 108 strings)
2016-04-07 16:47:48 +02:00
Rom1
c1f0fb36ac Translated using Weblate (French)
Currently translated at 89.8% (97 of 108 strings)
2016-04-07 16:47:32 +02:00
Ibrahim Derraz
fa0a8905f7 Translated using Weblate (French)
Currently translated at 89.8% (97 of 108 strings)
2016-04-07 16:47:21 +02:00
Rom1
4e63a3269e Translated using Weblate (French)
Currently translated at 88.8% (96 of 108 strings)
2016-04-07 16:46:47 +02:00
Ibrahim Derraz
0f1873e295 Translated using Weblate (French)
Currently translated at 87.9% (95 of 108 strings)
2016-04-07 16:40:26 +02:00
Rom1
23fd28afd5 Translated using Weblate (French)
Currently translated at 86.1% (93 of 108 strings)
2016-04-07 16:38:33 +02:00
naofum
ad5a813a9a Translated using Weblate (Japanese)
Currently translated at 100.0% (108 of 108 strings)
2016-04-07 15:38:19 +02:00
Ibrahim Derraz
f245eedbdf Translated using Weblate (French)
Currently translated at 82.4% (89 of 108 strings)
2016-04-07 15:18:55 +02:00
Rom1
1ce6a6e8c5 Translated using Weblate (French)
Currently translated at 80.5% (87 of 108 strings)
2016-04-07 15:18:38 +02:00
Ibrahim Derraz
0ea7b5526c Translated using Weblate (French)
Currently translated at 80.5% (87 of 108 strings)
2016-04-07 15:18:07 +02:00
Rom1
b41e88f8f3 Translated using Weblate (French)
Currently translated at 79.6% (86 of 108 strings)
2016-04-07 15:17:56 +02:00
Ibrahim Derraz
82b9e79d99 Translated using Weblate (French)
Currently translated at 79.6% (86 of 108 strings)
2016-04-07 15:17:35 +02:00
Rom1
a5383fadb1 Translated using Weblate (French)
Currently translated at 74.0% (80 of 108 strings)
2016-04-07 15:15:24 +02:00
Ibrahim Derraz
bd7fb9bbe4 Translated using Weblate (French)
Currently translated at 73.1% (79 of 108 strings)
2016-04-07 15:15:14 +02:00
Rom1
1ddd0a333c Translated using Weblate (French)
Currently translated at 72.2% (78 of 108 strings)
2016-04-07 15:14:40 +02:00
Ibrahim Derraz
084fec08a6 Translated using Weblate (French)
Currently translated at 72.2% (78 of 108 strings)
2016-04-07 15:14:23 +02:00
Rom1
2b51448b49 Translated using Weblate (French)
Currently translated at 71.2% (77 of 108 strings)
2016-04-07 15:13:14 +02:00
Ibrahim Derraz
f4eee83477 Translated using Weblate (French)
Currently translated at 71.2% (77 of 108 strings)
2016-04-07 15:12:02 +02:00
Rom1
cd622c9e06 Translated using Weblate (French)
Currently translated at 70.3% (76 of 108 strings)
2016-04-07 15:11:52 +02:00
Ibrahim Derraz
7077ebfde2 Translated using Weblate (French)
Currently translated at 70.3% (76 of 108 strings)
2016-04-07 15:11:41 +02:00
Rom1
4862fecb12 Translated using Weblate (French)
Currently translated at 69.4% (75 of 108 strings)
2016-04-07 15:10:58 +02:00
YFdyh000
c189933705 Translated using Weblate (Simplified Chinese)
Currently translated at 100.0% (108 of 108 strings)
2016-04-06 23:14:48 +02:00
Weblate
9c3f7a9139 Merge remote-tracking branch 'origin/master' 2016-04-06 23:12:51 +02:00
Zhaofeng Li
382bf5e936 Translated using Weblate (Simplified Chinese)
Currently translated at 100.0% (108 of 108 strings)
2016-04-06 23:12:51 +02:00
Christian Schabesberger
e2fac962f3 Merge pull request #261 from zhaofengli/ui-strings-ocd-cure
Let's tweak the UI strings a bit
2016-04-06 23:12:47 +02:00
Gian Maria Viglianti
3071ebc0d5 Translated using Weblate (Italian)
Currently translated at 100.0% (108 of 108 strings)
2016-04-06 19:16:15 +02:00
Zhaofeng Li
a5fc6db1fa default_resolution_title: Fix capitalization
"Default Resolution" -> "Default resolution"

See https://www.google.com/design/spec/style/writing.html#writing-capitalization-punctuation
2016-04-06 20:08:29 +08:00
Zhaofeng Li
8060c6a775 strings.xml: Fix grammar
"Download path video" -> "Video download path"
"Download path audio" -> "Audio download path"
2016-04-06 20:06:00 +08:00
Zhaofeng Li
2a6e7f300c search_language_title: Change "Preferable" to "Preferred"
Why? See http://english.stackexchange.com/questions/128996/how-would-one-know-when-to-choose-preferred-or-preferable
2016-04-06 20:02:40 +08:00
Zhaofeng Li
98afe79eaa strings.xml: Remove unnecessary punctuations
Periods, colons and other unnecessary punctuations should not be used in labels.
See https://www.google.com/design/spec/style/writing.html#writing-capitalization-punctuation
2016-04-06 20:02:22 +08:00
halcyonest
a35590f9ea Translated using Weblate (English)
Currently translated at 100.0% (108 of 108 strings)
2016-03-29 03:44:20 +02:00
Marian Hanzel
f14f8c35b8 Translated using Weblate (Slovak)
Currently translated at 100.0% (108 of 108 strings)
2016-03-28 18:06:19 +02:00
Matej U
aa5c510c99 Translated using Weblate (Slovenian)
Currently translated at 100.0% (108 of 108 strings)
2016-03-27 18:57:00 +02:00
Benedikt Freisen
59f33a8def Translated using Weblate (German)
Currently translated at 100.0% (108 of 108 strings)
2016-03-27 16:19:49 +02:00
naofum
dbb4df598c Translated using Weblate (Japanese)
Currently translated at 100.0% (108 of 108 strings)
2016-03-27 03:45:53 +02:00
halcyonest
8452f52da0 Translated using Weblate (Korean)
Currently translated at 100.0% (108 of 108 strings)
2016-03-27 03:40:44 +02:00
Christian Schabesberger
db6613f562 yet another try to fix that test -.- 2016-03-25 20:19:43 +01:00
Christian Schabesberger
44d2775437 Merge branch 'master' of github.com:theScrabi/NewPipe 2016-03-25 20:03:05 +01:00
Christian Schabesberger
a3326dc598 another try to fixe shitty viewcount test 2016-03-25 20:02:50 +01:00
Christian Schabesberger
0cd56ddeb8 Merge branch 'master' of github.com:theScrabi/NewPipe 2016-03-25 19:37:59 +01:00
Christian Schabesberger
2a7f729e73 fixed unit test 2016-03-25 19:37:48 +01:00
Weblate
18301d8f8b Merge remote-tracking branch 'origin/master' 2016-03-25 19:34:47 +01:00
YFdyh000
8286437055 Translated using Weblate (Simplified Chinese)
Currently translated at 100.0% (108 of 108 strings)
2016-03-25 19:34:46 +01:00
Christian Schabesberger
1bef7fbbf3 Merge branch 'master' of github.com:theScrabi/NewPipe 2016-03-25 19:08:12 +01:00
YFdyh000
21e8318643 Translated using Weblate (Simplified Chinese)
Currently translated at 100.0% (108 of 108 strings)
2016-03-25 19:06:56 +01:00
Christian Schabesberger
381f054daf Merge branch 'Start-screen-hint' of git://github.com/Ashanmaril/NewPipe into Ashanmaril-Start-screen-hint 2016-03-25 19:05:56 +01:00
Christian Schabesberger
c05d9303a9 fixed download location 2016-03-25 19:01:22 +01:00
Weblate
cca72a9e4e Merge remote-tracking branch 'origin/master' 2016-03-25 18:58:08 +01:00
Oleksandr Los
d4463e5f30 Translated using Weblate (Ukrainian)
Currently translated at 71.0% (76 of 107 strings)
2016-03-25 18:58:08 +01:00
Ibrahim Derraz
92155e2154 Translated using Weblate (French)
Currently translated at 65.4% (70 of 107 strings)
2016-03-25 18:58:07 +01:00
Christian Schabesberger
287fd0bf1e Merge branch 'master' of github.com:theScrabi/NewPipe 2016-03-25 13:57:19 +01:00
Christian Schabesberger
9e910d5501 fixed commons-lang problem & moved on to 0.7.8 2016-03-25 13:56:24 +01:00
YFdyh000
ff54b4d0c9 Translated using Weblate (Simplified Chinese)
Currently translated at 100.0% (107 of 107 strings)
2016-03-25 06:45:09 +01:00
Oleksandr Los
af0b841bc3 Translated using Weblate (Ukrainian)
Currently translated at 100% (0 of 0 strings)

Created new translation.
2016-03-24 22:57:17 +01:00
Matej U
665ea85613 Translated using Weblate (Slovenian)
Currently translated at 100.0% (107 of 107 strings)
2016-03-24 21:45:10 +01:00
Benedikt Freisen
de635392c6 Translated using Weblate (German)
Currently translated at 100.0% (107 of 107 strings)
2016-03-23 12:44:33 +01:00
YFdyh000
7814cca3d5 Translated using Weblate (Simplified Chinese)
Currently translated at 100.0% (107 of 107 strings)
2016-03-23 06:12:36 +01:00
Hayden
6c7204eae0 Show/hide message 2016-03-22 20:05:43 -06:00
Hayden
834d647011 Merge remote-tracking branch 'github/Start-screen-hint' into Start-screen-hint
# Conflicts:
#	app/src/main/java/org/schabi/newpipe/VideoItemListActivity.java
2016-03-22 19:59:26 -06:00
Hayden
d872263b55 Got rid of imageview from testing 2016-03-22 19:55:00 -06:00
Hayden
4f8e4ca0ad Got rid of useless Toast from testing 2016-03-22 19:53:55 -06:00
Hayden
2abc9d0210 Text hint to start a search 2016-03-22 19:39:31 -06:00
Matej U
36fb942ce6 Translated using Weblate (Slovenian)
Currently translated at 100.0% (107 of 107 strings)
2016-03-22 19:10:20 +01:00
Tomáš Martykán
56476b35e3 Translated using Weblate (Czech)
Currently translated at 66.3% (71 of 107 strings)
2016-03-21 18:44:27 +01:00
hydroid7
38b3835891 Translated using Weblate (Hungarian)
Currently translated at 58.8% (63 of 107 strings)
2016-03-20 12:44:38 +01:00
naofum
ccf5be116a Translated using Weblate (Japanese)
Currently translated at 100.0% (107 of 107 strings)
2016-03-14 13:04:00 +01:00
Weblate
794ae4c5da Merge remote-tracking branch 'origin/master' 2016-03-13 22:38:50 +01:00
Mladen Pejaković
060e744924 Translated using Weblate (Serbian)
Currently translated at 98.1% (105 of 107 strings)
2016-03-13 22:38:50 +01:00
Christian Schabesberger
de62ed772f Merge branch 'master' of https://github.com/kamadi/NewPipe into kamadi-master 2016-03-13 22:36:33 +01:00
Christian Schabesberger
6a8c4a65c5 Merge pull request #237 from DevFactory/release/general-code-quality-fix-2
General code quality fix-2
2016-03-13 22:30:24 +01:00
Christian Schabesberger
03738aeb27 merged my changes with them of rrooij 2016-03-13 22:22:18 +01:00
Weblate
243cb8569e Merge remote-tracking branch 'origin/master' 2016-03-13 02:59:46 +01:00
Mladen Pejaković
1bd660fbbe Translated using Weblate (Serbian)
Currently translated at 98.1% (104 of 106 strings)
2016-03-13 02:59:46 +01:00
Christian Schabesberger
fec80b39f0 Merge pull request #238 from rrooij/yt_streampreviewextractor
Move YoutubeStreamPreviewInfoExtractor to separate class
2016-03-13 02:59:43 +01:00
rrooij
21768432c8 Move YoutubeStreamPreviewInfoExtractor to separate class
The class should be separate because channel support in the future would require video preview extraction too, which doesn't differ much from the extraction done from the search results.
2016-03-12 18:15:20 +01:00
Benedikt Freisen
e9b900ff28 Translated using Weblate (German)
Currently translated at 100.0% (106 of 106 strings)
2016-03-12 11:59:04 +01:00
naofum
c57cb8fec1 Translated using Weblate (Japanese)
Currently translated at 100.0% (106 of 106 strings)
2016-03-12 06:28:19 +01:00
Matej U
247681e3ef Translated using Weblate (Slovenian)
Currently translated at 100.0% (106 of 106 strings)
2016-03-11 23:46:28 +01:00
Faisal Hameed
2f9142419a Fixing squid:S1155, squid:S2293, squid:S1488 2016-03-12 02:01:47 +05:00
Christian Schabesberger
b84eb3df7f made stream type part of abstractVideoinfo 2016-03-11 16:20:02 +01:00
Christian Schabesberger
4058ec2ee9 fixed another livestream related issue 2016-03-11 15:43:50 +01:00
Christian Schabesberger
23a9061871 changed autoplay text 2016-03-11 15:10:13 +01:00
Weblate
9e95ca10b2 Merge remote-tracking branch 'origin/master' 2016-03-11 15:07:20 +01:00
Christian Schabesberger
4c0809d3d3 Translated using Weblate (German)
Currently translated at 100.0% (104 of 104 strings)
2016-03-11 15:07:20 +01:00
Christian Schabesberger
d43365f6e6 add custom error report function 2016-03-11 14:56:41 +01:00
Christian Schabesberger
c6ccc2b20d Merge pull request #232 from DevFactory/release/null-pointer-should-not-be-dereferenced-fix-1
Code quality fix - Null pointers should not be dereferenced.
2016-03-11 14:15:41 +01:00
Christian Schabesberger
31dd68be1d Merge pull request #233 from DevFactory/release/useless-parentheses-should-be-removed-fix-1
Code quality fix - Useless parentheses around expressions should be removed to prevent any misunderstanding.
2016-03-11 14:14:29 +01:00
Christian Schabesberger
1c94620c06 Merge pull request #234 from DevFactory/release/variable-should-comply-with-naming-conventions-fix-1
Code quality fix - Local variable and method parameter names should comply with a naming convention.
2016-03-11 14:13:51 +01:00
Weblate
82d214faa6 Merge remote-tracking branch 'origin/master' 2016-03-11 14:12:50 +01:00
Sérgio Marques
04b2e3689c Translated using Weblate (Portuguese)
Currently translated at 100.0% (104 of 104 strings)
2016-03-11 14:12:50 +01:00
Benedikt Volkmer
f00b8a3941 Translated using Weblate (German)
Currently translated at 100.0% (104 of 104 strings)
2016-03-11 14:12:49 +01:00
Henk de Vries
390cc9cfc9 Translated using Weblate (Dutch)
Currently translated at 95.1% (99 of 104 strings)
2016-03-11 14:12:49 +01:00
Christian Schabesberger
8259872e2d Merge pull request #235 from DevFactory/release/utility-classes-should-not-have-public-constructors-fix-1
Code quality fix - Utility classes should not have public constructors.
2016-03-11 14:12:45 +01:00
Faisal Hameed
1a3aaf86ee Fixing squid:S2259- Null pointers should not be dereferenced. 2016-03-10 15:07:23 +05:00
Faisal Hameed
cade4f932d Fixing squid:S00117- Local variable and method parameter names should comply with a naming convention. 2016-03-10 15:01:38 +05:00
Faisal Hameed
eb060602cd Fixing squid:S1118 - Utility classes should not have public constructors. 2016-03-10 14:50:42 +05:00
Faisal Hameed
805f046696 Fixing squid:UselessParenthesesCheck - Useless parentheses around expressions should be removed to prevent any misunderstanding. 2016-03-10 14:41:12 +05:00
Matej U
35e11e43de Translated using Weblate (Slovenian)
Currently translated at 100.0% (104 of 104 strings)
2016-03-08 21:22:44 +01:00
Mohamad Hasan Al Banna
ba15c6dc60 Translated using Weblate (Indonesian)
Currently translated at 100% (0 of 0 strings)

Created new translation.
2016-03-08 16:29:26 +01:00
Christian Schabesberger
569c227a99 try to give gradle more memory for CI build 2016-03-08 02:43:00 +01:00
Christian Schabesberger
8fd7599158 Merge branch 'master' of github.com:theScrabi/NewPipe 2016-03-08 02:22:35 +01:00
Christian Schabesberger
19418e5dfb fixed another parsing but related to livestreams 2016-03-08 02:22:23 +01:00
Christian Schabesberger
f90a163ede add --info to buildscript 2016-03-08 01:25:07 +01:00
Christian Schabesberger
8fb1fd3602 fixed image loading bug 2016-03-08 01:24:45 +01:00
Christian Schabesberger
0dbf2a347f moved on to version 0.7.7 2016-03-08 01:10:33 +01:00
Christian Schabesberger
38742fd5e8 fixed values-iw build failure 2016-03-08 01:09:39 +01:00
Weblate
67ce7e0979 Merge remote-tracking branch 'origin/master' 2016-03-08 01:06:49 +01:00
Benedikt Freisen
21a7e52f9a Translated using Weblate (German)
Currently translated at 99.0% (103 of 104 strings)
2016-03-08 01:06:49 +01:00
Christian Schabesberger
fcb445a381 removed --stacktrace form CI buildscript 2016-03-08 01:02:01 +01:00
Christian Schabesberger
f6450d4b4d removed not or almost not existing translations 2016-03-07 19:15:01 +01:00
Christian Schabesberger
a01d1b89b6 Merge branch 'master' of github.com:theScrabi/NewPipe 2016-03-07 18:51:51 +01:00
Christian Schabesberger
0c9b6582cc made CI script print stack trace 2016-03-07 18:51:43 +01:00
Christian Schabesberger
2d47daabf8 add xxxhdpi app icon 2016-03-07 15:03:26 +01:00
Weblate
ce20cbe435 Merge remote-tracking branch 'origin/master' 2016-03-07 15:00:43 +01:00
Matej U
99e5415bfc Translated using Weblate (Slovenian)
Currently translated at 87.5% (91 of 104 strings)
2016-03-07 15:00:42 +01:00
madiyar
b2d935dd6d Restoring search query after orientation change in two pane mode 2016-03-07 13:05:05 +06:00
madiyar
eb66cc5db8 Restoring search query after orientation change 2016-03-07 12:58:48 +06:00
naofum
6d6b8363a8 Translated using Weblate (Japanese)
Currently translated at 100.0% (104 of 104 strings)
2016-03-06 12:19:11 +01:00
Mladen Pejaković
bf79b02e15 Translated using Weblate (Serbian)
Currently translated at 100.0% (104 of 104 strings)
2016-03-05 18:57:47 +01:00
Christian Schabesberger
3ce7eda3eb made newpipe handle not available like/dislike count 2016-03-05 18:35:28 +01:00
Christian Schabesberger
378e6b6547 fixed fix portrait view 2016-03-05 17:49:11 +01:00
Christian Schabesberger
f63b35e2c0 fixed search error 2016-03-05 17:35:57 +01:00
Christian Schabesberger
9a480cbe3e fixed backarrow on player_activity 2016-03-05 17:16:28 +01:00
Christian Schabesberger
76ca937bb8 set tor into experimental state 2016-03-05 17:04:37 +01:00
Christian Schabesberger
8a29567572 merge addExoplayer 2016-03-05 16:54:24 +01:00
Christian Schabesberger
839cd7d1c7 some small fixes 2016-03-05 16:24:47 +01:00
Christian Schabesberger
0bfc7a9177 Merge branch 'master' of github.com:theScrabi/NewPipe 2016-03-05 16:15:00 +01:00
Christian Schabesberger
26e11f96e0 add streamtype field 2016-03-04 15:18:04 +01:00
Christian Schabesberger
86c36acedc removed android code from extractor side 2016-03-04 14:25:37 +01:00
Christian Schabesberger
2318ad2bde changed viewcount notation 2016-03-04 14:16:02 +01:00
Christian Schabesberger
9548dfabd6 made service list do propper error handling 2016-03-04 14:10:41 +01:00
Christian Schabesberger
0c716c12d7 fixed viewcount test again 2016-03-04 13:51:50 +01:00
Weblate
08dd176753 Merge remote-tracking branch 'origin/master' 2016-03-04 13:49:06 +01:00
Thejesh GN
07086bfb3e Translated using Weblate (Kannada)
Currently translated at 30.5% (26 of 85 strings)
2016-03-04 13:49:06 +01:00
Christian Schabesberger
b1d2e64450 ad service_id field, and pulled video/audio stream out of streaminfo 2016-03-04 13:45:41 +01:00
Christian Schabesberger
d9cd928100 fixed audio settings changed bug 2016-03-02 23:23:52 +01:00
naofum
37ec26c8fd Translated using Weblate (Japanese)
Currently translated at 100.0% (85 of 85 strings)
2016-03-02 13:05:54 +01:00
Christian Schabesberger
68b7d9cdff made duration an integer, and made youtubesearch engine throw more parsingexceptions 2016-03-02 02:36:45 +01:00
Christian Schabesberger
3aecd15916 Merge branch 'advancedErrorHandling' 2016-03-02 00:29:56 +01:00
Christian Schabesberger
97d76aee18 fixed failing unit test 2016-03-01 23:54:26 +01:00
Christian Schabesberger
781bf8e7ec fixed yet another bug 2016-03-01 23:28:22 +01:00
Christian Schabesberger
77b9457707 add error handling to suggestions 2016-03-01 18:43:36 +01:00
Christian Schabesberger
1210ab0de0 changed color of snackbar action text 2016-02-29 21:22:16 +01:00
Christian Schabesberger
3c93c4714e fixed crash during crash report 2016-02-29 21:13:02 +01:00
Christian Schabesberger
f90a1ede70 fixed some more bugs 2016-02-29 21:06:00 +01:00
Christian Schabesberger
028354b283 fixed some bugs 2016-02-29 20:33:28 +01:00
Christian Schabesberger
18493a578d made error message be displayed inside erroractivity 2016-02-29 19:23:01 +01:00
Christian Schabesberger
1829dc79c8 make erroractivity handle search engine exceptions 2016-02-29 19:02:40 +01:00
Weblate
7575e8fbe3 Merge remote-tracking branch 'origin/master' 2016-02-29 16:16:54 +01:00
Christian Schabesberger
eed9915c12 add missing gpl3 header to SuggestionListAdapter 2016-02-29 16:19:34 +01:00
Filip Sebastian
be71e45954 Translated using Weblate (Romanian)
Currently translated at 100.0% (72 of 72 strings)
2016-02-29 16:16:54 +01:00
Kamil Modzelewski
3a7978eca0 Translated using Weblate (Polish)
Currently translated at 54.1% (39 of 72 strings)
2016-02-29 16:16:53 +01:00
naofum
c37d2250d4 Translated using Weblate (Japanese)
Currently translated at 100.0% (72 of 72 strings)
2016-02-29 16:16:53 +01:00
Benedikt Freisen
45819d1cd4 Translated using Weblate (German)
Currently translated at 98.6% (71 of 72 strings)
2016-02-29 16:16:53 +01:00
Christian Schabesberger
4ac36af40c made extractor not throw exception upon missing dash mpd 2016-02-29 16:15:15 +01:00
Christian Schabesberger
1a2840b33f made ui handle missing information on search 2016-02-29 16:10:46 +01:00
Christian Schabesberger
d7e75e6011 restructured search engine 2016-02-29 15:59:06 +01:00
Gian Maria Viglianti
73316b87a3 Translated using Weblate (English)
Currently translated at 100.0% (72 of 72 strings)
2016-02-29 03:44:20 +01:00
Matej U
46402691b0 Translated using Weblate (Slovenian)
Currently translated at 100.0% (72 of 72 strings)
2016-02-27 23:05:13 +01:00
Filip Sebastian
e7cef4549f Translated using Weblate (Romanian)
Currently translated at 100.0% (72 of 72 strings)
2016-02-27 17:51:43 +01:00
Christian Schabesberger
737a41f45b display error message 2016-02-27 17:02:38 +01:00
Christian Schabesberger
045ca40a77 renamed video classes to stream classes 2016-02-27 16:37:15 +01:00
Christian Schabesberger
b1fe197c11 changed crashreport email address 2016-02-27 15:57:37 +01:00
Mladen Pejaković
8888530ae3 Translated using Weblate (Serbian)
Currently translated at 100.0% (72 of 72 strings)
2016-02-27 15:34:44 +01:00
Christian Schabesberger
2d51c7428e add ip and timestamp 2016-02-27 15:02:28 +01:00
Christian Schabesberger
863e2a80a2 set errors mail address 2016-02-27 02:26:06 +01:00
Weblate
41d17d2a47 Merge remote-tracking branch 'origin/master' 2016-02-27 02:12:18 +01:00
Christian Schabesberger
36934468d6 uppdate support framework 2016-02-27 02:14:55 +01:00
Thejesh GN
5029ce8728 Translated using Weblate (Kannada)
Currently translated at 1.3% (1 of 72 strings)
2016-02-27 02:12:17 +01:00
Gian Maria Viglianti
e6ab24bcb4 Translated using Weblate (Italian)
Currently translated at 100.0% (72 of 72 strings)
2016-02-27 02:12:17 +01:00
Christian Schabesberger
f3bd263ada new website for newpipe 2016-02-27 02:11:31 +01:00
Gian Maria Viglianti
db7ab3ffce Translated using Weblate (Italian)
Currently translated at 100.0% (72 of 72 strings)
2016-02-27 01:37:42 +01:00
Thejesh GN
85c3755b96 Translated using Weblate (Kannada)
Currently translated at 100% (0 of 0 strings)

Created new translation.
2016-02-26 10:28:11 +01:00
Christian Schabesberger
5decd55551 fixed another pattern problem 2016-02-26 01:42:38 +01:00
Christian Schabesberger
bc468b6f36 fixed stream exception handling 2016-02-26 01:32:44 +01:00
Christian Schabesberger
369d9204d9 add send via mail/share feature 2016-02-25 23:19:43 +01:00
Christian Schabesberger
7caf7be97e add info box 2016-02-25 22:02:42 +01:00
Christian Schabesberger
64c423902a made error handling work a bit 2016-02-25 03:43:13 +01:00
Christian Schabesberger
27a2dee3bd created error report activity 2016-02-24 23:12:02 +01:00
Christian Schabesberger
11d3aeb0dd fixed faling searchengine unittest 2016-02-24 22:36:16 +01:00
Christian Schabesberger
f54d8d318a remove parcelabel from VideoInfoItem 2016-02-24 22:25:51 +01:00
Christian Schabesberger
210f2ef452 Merge branch 'master' of github.com:theScrabi/NewPipe 2016-02-24 22:12:21 +01:00
Christian Schabesberger
d0bab6183a fixed related view 0 view count error 2016-02-24 22:12:13 +01:00
Christian Schabesberger
3441aceba3 fixed viewcount failure 2016-02-24 16:44:46 +01:00
Weblate
0908b9cd76 Merge remote-tracking branch 'origin/master' 2016-02-24 16:42:14 +01:00
vadin
67494ad4c4 Translated using Weblate (Spanish)
Currently translated at 98.6% (71 of 72 strings)
2016-02-24 16:42:14 +01:00
naofum
5d8f75beb4 Translated using Weblate (Japanese)
Currently translated at 100.0% (72 of 72 strings)
2016-02-24 15:06:59 +01:00
Christian Schabesberger
8e7fde99db fix bitcoin qrcode 2016-02-24 13:34:41 +01:00
Christian Schabesberger
bfdf165584 add bitcoin donations 2016-02-24 13:29:53 +01:00
Weblate
9427ebd489 Merge remote-tracking branch 'origin/master' 2016-02-23 23:33:55 +01:00
Christian Schabesberger
e4f753ae82 fixed emty search query on suggestions error 2016-02-23 23:36:02 +01:00
Benedikt Freisen
f2d9d3c2d7 Translated using Weblate (German)
Currently translated at 98.6% (71 of 72 strings)
2016-02-23 23:33:55 +01:00
Nathan Follens
04c5f31cc1 Translated using Weblate (Dutch)
Currently translated at 100.0% (72 of 72 strings)
2016-02-23 23:33:55 +01:00
Matej U
4ea86b714e Translated using Weblate (Slovenian)
Currently translated at 100.0% (72 of 72 strings)
2016-02-23 18:33:20 +01:00
Nathan Follens
cc0b96cba4 Translated using Weblate (Dutch)
Currently translated at 100.0% (72 of 72 strings)
2016-02-23 18:00:54 +01:00
Christian Schabesberger
9e176f8400 Merge branch 'kamadi-master' 2016-02-23 16:52:52 +01:00
Christian Schabesberger
7195ff349b fixed toast issue of the previous commit 2016-02-23 16:42:04 +01:00
Christian Schabesberger
8048ad343e add toast for suggestion error handling 2016-02-23 16:34:14 +01:00
Christian Schabesberger
799a27ec84 Merge branch 'master' of https://github.com/kamadi/NewPipe into kamadi-master 2016-02-23 16:21:16 +01:00
Christian Schabesberger
c7c77ab20c fixed another pattern problem 2016-02-23 15:25:34 +01:00
madiyar
8fc113cc52 Added country language param to the suggestionList method in search engine 2016-02-23 16:22:49 +06:00
madiyar
c7679bec87 Added suggestion to the searching 2016-02-23 15:01:59 +06:00
madiyar
3301d8b4fb Created suggestion adapter 2016-02-23 14:36:24 +06:00
Christian Schabesberger
f5892093a9 made exoplayer work with youtube again 2016-02-23 01:56:04 +01:00
Christian Schabesberger
b06238ba5d initial changes 2016-02-22 20:28:37 +01:00
Christian Schabesberger
dddcc80f30 merged faridk's code 2016-02-22 19:58:04 +01:00
Christian Schabesberger
8854c8c9d0 Merge branch 'master' of github.com:theScrabi/NewPipe 2016-02-22 19:19:22 +01:00
Christian Schabesberger
d02f441eb0 add age restricted material to description 2016-02-22 19:19:13 +01:00
Christian Schabesberger
ff89dd00b6 Merge branch 'rrooij-age_restriction' 2016-02-22 19:18:22 +01:00
Christian Schabesberger
7041e63268 merged age restricted video request 2016-02-22 19:17:05 +01:00
Weblate
8126fdcd15 Merge remote-tracking branch 'origin/master' 2016-02-22 19:16:57 +01:00
Selim
2d61a2f251 Translated using Weblate (Turkish)
Currently translated at 31.8% (22 of 69 strings)
2016-02-22 19:16:57 +01:00
Matej U
7594ee9dbe Translated using Weblate (Slovenian)
Currently translated at 100.0% (69 of 69 strings)
2016-02-22 19:16:56 +01:00
naofum
0862a38599 Translated using Weblate (Japanese)
Currently translated at 100.0% (69 of 69 strings)
2016-02-22 16:37:05 +01:00
Selim
bf7dc462e8 Translated using Weblate (Turkish)
Currently translated at 100% (0 of 0 strings)

Created new translation.
2016-02-22 13:46:14 +01:00
Christian Schabesberger
65b6aaec8e moved on to 0.7.6 2016-02-21 22:57:07 +01:00
Christian Schabesberger
e08aa14eab better detection for livestreams 2016-02-21 22:25:45 +01:00
Christian Schabesberger
851028997a fixed json error from the last commit 2016-02-21 21:15:39 +01:00
Christian Schabesberger
a1479d04df fixed some searchengine errors 2016-02-21 21:08:14 +01:00
rrooij
d12af16f46 VideoItemDetailFragment: check for next vid
Check if the next video is available before loading the thumbnails.
2016-02-21 19:07:24 +01:00
rrooij
2edfcb78fe YTStreamExtractor: implement getAgeRestriction 2016-02-21 18:45:28 +01:00
rrooij
3f0947fa5b Add unit test for restricted YouTube videos 2016-02-21 18:25:18 +01:00
rrooij
d2b808e540 YTStreamExtractor: fix audio tracks on restricted
Fix audio tracks on restriced videos.
2016-02-21 18:24:53 +01:00
Christian Schabesberger
2995a7dc8f actual fix for androi 6.0 notification problem
Notification buttons weren't respondig to clicks. Now they do.
2016-02-21 18:12:00 +01:00
Christian Schabesberger
819db0a30b antifix for android 6.0 notification z order problem 2016-02-21 17:55:00 +01:00
rrooij
4d727245e1 YTStreamExtractor: add support for age restricted
YouTube age restricted videos are now kind of supported. This is not a
final solution to this problem and this commit still crashes because of
some problem with the thumbnail.
2016-02-21 16:39:08 +01:00
Weblate
d8281aeb34 Merge remote-tracking branch 'origin/master' 2016-02-21 01:40:55 +01:00
LelixSuper
cd0f2061b5 Translated using Weblate (Italian)
Currently translated at 100.0% (68 of 68 strings)
2016-02-21 01:40:55 +01:00
Christian Schabesberger
96928d46ca Merge pull request #199 from szafir1100/develop
used regex to delete spaces inside parseLong() argument
2016-02-21 01:40:50 +01:00
LelixSuper
6d55ac2199 Translated using Weblate (Italian)
Currently translated at 100.0% (68 of 68 strings)
2016-02-20 15:16:59 +01:00
Tomasz Marzeion
80dae6ece7 used regex to delete spaces inside parseLong() argument 2016-02-20 13:49:47 +01:00
Matej U
a1a12ca9f7 Translated using Weblate (Slovenian)
Currently translated at 100.0% (68 of 68 strings)
2016-02-19 15:46:49 +01:00
Christian Schabesberger
5a594173fa Merge pull request #193 from satiricon/fix-autoplay
Fix ArrayIndexOutOfBoundsException when using autoplay
2016-02-19 15:14:06 +01:00
Christian Schabesberger
1e989945b9 moved on to 0.7.5 2016-02-19 14:40:49 +01:00
Christian Schabesberger
679bef849c Merge branch 'master' of github.com:theScrabi/NewPipe 2016-02-19 14:40:20 +01:00
Christian Schabesberger
1c17be9760 made new notification layout available for older platforms 2016-02-19 13:22:49 +01:00
naofum
6def0e3115 Translated using Weblate (Japanese)
Currently translated at 100.0% (68 of 68 strings)
2016-02-19 12:51:38 +01:00
David
fd3436d5c0 Fix ArrayIndexOutOfBoundsException when using autoplay 2016-02-18 13:40:26 -03:00
Christian Schabesberger
a94f9fd3e5 made the ui react on missing information 2016-02-18 13:49:01 +01:00
Christian Schabesberger
77850464d4 renamed crawler into extractor 2016-02-18 11:50:22 +01:00
Christian Schabesberger
3e9edba189 fix broken unit test 2016-02-18 11:47:21 +01:00
Christian Schabesberger
3d168542fe add arabic translation 2016-02-18 00:00:47 +01:00
Christian Schabesberger
0de00e26d8 Merge branch 'master' of github.com:theScrabi/NewPipe 2016-02-17 23:55:32 +01:00
Christian Schabesberger
f0705c612e removed play fab button 2016-02-17 23:55:19 +01:00
Christian Schabesberger
648b9b5d02 made the ui more accommodating for not available audio streams 2016-02-17 21:39:41 +01:00
Christian Schabesberger
b15a0b92f9 add support for attribution_link links 2016-02-17 20:29:31 +01:00
Christian Schabesberger
80482c0578 made settings_keys unsupportable 2016-02-17 19:23:23 +01:00
Weblate
16701923a1 Merge remote-tracking branch 'origin/master' 2016-02-17 19:21:20 +01:00
kamadi
67cee06523 Translated using Weblate (Russian)
Currently translated at 80.5% (54 of 67 strings)
2016-02-17 19:21:20 +01:00
Omar Kharrab
685dab39af Translated using Weblate (French)
Currently translated at 97.0% (65 of 67 strings)
2016-02-17 19:21:19 +01:00
David Duong
0ff9555cc4 Translated using Weblate (Czech)
Currently translated at 100.0% (67 of 67 strings)
2016-02-17 18:44:14 +01:00
Robin van der Vliet
4f808dd17d Translated using Weblate (Dutch)
Currently translated at 65.6% (44 of 67 strings)
2016-02-17 00:44:16 +01:00
vadin
69d71dac36 Translated using Weblate (Spanish)
Currently translated at 100.0% (67 of 67 strings)
2016-02-16 23:18:33 +01:00
Jossi Wolf
4880319991 Translated using Weblate (German)
Currently translated at 98.5% (66 of 67 strings)
2016-02-16 21:44:52 +01:00
Robin van der Vliet
13b9850b39 Translated using Weblate (Esperanto)
Currently translated at 100.0% (67 of 67 strings)

Imperative because it is a command to the user.
2016-02-16 17:29:05 +01:00
Robin van der Vliet
366f645eda Translated using Weblate (Esperanto)
Currently translated at 97.0% (65 of 67 strings)

Translated "media center" just as "application", if somebody has a better translation please change it.
2016-02-16 17:28:40 +01:00
Robin van der Vliet
dcf7190c90 Translated using Weblate (Esperanto)
Currently translated at 91.0% (61 of 67 strings)

elŝutujo = container for downloads
2016-02-16 17:22:13 +01:00
Robin van der Vliet
ae6647276c Translated using Weblate (Esperanto)
Currently translated at 86.5% (58 of 67 strings)

A bit long
2016-02-16 17:14:35 +01:00
Robin van der Vliet
460ff37f7a Translated using Weblate (Esperanto)
Currently translated at 79.1% (53 of 67 strings)

A bit long because
2016-02-16 17:05:14 +01:00
Robin van der Vliet
e7ef913416 Translated using Weblate (Esperanto)
Currently translated at 77.6% (52 of 67 strings)

Added "the app" because the accusative cannot really go on the word "Kore"
2016-02-16 17:03:53 +01:00
Robin van der Vliet
c149050a3a Translated using Weblate (Esperanto)
Currently translated at 71.6% (48 of 67 strings)

Added "the app" because the accusative cannot really go on the word "VLC"
2016-02-16 16:59:18 +01:00
Robin van der Vliet
a4e5ca54db Translated using Weblate (Esperanto)
Currently translated at 70.1% (47 of 67 strings)

Intent untranslated because there is not really a common translation. If somebody has a better translation, please change it.
2016-02-16 16:58:13 +01:00
Robin van der Vliet
cb81fd3353 Translated using Weblate (Esperanto)
Currently translated at 68.6% (46 of 67 strings)

Added "the program" because the accusative cannot really go on the word "Tor"
2016-02-16 16:57:28 +01:00
Farid
3a8611ebf8 Added ExoPlayer support 2016-02-15 18:49:58 -08:00
David Duong
352a883b5d Translated using Weblate (Czech)
Currently translated at 100.0% (67 of 67 strings)
2016-02-15 18:04:52 +01:00
David Duong
5247b22ef4 Translated using Weblate (Czech)
Currently translated at 100% (0 of 0 strings)

Created new translation.
2016-02-15 17:33:44 +01:00
Robin van der Vliet
1bf00e80b0 Translated using Weblate (Esperanto)
Currently translated at 67.1% (45 of 67 strings)
2016-02-14 23:57:46 +01:00
Robin van der Vliet
6331d9b7a4 Translated using Weblate (Esperanto)
Currently translated at 100% (0 of 0 strings)

Created new translation.
2016-02-14 23:44:51 +01:00
Marian Hanzel
0deb0ad851 Translated using Weblate (Slovak)
Currently translated at 100.0% (67 of 67 strings)
2016-02-14 21:45:11 +01:00
Matej U
3b42041c4e Translated using Weblate (Slovenian)
Currently translated at 100.0% (67 of 67 strings)
2016-02-14 21:23:03 +01:00
Benedikt Freisen
d8987aa94a Translated using Weblate (German)
Currently translated at 98.5% (66 of 67 strings)

Where readable and unambiguous, the compound-noun-spelling without hyphen is usually preferred.
2016-02-14 21:06:39 +01:00
Mladen Pejaković
19ed16efc6 Translated using Weblate (Serbian)
Currently translated at 100.0% (67 of 67 strings)
2016-02-14 11:33:57 +01:00
Benedikt Freisen
0e32d70aef Translated using Weblate (German)
Currently translated at 98.5% (66 of 67 strings)
2016-02-12 22:59:12 +01:00
Marian Hanzel
5b71f279fd Translated using Weblate (Slovak)
Currently translated at 100.0% (67 of 67 strings)
2016-02-12 19:59:06 +01:00
Marian Hanzel
6d170ffb16 Translated using Weblate (Slovak)
Currently translated at 100% (0 of 0 strings)

Created new translation.
2016-02-12 19:29:38 +01:00
Christian Schabesberger
72d90374a0 moved on to 0.7.4 2016-02-12 15:32:16 +01:00
Christian Schabesberger
fc8160acda fixed autoplay bug 2016-02-12 15:29:11 +01:00
Christian Schabesberger
751ffb9de9 quick and dirty solution for download/audio bug
Youtube has changed (again) this time it was a bit harder,
therfor the changes are deeper. May be still a bit unstable.
2016-02-12 01:29:14 +01:00
Christian Schabesberger
60d636940d set orbot/tor support into experimental status 2016-02-10 12:09:43 +01:00
Christian Schabesberger
7a5cca519a Merge branch 'master' of github.com:theScrabi/NewPipe 2016-02-08 18:46:56 +01:00
Christian Schabesberger
1e93d06a25 restructured ActionbarHandler 2016-02-08 18:46:42 +01:00
naofum
4341f8aaec Translated using Weblate (Japanese)
Currently translated at 100.0% (67 of 67 strings)
2016-02-08 12:44:42 +01:00
Licaon Kter
46022d60f3 Translated using Weblate (Romanian)
Currently translated at 100% (0 of 0 strings)

Created new translation.
2016-02-07 22:16:35 +01:00
Sérgio Marques
80ddc76926 Translated using Weblate (Portuguese)
Currently translated at 100.0% (67 of 67 strings)
2016-02-06 23:07:05 +01:00
naofum
bd999b4b0a Translated using Weblate (Japanese)
Currently translated at 100.0% (67 of 67 strings)
2016-02-06 11:42:08 +01:00
Christian Schabesberger
4cdc387338 Merge branch 'master' of github.com:theScrabi/NewPipe 2016-02-05 17:14:18 +01:00
Christian Schabesberger
df258a0003 Merge branch 'algoprog-master' 2016-02-05 17:10:00 +01:00
Christian Schabesberger
7cc1c0fbdd merge code, and adjust code 2016-02-05 17:09:29 +01:00
Mladen Pejaković
42644c956b Translated using Weblate (Serbian)
Currently translated at 100.0% (67 of 67 strings)
2016-02-05 14:50:14 +01:00
Weblate
00eaedcbfa Merge remote-tracking branch 'origin/master' 2016-02-05 14:38:53 +01:00
Chris Samarinas
1ff5a97c85 Translated using Weblate (Greek)
Currently translated at 100.0% (61 of 61 strings)
2016-02-05 14:38:52 +01:00
Christian Schabesberger
241414f81b Merge pull request #167 from theScrabi/crawlerRefactor
Crawler refactor
2016-02-05 14:38:48 +01:00
Christian Schabesberger
1bf046a8ba made all arrays into lists 2016-02-05 14:09:04 +01:00
Christian Schabesberger
61471fdd3c renamed UrlIdHandler into VideoUrlIdHandler 2016-02-05 13:34:44 +01:00
Allan Nordhøy
a0524fb136 Translated using Weblate (Norwegian Bokmål)
Currently translated at 100.0% (61 of 61 strings)
2016-02-05 01:55:35 +01:00
Allan Nordhøy
fa39389a64 Translated using Weblate (Norwegian Bokmål)
Currently translated at 100% (0 of 0 strings)

Created new translation.
2016-02-05 01:38:27 +01:00
Chris Samarinas
697a24e699 Translated using Weblate (Greek)
Currently translated at 100.0% (61 of 61 strings)
2016-02-04 06:10:42 +01:00
Chris Samarinas
cf3bb87a54 Translated using Weblate (Greek)
Currently translated at 100% (0 of 0 strings)

Created new translation.
2016-02-04 05:46:47 +01:00
Christian Schabesberger
14fb7d8a7a fixed failing tests 2016-02-02 19:01:53 +01:00
Christian Schabesberger
d097363b24 restructure parser 2016-02-02 18:43:20 +01:00
Christian Schabesberger
bad576c23d got rid of getVideoInfo() in youtube crawler 2016-02-02 14:06:09 +01:00
Weblate
8d9e4e7442 Merge remote-tracking branch 'origin/master' 2016-02-01 13:44:46 +01:00
Christian Schabesberger
431d03c63f Merge branch 'master' of github.com:theScrabi/NewPipe 2016-02-01 13:46:01 +01:00
Christian Schabesberger
24321731d9 Merge branch 'iit2014086-master' 2016-02-01 13:45:44 +01:00
Christian Schabesberger
fddcade1fb removed unnececeary call of setVolumeControlStream() 2016-02-01 13:45:22 +01:00
theshayy
a0aa7dcdc1 Translated using Weblate (French)
Currently translated at 100.0% (61 of 61 strings)
2016-02-01 13:44:46 +01:00
Teja Vojjala
d3e9f354b3 Update SettingsActivity.java 2016-02-01 15:00:08 +05:30
Teja Vojjala
e958334406 Update VideoItemListActivity.java 2016-02-01 14:29:49 +05:30
Teja Vojjala
a42029970d Update VideoItemDetailActivity.java 2016-02-01 14:29:28 +05:30
Teja Vojjala
2108e09e13 Update PlayVideoActivity.java 2016-02-01 14:28:38 +05:30
Teja Vojjala
8c010093e8 Update SettingsActivity.java 2016-02-01 14:27:24 +05:30
Teja Vojjala
adc98be441 Update PanicResponderActivity.java 2016-02-01 14:25:23 +05:30
Christian Schabesberger
fb942912db disable gema test agian 2016-01-31 20:16:21 +01:00
Christian Schabesberger
7f12b58722 use java error system in the crawler 2016-01-31 19:57:30 +01:00
Éfrit
05d58f8f98 Translated using Weblate (French)
Currently translated at 100.0% (61 of 61 strings)
2016-01-31 12:49:00 +01:00
Christian Schabesberger
46c2db310a add suport for dash 2016-01-30 00:22:16 +01:00
Teja Vojjala
607408b9b9 Update PanicResponderActivity.java 2016-01-29 20:21:44 +05:30
Teja Vojjala
b81e8cb81a Update SettingsActivity.java 2016-01-29 20:20:55 +05:30
Teja Vojjala
44ef04d90a Update PlayVideoActivity.java 2016-01-29 20:19:09 +05:30
Teja Vojjala
3e9d84b109 Merge pull request #2 from iit2014086/iit2014086-patch-2
Update VideoItemDetailActivity.java
2016-01-29 20:17:24 +05:30
Teja Vojjala
aa2d8d4833 Update VideoItemDetailActivity.java 2016-01-29 20:16:57 +05:30
Teja Vojjala
55f63b948b Merge pull request #1 from iit2014086/iit2014086-patch-1
Update VideoItemListActivity.java
2016-01-29 20:09:13 +05:30
Teja Vojjala
cece543d6b Update VideoItemListActivity.java 2016-01-29 20:07:15 +05:30
Christian Schabesberger
9204a89319 fiexed some licence headers 2016-01-28 23:27:16 +01:00
Christian Schabesberger
f8ed96bb25 renamed services into crawer 2016-01-28 21:34:35 +01:00
Christian Schabesberger
54d318bf04 detatch android related downloader from crawler 2016-01-28 21:21:19 +01:00
Christian Schabesberger
f152d66cd8 fixed some bugs 2016-01-28 12:10:50 +01:00
Sérgio Marques
576786c751 Translated using Weblate (Portuguese)
Currently translated at 100.0% (61 of 61 strings)
2016-01-19 00:22:40 +01:00
halcyonest
a6b7cd3202 Translated using Weblate (Korean)
Currently translated at 100.0% (61 of 61 strings)
2016-01-16 12:44:51 +01:00
Yoo
ea9caaaaf0 Translated using Weblate (Hungarian)
Currently translated at 96.7% (59 of 61 strings)
2016-01-14 21:44:37 +01:00
Matej U
22d8f434be Translated using Weblate (Slovenian)
Currently translated at 100.0% (61 of 61 strings)
2016-01-14 15:45:12 +01:00
halcyonest
8360c10141 Translated using Weblate (Korean)
Currently translated at 100.0% (61 of 61 strings)
2016-01-12 10:14:37 +01:00
Matej U
750dc6f2cc Translated using Weblate (Slovenian)
Currently translated at 100.0% (61 of 61 strings)
2016-01-10 14:22:05 +01:00
riotism
47b556544d Translated using Weblate (Chinese (Taiwan))
Currently translated at 100.0% (61 of 61 strings)
2016-01-09 23:06:53 +01:00
riotism
f6cee739a6 Translated using Weblate (Chinese (Hong Kong))
Currently translated at 100.0% (61 of 61 strings)
2016-01-09 23:02:34 +01:00
riotism
d1afe0028c Translated using Weblate (Chinese (China))
Currently translated at 100.0% (61 of 61 strings)
2016-01-09 22:59:42 +01:00
M2ck
a4cace1ef7 Translated using Weblate (French)
Currently translated at 100.0% (61 of 61 strings)
2016-01-09 20:55:00 +01:00
red
707ac8be27 Translated using Weblate (French)
Currently translated at 81.9% (50 of 61 strings)
2016-01-09 20:37:38 +01:00
Weblate
2f2254966a Merge remote-tracking branch 'origin/master' 2016-01-09 15:04:05 +01:00
Christian Schabesberger
eb57675f55 Translated using Weblate (German)
Currently translated at 100.0% (61 of 61 strings)
2016-01-09 15:04:05 +01:00
Christian Schabesberger
dde93c5ccf Translated using Weblate (English)
Currently translated at 100.0% (61 of 61 strings)
2016-01-09 15:04:05 +01:00
Christian Schabesberger
886b5959f7 Merge pull request #149 from narutosanjiv/master
ProgressBar must stop incase of network failure
2016-01-09 15:04:02 +01:00
naofum
dc44546ac7 Translated using Weblate (Japanese)
Currently translated at 100.0% (61 of 61 strings)
2016-01-09 13:38:56 +01:00
Sanjiv Jha
42c6698732 ProgressBar must stop incase of network failure in videolist & detail page 2016-01-09 16:39:31 +05:30
Mladen Pejaković
bd014a107f Translated using Weblate (Serbian)
Currently translated at 100.0% (61 of 61 strings)
2016-01-09 02:36:00 +01:00
Christian Schabesberger
3a7298bb99 Translated using Weblate (German)
Currently translated at 100.0% (61 of 61 strings)
2016-01-09 00:09:55 +01:00
Christian Schabesberger
aa06e3490d Merge branch 'master' of github.com:theScrabi/NewPipe 2016-01-08 22:22:55 +01:00
Christian Schabesberger
ece889b36b moved on to 0.7.3 2016-01-08 22:22:39 +01:00
Christian Schabesberger
9848f19ce6 Merge github.com:k3b/NewPipe into k3bMaster 2016-01-08 22:04:42 +01:00
Weblate
e59b087057 Merge remote-tracking branch 'origin/master' 2016-01-08 22:00:27 +01:00
Greg
5b451d1ac7 Translated using Weblate (Spanish)
Currently translated at 64.2% (36 of 56 strings)
2016-01-08 22:00:27 +01:00
Greg
f050c05b3c Translated using Weblate (Russian)
Currently translated at 98.2% (55 of 56 strings)
2016-01-08 22:00:27 +01:00
Sérgio Marques
06b8edefbf Translated using Weblate (Portuguese)
Currently translated at 100.0% (56 of 56 strings)
2016-01-08 22:00:26 +01:00
Greg
f3a2a28398 Translated using Weblate (German)
Currently translated at 91.0% (51 of 56 strings)
2016-01-08 22:00:26 +01:00
Greg
9b0a1fc2ec Translated using Weblate (English)
Currently translated at 100.0% (56 of 56 strings)
2016-01-08 22:00:26 +01:00
riotism
c87ab234eb Translated using Weblate (Chinese (Taiwan))
Currently translated at 100.0% (56 of 56 strings)
2016-01-08 22:00:25 +01:00
riotism
68468756a8 Translated using Weblate (Chinese (Hong Kong))
Currently translated at 100.0% (56 of 56 strings)
2016-01-08 22:00:24 +01:00
riotism
9016df0195 Translated using Weblate (Chinese (China))
Currently translated at 100.0% (56 of 56 strings)
2016-01-08 22:00:24 +01:00
Christian Schabesberger
7acece9705 Merge pull request #145 from 42SK/master
Fixed #143
2016-01-08 22:00:21 +01:00
red
d1896c23c0 Translated using Weblate (French)
Currently translated at 100.0% (56 of 56 strings)
2016-01-08 14:04:29 +01:00
riotism
dae19f03e0 Translated using Weblate (Chinese (China))
Currently translated at 100.0% (56 of 56 strings)
2016-01-07 23:07:42 +01:00
riotism
9dafccf0f7 Translated using Weblate (Chinese (China))
Currently translated at 100% (0 of 0 strings)

Created new translation.
2016-01-07 22:46:44 +01:00
riotism
5f270c41ae Translated using Weblate (Chinese (Taiwan))
Currently translated at 100.0% (56 of 56 strings)
2016-01-07 22:46:12 +01:00
riotism
f9f80e9003 Translated using Weblate (Chinese (Taiwan))
Currently translated at 100% (0 of 0 strings)

Created new translation.
2016-01-07 22:08:02 +01:00
riotism
c5063d4269 Translated using Weblate (Chinese (Hong Kong))
Currently translated at 100.0% (56 of 56 strings)
2016-01-07 22:06:57 +01:00
riotism
ccbe18ec1c Translated using Weblate (Chinese (Hong Kong))
Currently translated at 100% (0 of 0 strings)

Created new translation.
2016-01-07 21:21:58 +01:00
k3b
321a8a8b25 Translated using Weblate (German)
Currently translated at 91.0% (51 of 56 strings)
2016-01-07 20:20:57 +01:00
k3b
77a9560376 #143 #44 #42 #22: Fixed some download problems with invalid directories or filenames. Added user Feedback. Different settings for audio and video download dir. 2016-01-07 14:32:16 +01:00
k3b
058a039a82 #143 #44 #42 #22: Fixed some download problems with invalid directories or filenames. Added user Feedback. Different settings for audio and video download dir. 2016-01-07 14:22:55 +01:00
naofum
7c744703e4 Translated using Weblate (Japanese)
Currently translated at 100.0% (56 of 56 strings)
2016-01-07 14:15:56 +01:00
42SK
a934cbb085 Fixed #143 2016-01-07 13:28:17 +01:00
Sérgio Marques
cf4158c0d0 Translated using Weblate (Portuguese)
Currently translated at 100.0% (56 of 56 strings)
2016-01-07 00:48:13 +01:00
M2ck
dc56eab9b6 Translated using Weblate (French)
Currently translated at 100.0% (56 of 56 strings)
2016-01-06 16:47:54 +01:00
Weblate
37d1f59132 Merge remote-tracking branch 'origin/master' 2016-01-06 15:13:03 +01:00
Christian Schabesberger
ab0ce55411 merge unitTesting 2016-01-06 15:13:55 +01:00
Matej U
c1d66596d1 Translated using Weblate (Slovenian)
Currently translated at 100.0% (56 of 56 strings)
2016-01-06 15:13:03 +01:00
Mladen Pejaković
cbfccdf0d3 Translated using Weblate (Serbian)
Currently translated at 100.0% (56 of 56 strings)
2016-01-06 15:13:02 +01:00
Christian Schabesberger
9362037177 remove theme option since it's not yet working 2016-01-06 15:00:33 +01:00
Matej U
e25c93bae2 Translated using Weblate (Slovenian)
Currently translated at 100.0% (56 of 56 strings)
2016-01-06 09:28:10 +01:00
Mladen Pejaković
367c434010 Translated using Weblate (Serbian)
Currently translated at 100.0% (56 of 56 strings)
2016-01-05 23:54:30 +01:00
chschtsch
02d8463e15 rename resource 2016-01-06 00:02:10 +03:00
Christian Schabesberger
9d5a1d5c43 removed unnececeary comment 2016-01-05 21:54:40 +01:00
Christian Schabesberger
c8d94f541f resolved merge conflict 2016-01-05 21:50:25 +01:00
Christian Schabesberger
27d06eaa6b removed hardcoded string, and add licece to some files. 2016-01-05 21:41:55 +01:00
Christian Schabesberger
7f32857e00 buxfix 2016-01-05 21:23:16 +01:00
chschtsch
2f060f0f52 merging with eb0df2b 2016-01-05 23:16:50 +03:00
chschtsch
f89d405226 merging with eb0df2b 2016-01-05 23:13:52 +03:00
chschtsch
fd4459e570 Merge branch 'master' of github.com:theScrabi/NewPipe 2016-01-05 23:12:22 +03:00
Christian Schabesberger
eb0df2b101 set download path on startup 2016-01-05 21:11:15 +01:00
chschtsch
6c178cfb7e add back missing like button margin 2016-01-05 23:09:15 +03:00
chschtsch
8ced68430d update resources names to match naming convention & cleanup & start working on themes 2016-01-05 22:56:40 +03:00
Aitor Beriain
0aade598ff Translated using Weblate (Basque)
Currently translated at 100.0% (53 of 53 strings)
2016-01-04 20:02:01 +01:00
Aitor Beriain
95949fd1ab Translated using Weblate (Basque)
Currently translated at 100% (0 of 0 strings)

Created new translation.
2016-01-04 19:35:11 +01:00
naofum
1a56382112 Translated using Weblate (Japanese)
Currently translated at 100.0% (53 of 53 strings)
2016-01-04 11:51:32 +01:00
Adam Howard
d610e4b19b minor code tweaks to BackgroundPlayer 2016-01-04 01:51:24 +00:00
Adam Howard
fc44d9e36e Merge branch 'master' of github.com:theScrabi/NewPipe 2016-01-04 01:15:33 +00:00
Adam Howard
c07686576a possible fix for expandedView bug in BackgroundPlayer 2016-01-04 01:15:13 +00:00
Weblate
c2400aea4d Merge remote-tracking branch 'origin/master' 2016-01-04 00:11:51 +01:00
Benedikt Geißler
fb4bf0dde4 Translated using Weblate (German)
Currently translated at 98.1% (52 of 53 strings)
2016-01-04 00:11:51 +01:00
Christian Schabesberger
e4f638d1ce Merge branch 'master' of github.com:theScrabi/NewPipe 2016-01-04 00:11:00 +01:00
Christian Schabesberger
5c492c01a1 adjusted orbot support and moved on to 0.7.2 2016-01-04 00:10:51 +01:00
M2ck
f451e11f82 Translated using Weblate (French)
Currently translated at 100.0% (53 of 53 strings)
2016-01-03 20:55:44 +01:00
Adam Howard
95b73f35f7 Merge branch 'master' of github.com:theScrabi/NewPipe 2016-01-03 19:44:13 +00:00
Adam Howard
58147e9e12 removed commented code in BackgroundPlayer 2016-01-03 19:44:04 +00:00
Christian Schabesberger
a8830e2ede preference screen previews set values 2016-01-03 19:55:04 +01:00
Mladen Pejaković
9804bb95cc Translated using Weblate (Serbian)
Currently translated at 100.0% (53 of 53 strings)
2016-01-03 19:12:16 +01:00
Christian Schabesberger
0da1aef763 Merge pull request #136 from eighthave/tor-support-for-all-except-streaming
Tor support for all except streaming
2016-01-03 17:40:02 +01:00
M2ck
0a334804a3 Translated using Weblate (French)
Currently translated at 100.0% (51 of 51 strings)
2016-01-03 16:56:51 +01:00
naofum
94d2f03e9b Translated using Weblate (Japanese)
Currently translated at 100.0% (51 of 51 strings)
2016-01-03 10:31:40 +01:00
Hans-Christoph Steiner
9127f7f0c2 make progress notification for Tor downloader (closes #39) 2016-01-03 00:04:55 +01:00
Hans-Christoph Steiner
0bb0226bc2 download files via Tor when Tor is enabled
DownloadManager does not let you set its proxy or change how it connects to
the internet.  So we have to make a custom one, unfortunately.  This is a
very basic downloader with none of the special sauce that makes the
built-in DownloadManager handy.
2016-01-02 22:47:21 +01:00
Hans-Christoph Steiner
b3a1a5dcc2 Android provides global vars for the actual download directories 2016-01-02 21:53:48 +01:00
Hans-Christoph Steiner
984dd1cc25 checking on "Use Tor" when Orbot is not installed starts install
If the user turns on "Use Tor" and they are missing Orbot, bring them to
the screen to install Tor.
2016-01-02 21:21:34 +01:00
Hans-Christoph Steiner
5663e543a4 whenever an Activity resumes and tor is enabled, request it start
This makes sure that Orbot is running when the user expects it to be. If
NewPipe is configured to use Tor, then going to a NewPipe screen should
ensure Tor is running.
2016-01-02 21:21:34 +01:00
Hans-Christoph Steiner
d3879a0398 setup Tor at app start, and config immediately when pref is changed
This adds an Application subclass to get the onCreate() method, which is
called once at the first start up of the app, before any Activity starts.
Tor is configured there to ensure it is setup before anything happens.

This also moves the "Use Tor" pref listener to a more appropriate place.
2016-01-02 21:21:34 +01:00
Hans-Christoph Steiner
6bd2468d44 if Orbot is installed, then default to using Tor
If the user has not changed the "Use Tor" preference, then the default
should be to use Tor if Orbot is installed. The user can still override it
by going an unchecking "Use Tor".
2016-01-02 21:21:34 +01:00
Hans-Christoph Steiner
e63d43151b add a title plus summary to "Use Tor" preference 2016-01-02 21:21:33 +01:00
Hans-Christoph Steiner
0265da4ae6 use HttpsURLConnections since youtube.com always uses HTTPS
This helps enforce that the connection is encrypted. If for whatever reason
an unencrypted connection is created, an Exception will be thrown.
2016-01-02 21:21:28 +01:00
GDR!
ef255d12ae Test tor code 2016-01-02 20:22:05 +01:00
Matej U
eeb612f9a2 Translated using Weblate (Slovenian)
Currently translated at 100.0% (51 of 51 strings)
2016-01-02 19:48:51 +01:00
Mladen Pejaković
dfcb4edb81 Translated using Weblate (Serbian)
Currently translated at 100.0% (51 of 51 strings)
2016-01-02 18:04:01 +01:00
Christian Schabesberger
d3500e9036 removed onion routing from readme 2016-01-02 17:41:33 +01:00
Christian Schabesberger
adcb8c6469 add c3s thumbnail and moved on to 0.7.1 2016-01-02 17:40:58 +01:00
Christian Schabesberger
592eee7d3d Merge pull request #134 from eighthave/intent-filters-and-other-fixes
Intent filters and other fixes
2016-01-02 16:18:56 +01:00
Christian Schabesberger
7dadb2b26c fixed close notification problem 2016-01-02 16:08:18 +01:00
Hans-Christoph Steiner
7cbb135f28 include Tibetan as a language option
The Tibetan alphabet was only recently included on Android, so the language
name needs to also have the English there.  Otherwise it'll appear blank
on devices without Tibetan.
2016-01-02 12:15:56 +01:00
Hans-Christoph Steiner
966ac0673c gradle.properties is only commented out defaults, so remove from git
For anyone who tweaks this file for local settings, it becomes painful
to have it committed in git because those changes which are only
relevant to the local setup will show up in git as changed.
2016-01-02 01:35:29 +01:00
Hans-Christoph Steiner
d715eae0d1 route video downloads to "Movies" and audio to "Music"
use the standard Android folders when downloading files.
2016-01-02 01:34:18 +01:00
Hans-Christoph Steiner
ccdd13d136 youtube URLs can also come from media searches and NFC sends 2016-01-02 00:15:27 +01:00
Hans-Christoph Steiner
efe5de4c75 support youtube's custom URL schemes (vnd.youtube: and vnd.youtube.launch:) 2016-01-02 00:15:27 +01:00
Hans-Christoph Steiner
2a93e9bd2e precisely target these URLs https://www.youtube.com/watch?v=mS1gstS6YS8
These URLs have a Path that always starts with "/watch" so no need for a
pattern.  Also, everything after the "?" is considered the "Query String",
not the Path.  Anything after a "#" is the "Feature String".  The path
matching in IntentFilters only see the Path, and nothing from the "Query
String" or "Feature String".

these are the available kinds of URLs:
https://developer.apple.com/library/ios/featuredarticles/iPhoneURLScheme_Reference/YouTubeLinks/YouTubeLinks.html
2016-01-02 00:15:27 +01:00
Hans-Christoph Steiner
28dd53ae50 support another youtube URL format: https://www.youtube.com/v/mS1gstS6YS8
https://developer.apple.com/library/ios/featuredarticles/iPhoneURLScheme_Reference/YouTubeLinks/YouTubeLinks.html
2016-01-02 00:15:27 +01:00
Hans-Christoph Steiner
3c1e64d8dc simplify youtube URL IntentFilters
Each <data> elements applies to the whole IntentFilter, so there is no need
to declare the host, scheme, etc. multiple times within a single
IntentFilter.

Also, pathPrefix="/" will match all paths, so it is unnecessary.
2016-01-02 00:15:27 +01:00
Hans-Christoph Steiner
4fe3cb2bca use symlinks to provide alternate folders for Hebrew and Indonesian
These two languages must be included twice (iw/he and id/in)

For a full discussion of why, see:
https://gitlab.com/fdroid/fdroidclient/issues/139
https://stackoverflow.com/questions/5074769/cyanogenmod-translate-a-project/8470980#8470980
https://stackoverflow.com/questions/8393771/android-not-using-finding-my-hebrew-localization

I included a blank placeholder file for Indonesian, it can be simply
replaced by the real one, whenever that comes along.
2016-01-02 00:15:27 +01:00
Hans-Christoph Steiner
b31490c4e3 make all strings translatable 2016-01-02 00:14:35 +01:00
Hans-Christoph Steiner
5533f6ba86 use the standard "Movies" folder for downloads
On all of the devices that I've checked, there is a folder called "Movies"
on the SD Card by default.  NewPipe should use that standard location
since it is always downloading movies :).  People can always change that
via the preferences.

Also, this makes the defaults the same when creating the dir and when
setting the destination URL.
2016-01-02 00:14:11 +01:00
Weblate
8aa5f87a1c Merge remote-tracking branch 'origin/master' 2016-01-01 15:47:36 +01:00
Greg
6deb674377 Translated using Weblate (Hebrew)
Currently translated at 16.6% (8 of 48 strings)
2016-01-01 15:47:36 +01:00
Christian Schabesberger
12d1d998a3 Merge pull request #133 from eighthave/panic-button-support
allow "panic button" apps to wipe activity
2016-01-01 15:47:32 +01:00
Christian Schabesberger
d90162d06f ugly workaround for GEMA test failing 2016-01-01 15:43:06 +01:00
Christian Schabesberger
97c924341c inital YoutubeExtractor test 2016-01-01 15:26:03 +01:00
Hans-Christoph Steiner
e91fc225e1 after receiving panic trigger, quit remove from history
This makes the app fully exit, and removes it from the Recent Apps listing
with the goal of hiding whatever the user was currently watching, and/or
searching for.

PanicKit provides a common framework for creating "panic button" apps that
can trigger actions in "panic responder" apps.  In this case, the response
is to lock the app, if it has been configured to do so

https://dev.guardianproject.info/projects/panic/wiki
2015-12-31 21:53:14 +01:00
M2ck
43149fd832 Translated using Weblate (French)
Currently translated at 100.0% (48 of 48 strings)
2015-12-31 10:27:52 +01:00
Greg
78df579703 Translated using Weblate (Hebrew)
Currently translated at 100% (0 of 0 strings)

Created new translation.
2015-12-29 21:45:44 +01:00
Greg
f61b915894 Translated using Weblate (Russian)
Currently translated at 100.0% (48 of 48 strings)
2015-12-29 21:45:08 +01:00
Christian Schabesberger
cd3f405bff slightly improved YoutubeSearchEngineTest 2015-12-29 21:41:10 +01:00
Christian Schabesberger
7cfdca7a81 remove failing test again 2015-12-29 21:28:27 +01:00
Christian Schabesberger
216063dba8 test if CI failes on failing test 2015-12-29 21:16:18 +01:00
Christian Schabesberger
b647bacd72 add testcase for YoutubeSearchEngine 2015-12-29 21:05:02 +01:00
Christian Schabesberger
4f77937e3e Merge pull request #131 from chschtsch/refactor
refactor localization
2015-12-29 19:14:55 +01:00
chschtsch
48e299b2ac code cleanup 2015-12-29 17:53:24 +03:00
chschtsch
40f00af196 refactor localization 2015-12-29 17:35:51 +03:00
Christian Schabesberger
bd6cc22e63 small hacky error handling refactoring, and add link to c3s 2015-12-28 00:32:38 +01:00
naofum
8760792426 Translated using Weblate (Japanese)
Currently translated at 100.0% (48 of 48 strings)
2015-12-26 12:33:33 +01:00
Christian Schabesberger
870b0bf7aa Merge pull request #127 from 912d/download-directory
Added visible notification after succesful download
2015-12-25 21:27:45 +01:00
Jacek Musiał
afd0bd4318 Added visible notification after succesful downloads
After succesful download, notification will stay in notification bar. I
used "VISIBILITY_VISIBLE_NOTIFY_COMPLETED"  key.
2015-12-25 19:28:09 +01:00
Jacek Musiał
f829ac1d34 Merge remote-tracking branch 'refs/remotes/theScrabi/master' into download-directory 2015-12-25 19:25:13 +01:00
Christian Schabesberger
86a0177855 Merge pull request #126 from Adam77Root/master
Fix view count parsing for large numbers
2015-12-25 16:02:10 +01:00
Adam77Root
718d4fd0bd Fix view count parsing for large numbers 2015-12-25 15:03:11 +01:00
Mladen Pejaković
365137c32b Translated using Weblate (Serbian)
Currently translated at 100.0% (48 of 48 strings)
2015-12-25 00:22:26 +01:00
Christian Schabesberger
e83ca0dfda some improvements for background player 2015-12-25 00:09:35 +01:00
Christian Schabesberger
6a9f6ef651 Merge pull request #123 from 912d/download-directory
Added check if directory exist and try create it
2015-12-23 23:20:42 +01:00
Jacek Musiał
99122ccc03 added check if directory exist and try create it
Also I added new variable `'final File dir`' with value of key
"download_path_preference" or externalStorageDirectory.
Firstly I check if dir exits, then eventually try to create it and next
- download file.
2015-12-23 17:52:01 +01:00
Christian Schabesberger
97923697e1 fixed small writing erros in the README 2015-12-23 14:31:57 +01:00
Greg
68888b15e0 Merge pull request #121 from chschtsch/master
fix sw600dp-land layout problem (#120)
2015-12-23 13:53:42 +03:00
Greg
f48b26067b Update README.md 2015-12-23 11:31:14 +03:00
Greg
4bf2d5837d Update and rename contributing.md to CONTRIBUTING.md 2015-12-23 11:31:11 +03:00
Weblate
4eb2d09c75 Merge remote-tracking branch 'origin/master' 2015-12-22 19:39:49 +01:00
Jack Musial
a146c1c4b6 Translated using Weblate (Polish)
Currently translated at 100.0% (47 of 47 strings)
2015-12-22 19:39:48 +01:00
Sorry Keep Me Anonymous
2f1ea9aa5d Translated using Weblate (Dutch)
Currently translated at 97.8% (46 of 47 strings)
2015-12-22 19:39:48 +01:00
Greg
a90da62deb Merge pull request #122 from rrooij/contributing_guidelines
Add contribution guidelines
2015-12-22 21:39:45 +03:00
Jack Musial
c1c3fbdf26 Translated using Weblate (Polish)
Currently translated at 100.0% (47 of 47 strings)
2015-12-22 18:50:33 +01:00
rrooij
e07a824d82 Add contribution guidelines
Contribution guidelines are a helpful way to inform new potential
contributors about the way in which they can help with the project.

It's also a helpful way to enforce some consistent coding style and
quality among the contributions.
2015-12-22 16:14:56 +01:00
chschtsch
2aff660a5b fix sw600dp-land layout problem (#120) 2015-12-22 15:11:28 +03:00
Weblate
abfcbe6f0e Merge remote-tracking branch 'origin/master' 2015-12-21 22:04:25 +01:00
Matej U
28bf72ed75 Translated using Weblate (Slovenian)
Currently translated at 100.0% (47 of 47 strings)
2015-12-21 22:04:25 +01:00
naofum
21b054d4ca Translated using Weblate (Japanese)
Currently translated at 100.0% (47 of 47 strings)
2015-12-21 22:04:25 +01:00
Greg
34f115b322 remove broken screenshot links 2015-12-22 00:04:22 +03:00
naofum
8b67354076 Translated using Weblate (Japanese)
Currently translated at 100.0% (47 of 47 strings)
2015-12-21 16:20:39 +01:00
M2ck
b62e0a8b40 Translated using Weblate (French)
Currently translated at 100.0% (47 of 47 strings)
2015-12-21 14:20:07 +01:00
Matej U
f46d5376fe Translated using Weblate (Slovenian)
Currently translated at 100.0% (47 of 47 strings)
2015-12-21 13:39:59 +01:00
Matej U
dc3640578f Translated using Weblate (Slovenian)
Currently translated at 100% (0 of 0 strings)

Created new translation.
2015-12-21 13:07:59 +01:00
Sérgio Marques
0a43494de5 Translated using Weblate (Portuguese)
Currently translated at 100.0% (47 of 47 strings)
2015-12-20 22:46:22 +01:00
Sérgio Marques
2544e45d2d Translated using Weblate (Portuguese)
Currently translated at 100% (0 of 0 strings)

Created new translation.
2015-12-20 22:37:30 +01:00
Mladen Pejaković
4a53e9e018 Translated using Weblate (Serbian)
Currently translated at 100.0% (47 of 47 strings)
2015-12-20 22:21:12 +01:00
Christian Schabesberger
9d7dc99416 Update README.md 2015-12-20 21:32:37 +01:00
Christian Schabesberger
c89dc4ba5b setup for version 0.7.0 2015-12-20 21:28:07 +01:00
Christian Schabesberger
72289ced39 Merge branch 'backgroundPlayback' 2015-12-20 18:16:28 +01:00
Christian Schabesberger
3554ccde05 small adjustment before merg 2015-12-20 18:15:48 +01:00
Christian Schabesberger
73e2c42931 Merge pull request #118 from joshsoftware/master
Adding the loading screen when user scroll through videoList.
2015-12-20 13:35:10 +01:00
Christian Schabesberger
b11778ec55 some post changes on the can't play fix. 2015-12-20 13:33:39 +01:00
Christian Schabesberger
18bc937958 fixed "Can't play this video." bug. 2015-12-20 13:26:12 +01:00
Christian Schabesberger
9f618f6678 fixed loding circle for android5+ 2015-12-20 12:48:06 +01:00
Christian Schabesberger
0c3c7493de second try of fixing the failing build 2015-12-20 02:21:14 +01:00
Christian Schabesberger
8f3f02e9f7 Update .travis.yml 2015-12-20 02:13:42 +01:00
Adam Howard
69903ba889 added preference to switch between external and internal audio players 2015-12-20 00:31:31 +00:00
Adam Howard
25c5f95ad9 added white play button icon for notification controls; pause button soon to follow.
Some checks for audioStreams being null added, along with minor semnatic restructuring of parseDashManifest()
2015-12-20 00:08:12 +00:00
Sanjiv Jha
2546d1107e Merge branch 'master' of github.com:joshsoftware/NewPipe 2015-12-19 20:19:19 +05:30
Sanjiv Jha
fdbeaf8692 Added loading footer on paginate screen 2015-12-19 20:18:28 +05:30
naofum
63c0316af2 Translated using Weblate (Japanese)
Currently translated at 100.0% (46 of 46 strings)
2015-12-18 17:10:36 +01:00
Adam Howard
f2e761c07c added reacquisition of CPU lock after resuming 2015-12-17 18:27:35 +00:00
Adam Howard
6a741de7d1 removed commented-out example code 2015-12-17 18:04:18 +00:00
Adam Howard
3e94d18fe1 removed accidental 'git merge' command from manifest 2015-12-17 18:01:24 +00:00
Adam Howard
95d3651e29 Merge branch 'master' of github.com:theScrabi/NewPipe
Conflicts:
	app/src/main/AndroidManifest.xml
2015-12-17 17:53:54 +00:00
Adam Howard
cd2d88781a implemented play/pause and cancel controls 2015-12-17 17:49:12 +00:00
Shekhar Sahu
2178e86d09 Merge branch 'master' of github.com:theScrabi/NewPipe 2015-12-16 14:58:28 +05:30
Christian Schabesberger
f9ad0f12d0 Fixed serveral things:
* ugly workaround for the details_view_layout problem on older devices
* removed "display button on the left side" option since it's not nececeay anymore.
2015-12-15 22:53:29 +01:00
M2ck
63b16d925d Translated using Weblate (French)
Currently translated at 100.0% (47 of 47 strings)
2015-12-15 14:28:58 +01:00
Greg
53b9ffcbc8 Translated using Weblate (Russian)
Currently translated at 100.0% (47 of 47 strings)
2015-12-15 14:25:10 +01:00
Shekhar Sahu
df01f41980 Merge branch 'master' of github.com:theScrabi/NewPipe 2015-12-15 17:52:33 +05:30
chschtsch
b0c40d3b09 update cards & update dimens structure 2015-12-15 17:13:43 +05:30
Christian Schabesberger
5880dcbcfd update README.md and readded (still) nececeary assets 2015-12-15 16:49:34 +05:30
Greg
489bbc45f5 Update README.md 2015-12-15 16:49:26 +05:30
chschtsch
5e67502729 add screenshots and new icon 2015-12-15 16:49:25 +05:30
Weblate
842079c928 Merge remote-tracking branch 'origin/master' 2015-12-15 11:57:58 +01:00
M2ck
b0bab07a15 Translated using Weblate (French)
Currently translated at 97.8% (46 of 47 strings)
2015-12-15 11:57:58 +01:00
chschtsch
4dbb12c65d update screenshots 2015-12-15 13:55:56 +03:00
chschtsch
db500e9791 fix layout issues & update screenshots 2015-12-15 13:45:59 +03:00
chschtsch
fd8f600fec update .travis.yml & move screenshots to separate folder 2015-12-15 13:04:51 +03:00
Luca Argentieri
2e2d7d02fb Translated using Weblate (Italian)
Currently translated at 100.0% (47 of 47 strings)
2015-12-14 23:03:17 +01:00
Luca Argentieri
d068cd7f75 Translated using Weblate (Italian)
Currently translated at 100% (0 of 0 strings)

Created new translation.
2015-12-14 22:38:11 +01:00
Christian Schabesberger
5a05ffcbdd Merge pull request #114 from chschtsch/cardview
Design update & refactoring
2015-12-14 20:24:22 +01:00
chschtsch
d8c7f50b39 minor layout fixes 2015-12-14 14:52:14 +03:00
chschtsch
988e6e1c82 update like buttons 2015-12-14 14:42:13 +03:00
chschtsch
f6af19444c update like buttons 2015-12-14 14:34:28 +03:00
chschtsch
0581e50e0c update viewlike buttons 2015-12-14 14:33:00 +03:00
chschtsch
a95da9a42d update views & dimens 2015-12-14 14:10:12 +03:00
chschtsch
be10b9750f mering with master 2015-12-14 13:44:15 +03:00
chschtsch
29a3cbc688 mering with master 2015-12-14 13:07:54 +03:00
chschtsch
4f57d3a201 merging with master 2015-12-14 13:01:34 +03:00
Christian Schabesberger
c9be1398b0 fixed green arrow layout error 2015-12-13 21:13:48 +01:00
halcyonest
30eef4db12 Translated using Weblate (Korean)
Currently translated at 100.0% (47 of 47 strings)
2015-12-13 13:51:55 +01:00
halcyonest
b932dbf514 Translated using Weblate (Korean)
Currently translated at 100% (0 of 0 strings)

Created new translation.
2015-12-13 13:40:17 +01:00
chschtsch
320ac82dea merging with master 2015-12-11 14:01:04 +03:00
Christian Schabesberger
af1b21db23 code_lint and moved on to v0.6.1 2015-12-09 23:17:29 +01:00
Christian Schabesberger
0e892ff60e code_lint 2015-12-09 22:31:24 +01:00
Christian Schabesberger
074963aee0 put progressbar on top of thumbnail and made it red 2015-12-09 22:14:22 +01:00
Christian Schabesberger
37d9be9095 put fab button on top of video thumbnail 2015-12-08 21:29:29 +01:00
Adam Howard, from my DSABang
26e36454ef merged changes from master 2015-12-03 14:39:51 +00:00
Christian Schabesberger
78b95f67eb made content scroll over thumbnail 2015-12-02 21:20:52 +01:00
chschtsch
6c63841d0c update video detail layout 2015-12-02 21:55:57 +03:00
chschtsch
6ec2d91d91 fix card margin as well 2015-12-02 17:36:20 +03:00
chschtsch
3299b90c20 better padding for landscape card 2015-12-02 17:33:58 +03:00
chschtsch
7b6d6da9a6 improve card margin & edit its dimensions for landscape 2015-12-02 17:26:20 +03:00
chschtsch
7c7c61fc35 use singleLine instead of manually setting height 2015-12-02 17:18:40 +03:00
chschtsch
c5408fb6b8 finally make card layout look good 2015-12-02 17:13:01 +03:00
chschtsch
1c49102f67 update card layout 2015-12-02 17:00:37 +03:00
chschtsch
f9dd88c1cb remove divider from listview 2015-12-02 16:29:58 +03:00
chschtsch
9ed4a65fd2 move all dimensions do dimens.xml 2015-12-02 16:23:31 +03:00
chschtsch
10bebf8a89 update cards & update dimens structure 2015-12-02 15:27:19 +03:00
chschtsch
36260dac18 tryna add cardview 2015-12-02 13:08:43 +03:00
Christian Schabesberger
2e4e993967 removed unececeary commends 2015-12-02 00:19:47 +01:00
Christian Schabesberger
ef1bfe98f7 try to fix timeout error 2015-12-02 00:11:39 +01:00
Christian Schabesberger
2e123aa617 try to get emulator running part 2 2015-12-01 23:55:07 +01:00
Christian Schabesberger
cf2ef0f2a8 try to get emulator running 2015-12-01 23:48:41 +01:00
Christian Schabesberger
520f40d862 fiexed travis build error 2015-12-01 23:16:58 +01:00
Christian Schabesberger
856bdac84b Merge branch 'master' of github.com:theScrabi/NewPipe 2015-12-01 22:32:55 +01:00
Christian Schabesberger
deb7e38fcf fixed travis.yml error 2015-12-01 22:32:44 +01:00
Weblate
e5f47a4563 Merge remote-tracking branch 'origin/master' 2015-12-01 21:56:17 +01:00
Roland Sawicki
d1b465d8be Translated using Weblate (Polish)
Currently translated at 100.0% (47 of 47 strings)
2015-12-01 21:56:17 +01:00
Christian Schabesberger
5c73b2f324 trigger first CI pull 2015-12-01 21:35:18 +01:00
Christian Schabesberger
7d3e992b3f init CI 2015-12-01 21:31:10 +01:00
Christian Schabesberger
296640930e fixed some spelling errors 2015-12-01 18:50:57 +01:00
Christian Schabesberger
1c42735e3a fixed screenshot error -.- 2015-12-01 18:37:50 +01:00
Christian Schabesberger
0800bc1790 post edit README.md 2015-12-01 18:36:39 +01:00
Christian Schabesberger
bd76a12b90 update README.md and readded (still) nececeary assets 2015-12-01 18:23:06 +01:00
Christian Schabesberger
d3daea6383 Merge pull request #107 from chschtsch/refactor
Slightly update readme file + add screenshots
2015-12-01 17:52:57 +01:00
naofum
df1acd5413 Translated using Weblate (Japanese)
Currently translated at 100.0% (47 of 47 strings)
2015-12-01 14:38:28 +01:00
Greg
0d65cc09f6 Merge pull request #9 from chschtsch/master
.
2015-12-01 12:59:16 +03:00
Greg
892b082b9e Update README.md 2015-12-01 12:58:47 +03:00
Mladen Pejaković
9069ef1325 Translated using Weblate (Serbian)
Currently translated at 100.0% (47 of 47 strings)
2015-11-30 22:24:17 +01:00
Roland Sawicki
47cc493ab5 Translated using Weblate (Polish)
Currently translated at 100.0% (47 of 47 strings)
2015-11-30 22:08:09 +01:00
Greg
f43d7837f8 Merge pull request #8 from chschtsch/refactor
Refactor
2015-11-30 23:56:14 +03:00
Greg
91921ae672 Update README.md 2015-11-30 23:55:24 +03:00
Greg
eba6afc12b Merge pull request #7 from chschtsch/master
.
2015-11-30 23:52:52 +03:00
Greg
ff826a9eeb Update README.md 2015-11-30 23:49:13 +03:00
Greg
6c01a30af5 Merge pull request #5 from chschtsch/refactor
edit screenshots
2015-11-30 23:43:09 +03:00
Greg
53f8d09d31 Merge pull request #6 from chschtsch/master
.
2015-11-30 23:42:54 +03:00
chschtsch
ae191aaafe edit screenshots 2015-11-30 23:40:44 +03:00
Greg
d1694d563b Update README.md 2015-11-30 23:40:29 +03:00
Greg
75fadf79da Delete gruese_die_gema_original.png 2015-11-30 23:38:30 +03:00
Greg
23ce5a6b1e Merge pull request #4 from chschtsch/refactor
add screenshots and new icon
2015-11-30 23:36:29 +03:00
chschtsch
bb65e2b84d add screenshots and new icon 2015-11-30 23:32:10 +03:00
Greg
aa42b1d95a Update README.md 2015-11-30 23:08:28 +03:00
Greg
32d5a18198 Update README.md 2015-11-30 23:07:07 +03:00
Greg
63faefe9c3 Update README.md 2015-11-30 23:01:55 +03:00
syl0s
a90c49d030 Translated using Weblate (German)
Currently translated at 100.0% (47 of 47 strings)
2015-11-30 20:57:19 +01:00
Christian Schabesberger
b1ef3fa4df Translated using Weblate (German)
Currently translated at 100.0% (47 of 47 strings)
2015-11-30 20:55:15 +01:00
Greg
b8cf67cba9 Merge pull request #3 from theScrabi/master
.
2015-11-30 22:53:01 +03:00
Weblate
4780e10ade Merge remote-tracking branch 'origin/master' 2015-11-30 20:51:43 +01:00
Roland Sawicki
401e606fbc Translated using Weblate (Polish)
Currently translated at 95.9% (47 of 49 strings)
2015-11-30 20:51:43 +01:00
syl0s
6b4ef8f397 Translated using Weblate (German)
Currently translated at 100.0% (49 of 49 strings)
2015-11-30 20:51:41 +01:00
Greg
7c66d07779 Merge pull request #2 from theScrabi/master
pull from theScrabi/NewPipe
2015-11-30 22:51:20 +03:00
Christian Schabesberger
92aed0cc3a add link to slack group 2015-11-30 20:48:59 +01:00
Christian Schabesberger
457b08d3cc merge strings.xml collision 2015-11-30 20:00:28 +01:00
Christian Schabesberger
1e5f6fd2b8 merge code_lint 2015-11-30 19:47:21 +01:00
Adam Howard
aebfeb98aa sync so I can clone this branch on another machine 2015-11-29 17:05:44 +00:00
Christian Schabesberger
f6974e8315 code lint 2015-11-29 13:11:56 +01:00
Xenotium
2ce6313ac1 Forgot about quotes... 2015-11-29 11:49:47 +01:00
RACER
e98a113a59 Translated using Weblate (Japanese)
Currently translated at 100.0% (49 of 49 strings)
2015-11-28 15:16:15 +01:00
Mladen Pejaković
ba7bed9c2c Translated using Weblate (Serbian)
Currently translated at 100.0% (49 of 49 strings)
2015-11-27 23:47:01 +01:00
Xenotium
c9ea451c53 Make some strings non-translatable
Apart from app name, which at the moment is the same no matter what language, there are URLs here. They shouldn't reside here but make them (and the app name) at least "translatable=false".
2015-11-27 20:51:56 +01:00
Roland Sawicki
4261ff32c7 Translated using Weblate (Polish)
Currently translated at 100% (0 of 0 strings)

Created new translation.
2015-11-27 20:10:57 +01:00
Christian Schabesberger
cb4b20af45 use format strings now 2015-11-26 20:43:16 +01:00
Christian Schabesberger
b8a27adb93 removed unused resources 2015-11-26 20:22:45 +01:00
Christian Schabesberger
15b58128f4 fiexed lint layout suggestions 2015-11-26 20:16:23 +01:00
Christian Schabesberger
237282db28 refactored VideoPlayer theme 2015-11-26 19:54:13 +01:00
Christian Schabesberger
71bb59dbb8 update gradle/libs and use Perference.Editor.apply() instead of commit() 2015-11-26 19:36:14 +01:00
Christian Schabesberger
e41c46c075 made lint ignore that parentActivityName is not compatible to sdk 15 2015-11-26 19:28:50 +01:00
Christian Schabesberger
6ca9e52f2f made lint ignore some code and layout warnings 2015-11-26 19:11:31 +01:00
Christian Schabesberger
2afee89de3 added contentDescription for better accesebility 2015-11-26 18:47:36 +01:00
Christian Schabesberger
189bee3e44 named drawable folder drawable-nodpi and moved orig. gema image to assets 2015-11-26 18:37:40 +01:00
Christian Schabesberger
6b9a4d5e0a add ellipsis character to spanish translation 2015-11-26 18:32:06 +01:00
Christian Schabesberger
451e2b2182 removed hardcoded strings 2015-11-26 18:29:00 +01:00
Christian Schabesberger
f6ff41cfb4 removed obsolete translations 2015-11-26 18:26:28 +01:00
Christian Schabesberger
d6d144c927 renamed Extractor into VideoExtractor 2015-11-26 17:29:26 +01:00
Christian Schabesberger
7f86872139 Categorized settings & moved AbstractVideoInfo into service folder 2015-11-25 21:08:19 +01:00
Adam Howard
dc0fc05a9e cleaned up BackgroundPlayer code a little 2015-11-25 17:36:01 +00:00
Adam Howard
6b2c3217ab Implemented a playback notification with a progress bar. No playback controls yet. 2015-11-25 17:18:01 +00:00
Adam Howard
0f93a45b9d reimplemented BackgroundPlayer extending Service, not IntentService. See http://stackoverflow.com/questions/17237746 and http://stackoverflow.com/questions/8690198 2015-11-25 15:19:50 +00:00
Adam Howard
943027ffdd implemented stage 1 ultra-basic background play of videos; see https://github.com/theScrabi/NewPipe/wiki/Background-Playback-Mini-Roadmap 2015-11-24 00:40:36 +00:00
Greg
5d28b2400f Merge pull request #1 from theScrabi/master
merge from theScrabi/NewPipe
2015-11-23 23:02:30 +03:00
Weblate
67324bfc80 Merge remote-tracking branch 'origin/master' 2015-11-22 13:24:52 +01:00
syl0s
3c340e7144 Translated using Weblate (German)
Currently translated at 97.8% (45 of 46 strings)
2015-11-22 13:24:51 +01:00
dostoi
c834405a92 Translated using Weblate (French)
Currently translated at 97.8% (45 of 46 strings)
2015-11-22 13:24:51 +01:00
Greg
4ee9e26847 Translated using Weblate (Dutch)
Currently translated at 100.0% (46 of 46 strings)
2015-11-22 13:24:50 +01:00
Adam Howard
94293ca9d9 Merge pull request #100 from theScrabi/refactor
+ Implemented timestamps
* renamed `VideoInfoItem` to `VideoPreviewInfo`
* Moved streaming service-related classes into their own, new package: "services"
+ Added javadoc to some classes and methods (where functionality is known well enough to explain)
- De-duplicated common fields between `VideoInfo` and `VideoPreviewInfo` by moving them into a common superclass: `AbstractVideoInfo`
- Removed 2 methods in `PlayVideoActivity` which only call `super()`, and therefore are unnecessary: `onResume()` and `onPostCreate(Bundle)`
+ Added `VideoInfo(AbstractVideoInfo)` constructor
    - to support converting `VideoPreviewInfo`s into `VideoInfo`s, to reuse scraped info (yet to be implemented)
* Made the Extractor class behave as a per-video object;
    - most method return values are video-specific, so it makes sense (to me) to have Extractor be stateful. 
    - The only stateless methods are getVideoUrl(), getVideoId() and loadDecryptionCode(String)
* Implemented a constructor for YoutubeExtractor, which performs all initialisation work, such as fetching `Jsoup.Document`, and `playerArgs:JSONObject`
2015-11-21 11:11:17 +00:00
Mladen Pejaković
b9cd9f8d35 Translated using Weblate (Serbian)
Currently translated at 100.0% (46 of 46 strings)
2015-11-20 18:45:03 +01:00
Adam Howard
812dd9282d Merge pull request #102 from chschtsch/refactor
fix bug with upload date + better way to parse it
2015-11-20 01:44:32 +00:00
chschtsch
fa1d386fcc cleanup 2015-11-20 00:52:43 +03:00
chschtsch
0392bf6a02 fix bug with upload date + better way to parse it 2015-11-20 00:49:52 +03:00
naofum
97f771ff50 Translated using Weblate (Japanese)
Currently translated at 100.0% (46 of 46 strings)
2015-11-19 16:20:26 +01:00
naofum
6adcc72a8a Translated using Weblate (Japanese)
Currently translated at 100% (0 of 0 strings)

Created new translation.
2015-11-19 16:17:28 +01:00
Adam Howard
2c11bd1889 fixed Bundle casting bug incurred during related videosdisplay 2015-11-19 14:40:35 +00:00
Adam Howard
23e0196fcc * fixed counterintuitive back button behaviour in PlayVideoActivity; see https://github.com/theScrabi/NewPipe/issues/99
* fixed a rarely-caused NullPointerException caused by a related video's view-count field being missing
2015-11-19 00:08:51 +00:00
Adam Howard
91f98c125e finished implementing timestamp, along with refactoring services
* added VideoInfo(AbstractVideoInfo) constructor, to support later implementation for reusing info scraped into VideoPreviewInfo, into VideoInfo
* Made the Extractor class behave as a per-video object;
    - most method return values are video-specific, so it makes sense (to me) to have Extractor be stateful.
    - The only stateless methods are getVideoUrl(), getVideoId() and loadDecryptionCode(String)
* Implemented a constructor for YoutubeExtractor, which performs all initialisation work
2015-11-17 22:51:27 +00:00
Adam Howard
7f01e9a4d9 Merge branch 'master' of github.com:theScrabi/NewPipe
translations
2015-11-16 23:45:42 +00:00
Adam Howard
320a4e2351 Refactoring:
* renamed VideoInfoItem to VideoPreviewInfo
* moved streaming service-related classes into their own, new package services
* added javadoc to some classes and methods (where functionality is known well enough to explain)
* De-duplicated common fields between VideoInfo and VideoPreviewInfo by moving them into a common superclass: AbstractVideoInfo
* Removed 2 methods which only call super(), and therefore are unnecessary: PlayVideoActivity.onResume() and PlayVideoActivity.onPostCreate(Bundle)
2015-11-16 23:32:00 +00:00
Weblate
0829ce51fc Merge remote-tracking branch 'origin/master' 2015-11-16 17:36:14 +01:00
Mladen Pejaković
97ec50c202 Translated using Weblate (Serbian)
Currently translated at 100.0% (46 of 46 strings)
2015-11-16 17:36:12 +01:00
Adam Howard
975a3e8103 Merge branch 'master' of github.com:theScrabi/NewPipe 2015-11-16 14:18:12 +00:00
Christian Schabesberger
658ef2ef26 Merge pull request #97 from chschtsch/master
Update design
2015-11-15 11:49:49 +01:00
chschtsch
bd1e531d7b update design 2015-11-14 21:04:14 +03:00
chschtsch
e440d1d1bd update design 2015-11-14 20:55:28 +03:00
chschtsch
2110020165 update design 2015-11-14 20:48:42 +03:00
chschtsch
dac74dc30d Merge github.com:chschtsch/NewPipe 2015-11-14 20:12:11 +03:00
chschtsch
fa4b971254 update .gitignore 2015-11-14 20:11:41 +03:00
Greg
2d31ae0baa Delete NewPipe.iml 2015-11-14 19:20:31 +03:00
chschtsch
5eebfa132f update .gitignore 2015-11-14 19:19:45 +03:00
chschtsch
522febef93 update .gitignore 2015-11-14 19:17:54 +03:00
chschtsch
a421645ea5 update fragment_videoitem_detail layout 2015-11-14 19:14:51 +03:00
chschtsch
0aac4b1347 update fragment_videoitem_detail layout 2015-11-14 19:11:08 +03:00
chschtsch
36697825cf update fragment_videoitem_detail layout 2015-11-14 19:08:13 +03:00
Adam Howard
b0182ed604 halfway through implementing timestamps:
* still need to use the start position value stored in the PlayVideoActivity's Intent bundle, to set the VideoView using seekTo()
* need to test timestamp extraction regex, and possibly move it somewhere else
*need to find a better way to get the startPosition value to ActionBarHandler, which I thought used VideoInfo objects, but apparently doesn't
    * currently there is a small setStartPosition() method
2015-11-14 11:47:21 +00:00
Adam Howard
c4ea73ca7a Merge pull request #93 from chschtsch/patch-6
remove quotation marks added by weblate
2015-11-13 12:19:21 +00:00
Adam Howard
2aa28d6453 Merge pull request #92 from chschtsch/patch-5
remove quotation marks added by weblate
2015-11-13 12:19:11 +00:00
Adam Howard
2d51085ccf Merge pull request #91 from chschtsch/patch-4
remove quotation marks added by weblate
2015-11-13 12:19:03 +00:00
Adam Howard
4eae02e47e Merge pull request #90 from chschtsch/patch-2
remove quotation marks added by weblate
2015-11-13 12:18:48 +00:00
Adam Howard
f3bf9f9e5d Merge pull request #89 from chschtsch/patch-3
remove quotation marks added by weblate
2015-11-13 12:18:38 +00:00
Greg
75d0b84bdb remove quotation marks added by weblate 2015-11-13 15:00:24 +03:00
Greg
3643ddcf5c remove quotation marks added by weblate 2015-11-13 14:58:16 +03:00
Greg
35500e8ef7 remove quotation marks added by weblate 2015-11-13 14:57:52 +03:00
Greg
6badcf5391 remove quotation marks added by weblate 2015-11-13 14:57:09 +03:00
Greg
d4898043f6 remove quotation marks added by weblate 2015-11-13 14:56:38 +03:00
Weblate
2322ba833a Merge remote-tracking branch 'origin/master' 2015-11-13 12:27:21 +01:00
Greg
5aabb2917f Translated using Weblate (Spanish)
Currently translated at 95.6% (44 of 46 strings)
2015-11-13 12:27:21 +01:00
Greg
eacbf6ce50 Translated using Weblate (German)
Currently translated at 97.8% (45 of 46 strings)
2015-11-13 12:27:20 +01:00
Greg
031300a132 Translated using Weblate (French)
Currently translated at 76.0% (35 of 46 strings)
2015-11-13 12:27:20 +01:00
Greg
f905611e69 Translated using Weblate (English)
Currently translated at 100.0% (46 of 46 strings)

changing 'published' to 'updloaded'
2015-11-13 12:27:20 +01:00
Greg
e475f9f876 Translated using Weblate (Dutch)
Currently translated at 97.8% (45 of 46 strings)
2015-11-13 12:27:20 +01:00
Adam Howard
b65263349e Merged upstream translation commits 2015-11-13 11:07:22 +00:00
Adam Howard
5cb8026f6d Merge pull request #87 from chschtsch/patch-1
remove quotation marks added by weblate
2015-11-13 11:05:48 +00:00
Adam Howard
cc7ce5cf93 fixed inefficient double-conversion of parceled VideoInfoItems, from being cast from VideoInfoItem[] to Vector<>, to using ArrayList as an implementation of List 2015-11-13 10:47:05 +00:00
Greg
af506639a9 remove quotation marks added by weblate 2015-11-13 12:46:55 +03:00
Greg
d377d67174 Translated using Weblate (Russian)
Currently translated at 100.0% (46 of 46 strings)
2015-11-13 10:06:06 +01:00
Greg
cf926353d1 Translated using Weblate (Russian)
Currently translated at 100.0% (46 of 46 strings)
2015-11-13 09:54:54 +01:00
Weblate
d686c744d0 Merge remote-tracking branch 'origin/master' 2015-11-13 03:22:52 +01:00
Greg
501c60b180 Translated using Weblate (Russian)
Currently translated at 97.8% (45 of 46 strings)
2015-11-13 03:22:52 +01:00
jasperweiss
da36687e25 Translated using Weblate (Dutch)
Currently translated at 100.0% (46 of 46 strings)
2015-11-13 03:22:52 +01:00
Adam Howard
f13f9a066a updated README to include language-specific search feature 2015-11-12 15:51:22 +00:00
Christian Schabesberger
8eaa4f7654 Merge pull request #82 from chschtsch/master
fix bug with parsing like/dislike count
2015-11-12 10:26:50 +01:00
Greg
145a7f8e0d fix bug with parsing like/dislike count 2015-11-12 12:18:41 +03:00
Adam Howard
67ba126602 implemented locale-specific formatting of view, like and dislike counts, and video published date 2015-11-11 16:23:22 +00:00
Adam Howard
c5084901b5 removed commented-out code, added another TODO note 2015-11-11 13:08:53 +00:00
Adam Howard
3bfc82f7c0 Refactoring YoutubeExtractor:
-replaced single use of terrible_unescape_workaround_fuck(String) with call to URLDecoder.decode(String, String)
* tested new regex implementation of YoutubeExtractor.getVideoId(String)
- deleted old HashMap-based implementation of YoutubeExtractor.getVideoId(String)
* Miscellaneous typo corrections
* replaced direct page-scraping extraction of video publication date in YoutubeExtractor.getVideoInfo(String) with jsoup-based scrape of <meta> tag field in YYYY-MM-DD format
*similarly,  replaced direct page-scraping extraction of view count with <meta> tag field.

Both <meta> tag fields still need to be formatted locale-specifically
2015-11-11 13:07:09 +00:00
Adam Howard
3411b53450 implemented optimised version of YoutubeExtractor.getVideoId().
new version uses a regular expression instead of creating a HashMap and looping over them.
Needs testing before pushing to origin
2015-11-11 01:48:44 +00:00
Christian Schabesberger
873564f2aa removed .idea folder 2015-11-10 21:17:07 +01:00
Christian Schabesberger
353ed90d12 New version number 0.6.0 and some fixes:
* moved on to version 0.6.0
* fixed youtube url sicnature encryption (vevo videos can be watched again)
* removed play action from the ActionBar
* rolled back changes for hiding the InfoBar inside PlayVideoActivity
* some small layout changes
* removed some files to be ignored (mostly inside .idea directory)
* etc
2015-11-10 20:51:39 +01:00
Christian Schabesberger
799faecc5b Merge pull request #80 from chschtsch/master
Update layout (initially suggested by @darkon5) + miscellaneous fixes
2015-11-10 19:28:53 +01:00
chschtsch
731321b1f9 tryna merge dem files 2015-11-10 20:50:15 +03:00
chschtsch
7ff43caf96 tryna merge dem files 2015-11-10 20:36:35 +03:00
chschtsch
d0877c3132 tryna merge dem files 2015-11-10 20:34:08 +03:00
chschtsch
c589b03dcb rollback setting English as a default language for content 2015-11-10 20:28:05 +03:00
chschtsch
862b5aaef6 update layout (implementing redesign suggested by @darkon5) & set english as a default language for content 2015-11-10 20:26:20 +03:00
Adam Howard
596443bf5e added licensing notice to MediaFormat 2015-11-10 17:23:07 +00:00
Adam Howard
27b450f1e3 minor commit:
-removed now-redundant language code check
2015-11-10 17:09:26 +00:00
chschtsch
61a09e97ca update colors (implementing redesign suggested by @darkon5) 2015-11-10 19:55:58 +03:00
chschtsch
224e7a8969 update date extracting regex pattern + fix some strings in English 2015-11-10 19:50:04 +03:00
Adam Howard
9e7d9ee973 merged commits from origin 2015-11-10 12:43:40 +00:00
Weblate
586bad345c Merge remote-tracking branch 'origin/master' 2015-11-09 08:16:47 +01:00
Szöllősi Attila
abdd7dc7d3 Translated using Weblate (Hungarian)
Currently translated at 97.8% (45 of 46 strings)
2015-11-09 08:16:47 +01:00
jasperweiss
aee32f7a3e Translated using Weblate (Dutch)
Currently translated at 100.0% (46 of 46 strings)
2015-11-09 08:16:45 +01:00
Christian Schabesberger
696760e65a removed printing the player url 2015-11-08 21:22:24 +01:00
Christian Schabesberger
200db15d4b Merge branch 'master' of github.com:theScrabi/NewPipe 2015-11-08 21:19:09 +01:00
Christian Schabesberger
33e332f105 impofed performance and made similar video button hidable 2015-11-08 21:17:51 +01:00
Timofonic
bb2955e442 Translated using Weblate (Spanish)
Currently translated at 100.0% (46 of 46 strings)
2015-11-08 19:54:28 +01:00
Adam Howard
2fc2fa56c3 refactoring VideoInfo & MediaFormat, part 2:
* fixed errors caused by moving media format code to MediaFormat enum
2015-11-08 02:22:40 +00:00
Adam Howard
c87458590c refactoring VideoInfo & VideoInfoItem, part 1:
+ created enum VideoFormat
2015-11-08 02:04:03 +00:00
Adam Howard
8aff134c56 replaced content tountry selection with search language selection.Should now allows users to search for videos in their preferred language. Needs testing before pushing to origin. 2015-11-08 01:09:03 +00:00
Christian Schabesberger
4a938b81df Merge pull request #73 from joshsoftware/feature_search_suggestion
Feature search suggestion (enhancement)
2015-11-05 12:36:43 +01:00
chandrashekhar
4def715b25 + Added TODO & remove unused lines. 2015-11-05 13:19:28 +05:30
chandrashekhar
821acf12d8 +Merge Adam Howard's (medavox) commit with my changes & remove conflict.
+update searchEngine.java & YoutubeSearchEngine.java file.

Conflicts:
	app/src/main/java/org/schabi/newpipe/SearchEngine.java
	app/src/main/java/org/schabi/newpipe/youtube/YoutubeSearchEngine.java
2015-11-05 13:03:47 +05:30
Adam Howard
fc707b6c7e Added Content Country selection setting. This changes the SearchEngine interface slightly. Still need a reliable test to prove whether YouTube is serving different search results based on the country code passed in the search query. 2015-11-04 12:42:17 +00:00
chandrashekhar
85ac000479 + Change return type of interface method suggestionList, So that it will return arraylist of string type data(suggestion). 2015-11-04 11:44:34 +05:30
chandrashekhar
68a0eefa20 + Added interface method in SearchEngine class for fetch search suggestion list.
+ Implemented SearchEngine Interface method in YoutubeSearchEngine class.
2015-11-04 09:06:21 +05:30
Adam Howard
fc32377ce7 added check and exception reporting to YoutubeExtractor:matchGroup1, so that a failed match doesn't go unnoticed 2015-11-04 00:29:30 +00:00
Christian Schabesberger
59e512a64d fixed notification hiding issue 2015-11-03 22:19:28 +01:00
Christian Schabesberger
c51a5a51f1 Merge pull request #72 from medavox/master
Code cleanup & minor additions
2015-11-03 17:54:09 +01:00
Adam Howard
9546a276dc modified gitignore so jdk versions changes are hopefully not propagated to remote 2015-11-03 13:20:15 +00:00
Adam Howard
a18353df5f still fighting with jdk version strings in app/app.iml, .idea/gradle.xml, .idea/misc.xml 2015-11-03 13:19:23 +00:00
Adam Howard
3c72113f4c replaced 4-line regex blocks with call to equivalent method; removed unecessary try-catch blocks surrounding them: regex methods don't throw runtime exceptions 2015-11-03 12:56:11 +00:00
Adam Howard
7e193751c4 fixed app/app.iml, .idea/grade.xml and .idea/misc.xml siwtching jdk versions between 1.7 and 1.8. Added them to my local .gitignore 2015-11-03 12:08:30 +00:00
Adam Howard
56c96eb712 Merge remote-tracking branch 'upstream/master':
Synced new russian translation from theScrabi/NewPipe
2015-11-03 11:51:40 +00:00
Adam Howard
4106a984ca minor corrections pre-sync 2015-11-03 11:51:18 +00:00
Christian Schabesberger
10f1ab0598 Merge pull request #71 from chschtsch/patch-1
Add russian translation of strings.xml
2015-11-03 11:28:27 +01:00
chschtsch
bca9603440 Add russian translation of strings.xml 2015-11-03 12:34:51 +03:00
Adam Howard
c32c267889 Merge remote-tracking branch 'upstream/master'
Conflicts:
	app/src/main/java/org/schabi/newpipe/VideoItemDetailFragment.java -- still used class-based passing
	app/src/main/java/org/schabi/newpipe/VideoItemListActivity.java -- just some whitespace
2015-11-02 21:29:43 +00:00
Adam Howard
627e987bda made the PlayVideoActivity return to its VideoItemDetailActivity when the back button is pressed, by setting its parent activity in the manifest. Also grammar fixes for existing comments 2015-11-02 21:19:18 +00:00
Christian Schabesberger
7c18e147f3 added "show next/related videos" to features 2015-11-02 20:32:13 +01:00
Christian Schabesberger
6a8fb5910d changed icon in the README file 2015-11-02 20:18:23 +01:00
Christian Schabesberger
b865326d51 added ability to show similar videos 2015-11-02 19:57:47 +01:00
Adam Howard
a2d5b0893d Merge remote-tracking branch 'upstream/master' 2015-11-02 15:12:34 +00:00
Adam Howard
db0508b9ab refactored StreamingService interface so it acts as a Factory (returning new instances of called classes, eg Extractor), rather than passing Class objects (which loses type safety) which are then instantiated. Also noticed there is a conflict between existing gradle setup and mine: misc.xml and app.iml have had their jvm version values switched from 1.8 to 1.7 2015-11-02 15:03:11 +00:00
Christian Schabesberger
1850dee93a Merge pull request #67 from joshsoftware/remove_deprecation
Remove Deprecated methods
2015-11-02 15:37:17 +01:00
Weblate
7b1eb8a6dc Merge remote-tracking branch 'origin/master' 2015-11-02 14:26:43 +01:00
chandrashekhar
95a9f2f5e3 + Remove deprecated method from app/src/main/java/org/schabi/newpipe/VideoItemListFragment.java
onAttach(Activity activity) is replaced by onAttach(Context context)

+ Remove deprecated method from pp/src/main/java/org/schabi/newpipe/VideoListAdapter.java
context.getResource().getColor(resId) is replaced by ContextCompat.getColor(context,resId)
2015-11-02 18:02:32 +05:30
darkon5
ae7ed2d226 Merge pull request #65 from medavox/master
Minor README edits
2015-11-02 10:18:24 +01:00
Szöllősi Attila
20cf82bab1 Translated using Weblate (Hungarian)
Currently translated at 100.0% (44 of 44 strings)
2015-11-01 21:42:52 +01:00
Mladen Pejaković
5dcb1e26b5 Translated using Weblate (Serbian)
Currently translated at 100.0% (44 of 44 strings)
2015-10-31 19:56:57 +01:00
Christian Schabesberger
8076589180 Translated using Weblate (German)
Currently translated at 100.0% (44 of 44 strings)
2015-10-31 16:11:54 +01:00
Christian Schabesberger
edbd4003be Merge pull request #64 from mamins1376/master
add Persian translation
2015-10-31 13:53:26 +01:00
medavox
122b089bf0 minor grammar 2015-10-31 12:07:07 +00:00
medavox
a28d917990 fixed typo 2015-10-31 12:05:42 +00:00
Mohammad Amin Sameti
5b605a1100 add Persian translation 2015-10-31 02:30:08 +03:30
Christian Schabesberger
f67158a2a7 Fixed:
- made "could not find a streamingplayer" thing inside ActionBarHandler yield stacktraces
- remove watermark
- fixed fab layout
- changed version number to 0.5.0
2015-10-29 18:37:32 +01:00
Christian Schabesberger
c22c2009d4 - changed icon again
- made ActionBarHandler not be a singelton anymore
 - fixed go back bug for the "Next Video" thing
 - fixed opening youtube mobile links
2015-10-29 17:56:35 +01:00
Christian Schabesberger
ab4d626ea9 fixed opening videos via firefox/fenec 2015-10-28 20:48:03 +01:00
Christian Schabesberger
96709d22e9 Merge pull request #61 from Natureshadow/patch-1
Add missing patterns as described in isue #50
2015-10-28 19:39:06 +01:00
Christian Schabesberger
f0bd171eee small layout changed in README.md 2015-10-28 19:08:58 +01:00
Dominik George
c4191077f3 Add missing patterns as described in isue #50 2015-10-28 15:24:46 +01:00
Christian Schabesberger
321d090052 - added dracon5's website to README.md
- added halcyonest icon (with smal modifications)
2015-10-27 21:35:08 +01:00
Christian Schabesberger
32dcb4d281 improved README file 2015-10-27 20:01:56 +01:00
Christian Schabesberger
080159849e - added preference for "next video" item
- display if a url is supported or nod
2015-10-27 18:13:04 +01:00
Christian Schabesberger
d9e690f62c added NextVideo support 2015-10-25 19:14:29 +01:00
Christian Schabesberger
8c0156dea3 fixed broken commit 2015-10-24 16:05:23 +02:00
Christian Schabesberger
038c59ce66 fiexed some smaller displaying errors 2015-10-24 16:04:27 +02:00
Christian Schabesberger
72e08c0447 fixed some layout bugs 2015-10-23 23:08:01 +02:00
Christian Schabesberger
173eaa8cf8 Merge pull request #51 from Soofe/master
Fixed some typos and removed unused imports.
2015-10-17 17:22:21 +02:00
Christian Schabesberger
a04cd24e5e Merge pull request #53 from pejakm/srupd
Update Serbian translation
2015-10-17 17:15:53 +02:00
Mladen Pejaković
0e11404b3b Update Serbian translation 2015-10-17 17:13:21 +02:00
Soofe
342807e26a Update VideoItemListFragment.java 2015-10-15 23:58:14 +02:00
Soofe
c068f08ff8 Fixed some typos and removed unused imports. 2015-10-15 23:25:53 +02:00
Christian Schabesberger
b7c0a77edc Merge pull request #45 from ata2001/master
Update hungarian translation
2015-09-25 23:33:01 +02:00
ata2001
aab0f45890 Update hungarian translation 2015-09-26 00:05:54 +02:00
Christian Schabesberger
c62ad66f11 New:
- Show video title instead of stream url in vlc/MXPlayer
 - remember rotation
Fix:
 - sensore controlled landscape rotation in the player
2015-09-25 14:17:43 +02:00
Christian Schabesberger
d8bdada9db Merge pull request #43 from epitron/master
Set the title for external video players
2015-09-25 07:43:46 +02:00
Christian Schabesberger
1b9f7a7654 Merge pull request #40 from ata2001/master
Update hungarian translation
2015-09-25 07:42:41 +02:00
Chris Gahan
ac710fff08 Set the title for external video players. 2015-09-23 21:58:41 -04:00
ata2001
2e09492eef Update hungarian translation 2015-09-23 19:01:09 +02:00
605 changed files with 33939 additions and 4640 deletions

42
.github/CONTRIBUTING.md vendored Normal file
View File

@@ -0,0 +1,42 @@
NewPipe contribution guidelines
===============================
PLEASE READ THESE GUIDELINES CAREFULLY BEFORE ANY CONTRIBUTION!
## Crash reporting
Do not report crashes in the GitHub issue tracker. NewPipe has an automated crash report system that will ask you to send a report via e-mail when a crash occurs. This contains all the data we need for debugging, and allows you to even add a comment to it. You'll see exactly what is sent, the system is 100% transparent.
## Issue reporting/feature requests
* Search the [existing issues](https://github.com/TeamNewPipe/NewPipe/issues) first to make sure your issue/feature hasn't been reported/requested before
* Check whether your issue/feature is already fixed/implemented
* If you are an Android/Java developer, you are always welcome to fix/implement an issue/a feature yourself. PRs welcome!
* We use English for development. Issues in other languages will be closed and ignored.
## Bug Fixing
* If you want to help NewPipe to become free of bugs (this is our utopic goal for NewPipe), you can send us an email to tnp@newpipe.schabi.org to let me know that you intend to help. We'll send you further instructions. You may, on request, register at our [Sentry](https://sentry.schabi.org) instance (see section "Crash reporting" for more information.
## Translation
* NewPipe can be translated via [Weblate](https://hosted.weblate.org/projects/newpipe/strings/). You can log in there with your GitHub account.
## Code contribution
* Stick to NewPipe's style conventions (well, just look the other code and then do it the same way :))
* Do not bring non-free software (e.g., binary blobs) into the project. Also, make sure you do not introduce Google libraries.
* Stick to [F-Droid contribution guidelines](https://f-droid.org/wiki/page/Inclusion_Policy)
* Make changes on a separate branch, not on the master branch. This is commonly known as *feature branch workflow*. You may then send your
* When submitting changes, you confirm that your code is licensed under the terms of the [GNU General Public License v3](https://www.gnu.org/licenses/gpl-3.0.html).
* Please test (compile and run) your code before you submit changes! Ideally, provide test feedback in the PR description. Untested code will **not** be merged!
* Try to figure out yourself why builds on our CI fail.
* Make sure your PR is up-to-date with the rest of the code. Often, a simple click on "Update branch" will do the job, but if not, you are asked to merge the master branch manually and resolve the problems on your own. That will make the maintainers' jobs way easier.
* Please show intention to maintain your features and code after you contributed it. Unmaintained code is a hassle for the core developers, and just adds work. If you do not intend to maintain features you contributed, please think again about sumission, or clearly state that in the description of your PR.
* Respond yourselves if someone requests changes or otherwise raises issues about your PRs.
## Communication
* WE DO NOW HAVE A MAILING LIST: [newpipe@list.schabi.org](https://list.schabi.org/cgi-bin/mailman/listinfo/newpipe).
* There is an IRC channel on Freenode which is regularly visited by the core team and other developers: [#newpipe](irc:irc.freenode.net/newpipe). [Click here for Webchat](https://webchat.freenode.net/?channels=newpipe)!
* If you want to get in touch with the core team or one of our other contributors you can send an email to tnp(at)schabi.org. Please do not send issue reports, they will be ignored and remain unanswered! Use the GitHub issue tracker described above!
* Feel free to post suggestions, changes, ideas etc. on GitHub, IRC or the mailing list!

2
.github/ISSUE_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,2 @@
- [ ] I carefully read the [contribution guidelines](https://github.com/TeamNewPipe/NewPipe/blob/HEAD/.github/CONTRIBUTING.md) and agree to them.
- [ ] I checked if the issue/feature exists in the latest version.

1
.github/PULL_REQUEST_TEAMPLATE.md vendored Normal file
View File

@@ -0,0 +1 @@
- [ ] I carefully reed the [contribution guidelines](https://github.com/TeamNewPipe/NewPipe/blob/HEAD/.github/CONTRIBUTING.md) and agree to them.

9
.gitignore vendored
View File

@@ -1,7 +1,12 @@
.gitignore
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
/app/app.iml
/.idea
/*.iml
gradle.properties
*~
.weblate

3
.gitmodules vendored Normal file
View File

@@ -0,0 +1,3 @@
[submodule "app/src/main/java/org/schabi/newpipe/extractor"]
path = app/src/main/java/org/schabi/newpipe/extractor
url = https://github.com/TeamNewPipe/NewPipeExtractor.git

1
.idea/.name generated
View File

@@ -1 +0,0 @@
NewPipe

22
.idea/compiler.xml generated
View File

@@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<resourceExtensions />
<wildcardResourcePatterns>
<entry name="!?*.java" />
<entry name="!?*.form" />
<entry name="!?*.class" />
<entry name="!?*.groovy" />
<entry name="!?*.scala" />
<entry name="!?*.flex" />
<entry name="!?*.kt" />
<entry name="!?*.clj" />
<entry name="!?*.aj" />
</wildcardResourcePatterns>
<annotationProcessing>
<profile default="true" name="Default" enabled="false">
<processorPath useClasspath="true" />
</profile>
</annotationProcessing>
</component>
</project>

View File

@@ -1,3 +0,0 @@
<component name="CopyrightManager">
<settings default="" />
</component>

View File

@@ -1,3 +0,0 @@
<component name="ProjectDictionaryState">
<dictionary name="the-scrabi" />
</component>

19
.idea/gradle.xml generated
View File

@@ -1,19 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="distributionType" value="LOCAL" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleHome" value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4" />
<option name="gradleJvm" value="1.8" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
</set>
</option>
</GradleProjectSettings>
</option>
</component>
</project>

46
.idea/misc.xml generated
View File

@@ -1,46 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="EntryPointsManager">
<entry_points version="2.0" />
</component>
<component name="NullableNotNullManager">
<option name="myDefaultNullable" value="android.support.annotation.Nullable" />
<option name="myDefaultNotNull" value="android.support.annotation.NonNull" />
<option name="myNullables">
<value>
<list size="4">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" />
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" />
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.Nullable" />
</list>
</value>
</option>
<option name="myNotNulls">
<value>
<list size="4">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" />
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" />
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" />
</list>
</value>
</option>
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
<OptionsSetting value="true" id="Add" />
<OptionsSetting value="true" id="Remove" />
<OptionsSetting value="true" id="Checkout" />
<OptionsSetting value="true" id="Update" />
<OptionsSetting value="true" id="Status" />
<OptionsSetting value="true" id="Edit" />
<ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
</project>

9
.idea/modules.xml generated
View File

@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/NewPipe.iml" filepath="$PROJECT_DIR$/NewPipe.iml" />
<module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
</modules>
</component>
</project>

View File

@@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RunConfigurationProducerService">
<option name="ignoredProducers">
<set>
<option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
</set>
</option>
</component>
</project>

6
.idea/vcs.xml generated
View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

19
.travis.yml Normal file
View File

@@ -0,0 +1,19 @@
language: android
jdk:
- oraclejdk8
android:
components:
# The BuildTools version used by NewPipe
- tools
- build-tools-26.0.1
# The SDK version used to compile NewPipe
- android-26
# Additional components
- extra-android-m2repository
script: ./gradlew -Dorg.gradle.jvmargs=-Xmx1536m assembleDebug lintDebug testDebugUnitTest
licenses:
- '.+'

Binary file not shown.

View File

@@ -1,19 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="NewPipe" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="java-gradle" name="Java-Gradle">
<configuration>
<option name="BUILD_FOLDER_PATH" value="$MODULE_DIR$/build" />
<option name="BUILDABLE" value="false" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@@ -1,7 +1,85 @@
NewPipe
-------
WARNING: PUTTING NEWPIPE OR ANY FORK OF IT INTO GOOGLE PLAYSTORE VIOLATES THEIR TERMS OF CONDITIONS.
# NewPipe
NewPipe: A free lightweight YouTube frontend for Android.
[![NewPipe](app/src/main/res/mipmap-xhdpi/ic_launcher.png)](https://newpipe.schabi.org)
[![F-Droid](https://f-droid.org/wiki/images/0/06/F-Droid-button_get-it-on.png)](https://f-droid.org/packages/org.schabi.newpipe/)
NewPipe is a lightweight youtube frontend for android. It's supposed to be used without the youtube-api and without any google play services. NewPipe only parses the youtube website in order to gain the information it needs.
Project status:
[![Translation Status](https://hosted.weblate.org/widgets/NewPipe/-/svg-badge.svg)](https://hosted.weblate.org/engage/NewPipe/)
[![Build Status](https://travis-ci.org/TeamNewPipe/NewPipe.svg)](https://travis-ci.org/TeamNewPipe/NewPipe)
This a very early version of the app, so not all functionality is implemented, and there may still be a lot of bugs. But all in all it's doing what it is supposed to do. It makes it possible to watch youtube videos. So don't be cruel to this app. It will improve...
## Donate
![Bitcoin](https://bitcoin.org/img/icons/logotop.svg)
![BitcoinQR](assets/16A9J59ahMRqkLSZjhYj33n9j3fMztFxnh.png)
`16A9J59ahMRqkLSZjhYj33n9j3fMztFxnh`
## Screenshots
[<img src="screenshots/screenshot_1.png" width=160>](screenshots/screenshot_1.png)
[<img src="screenshots/screenshot_2.png" width=160>](screenshots/screenshot_2.png)
[<img src="screenshots/screenshot_3.png" width=160>](screenshots/screenshot_3.png)
[<img src="screenshots/screenshot_4.png" width=160>](screenshots/screenshot_4.png)
[<img src="screenshots/screenshot_5.png" width=160>](screenshots/screenshot_5.png)
[<img src="screenshots/screenshot_6.png" width=160>](screenshots/screenshot_6.png)
[<img src="screenshots/screenshot_7.png" width=160>](screenshots/screenshot_7.png)
[<img src="screenshots/screenshot_8.png" width=160>](screenshots/screenshot_8.png)
[<img src="screenshots/screenshot_9.png" width=160>](screenshots/screenshot_9.png)
## Description
NewPipe does not use any Google framework libraries, or the YouTube API. It only parses the website in order to gain the information it needs. Therefore this app can be used on devices without Google Services installed. Also, you don't need a YouTube account to use NewPipe, and it's FLOSS.
### Features
* Search videos
* Display general information about a video
* Watch YouTube videos
* Listen to YouTube videos (experimental)
* Popup mode (floating player)
* Select the streaming player to watch the video with
* Download videos
* Download audio only
* Open a video in Kodi
* Show Next/Related videos
* Search YouTube in a specific language
* Watch age restricted material
* Display general information about channels
* Search channels
* Watch videos from a channel
* Orbot/Tor support (not yet directly)
* 1080p/2k/4k support
### Coming Features
* Bookmarks
* View history
* Search history
* Subscribe to channels
* Search/Watch Playlists
* Queeing videos
* Subtitles support
* livestream support
* ... and many more
### Multiservice support
Although NewPipe only supports YouTube at the moment, it's designed to support many more streaming services. The plan is, that NewPipe will get such support by the version 2.0.
## Contribution
Whether you have ideas, translations, design changes, code cleaning, or real heavy code changes, help is always welcome.
The more is done the better it gets!
If you'd like to get involved, check our [contribution notes](.github/CONTRIBUTING.md).
## License
[![GNU GPLv3 Image](https://www.gnu.org/graphics/gplv3-127x51.png)](http://www.gnu.org/licenses/gpl-3.0.en.html)
NewPipe is Free Software: You can use, study share and improve it at your
will. Specifically you can redistribute and/or modify it under the terms of the
[GNU General Public License](https://www.gnu.org/licenses/gpl.html) as
published by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

2
app/.gitignore vendored
View File

@@ -1 +1,3 @@
.gitignore
/build
app.iml

View File

@@ -1,101 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id=":app" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" external.system.module.group="NewPipe" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="android-gradle" name="Android-Gradle">
<configuration>
<option name="GRADLE_PROJECT_PATH" value=":app" />
</configuration>
</facet>
<facet type="android" name="Android">
<configuration>
<option name="SELECTED_BUILD_VARIANT" value="debug" />
<option name="SELECTED_TEST_ARTIFACT" value="_android_test_" />
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
<option name="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugAndroidTest" />
<option name="COMPILE_JAVA_TEST_TASK_NAME" value="compileDebugAndroidTestSources" />
<afterSyncTasks>
<task>generateDebugAndroidTestSources</task>
<task>generateDebugSources</task>
</afterSyncTasks>
<option name="ALLOW_USER_CONFIGURATION" value="false" />
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
<option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res" />
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
<output-test url="file://$MODULE_DIR$/build/intermediates/classes/androidTest/debug" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/debug" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/androidTest/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/aidl" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundles" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/coverage-instrumented-classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex-cache" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.0.1/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/design/23.0.1/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/23.0.1/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jacoco" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/javaResources" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/libs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/lint" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/ndk" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/pre-dexed" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/proguard" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
</content>
<orderEntry type="jdk" jdkName="Android API 23 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="jsoup-1.8.3" level="project" />
<orderEntry type="library" exported="" name="support-v4-23.0.1" level="project" />
<orderEntry type="library" exported="" name="rhino-1.7.7" level="project" />
<orderEntry type="library" exported="" name="design-23.0.1" level="project" />
<orderEntry type="library" exported="" name="appcompat-v7-23.0.1" level="project" />
<orderEntry type="library" exported="" name="support-annotations-23.0.1" level="project" />
</component>
</module>

View File

@@ -1,29 +1,82 @@
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
compileSdkVersion 26
buildToolsVersion '26.0.1'
defaultConfig {
applicationId "org.schabi.newpipe"
minSdkVersion 15
targetSdkVersion 23
versionCode 4
versionName "0.4.1"
targetSdkVersion 26
versionCode 38
versionName "0.10.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
multiDexEnabled true
debuggable true
applicationIdSuffix ".debug"
}
}
lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:support-v4:23.0.1'
compile 'org.jsoup:jsoup:1.8.3'
compile 'org.mozilla:rhino:1.7.7'
compile 'com.android.support:design:23.0.1'
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2') {
exclude module: 'support-annotations'
}
compile 'com.github.TeamNewPipe:NewPipeExtractor:7ae274b'
testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:1.10.19'
compile 'com.android.support:appcompat-v7:26.0.1'
compile 'com.android.support:support-v4:26.0.1'
compile 'com.android.support:design:26.0.1'
compile 'com.android.support:recyclerview-v7:26.0.1'
compile 'com.android.support:preference-v14:26.0.1'
compile 'com.google.code.gson:gson:2.7'
compile 'ch.acra:acra:4.9.0'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.github.nirhart:parallaxscroll:1.0'
compile 'com.nononsenseapps:filepicker:3.0.0'
compile 'com.google.android.exoplayer:exoplayer:r2.5.1'
debugCompile 'com.facebook.stetho:stetho:1.5.0'
debugCompile 'com.facebook.stetho:stetho-urlconnection:1.5.0'
debugCompile 'com.android.support:multidex:1.0.1'
compile 'io.reactivex.rxjava2:rxjava:2.1.2'
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
compile 'com.jakewharton.rxbinding2:rxbinding:2.0.0'
compile 'android.arch.persistence.room:runtime:1.0.0-alpha8'
compile 'android.arch.persistence.room:rxjava2:1.0.0-alpha8'
annotationProcessor 'android.arch.persistence.room:compiler:1.0.0-alpha8'
compile 'frankiesardo:icepick:3.2.0'
provided 'frankiesardo:icepick-processor:3.2.0'
}

View File

@@ -15,3 +15,13 @@
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
-dontobfuscate
-keep class org.mozilla.javascript.** { *; }
-keep class org.mozilla.classfile.ClassFileWriter
-keep class com.google.android.exoplayer2.** { *; }
-dontwarn org.mozilla.javascript.tools.**
-dontwarn android.arch.util.paging.CountedDataSource
-dontwarn android.arch.persistence.room.paging.LimitOffsetDataSource

View File

@@ -0,0 +1,37 @@
package org.schabi.newpipe.report;
import android.os.Parcel;
import android.support.test.filters.LargeTest;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.schabi.newpipe.R;
import org.schabi.newpipe.report.ErrorActivity.ErrorInfo;
import static org.junit.Assert.assertEquals;
/**
* Instrumented tests for {@link ErrorInfo}
*/
@RunWith(AndroidJUnit4.class)
@LargeTest
public class ErrorInfoTest {
@Test
public void errorInfo_testParcelable() {
ErrorInfo info = ErrorInfo.make(UserAction.USER_REPORT, "youtube", "request", R.string.general_error);
// Obtain a Parcel object and write the parcelable object to it:
Parcel parcel = Parcel.obtain();
info.writeToParcel(parcel, 0);
parcel.setDataPosition(0);
ErrorInfo infoFromParcel = ErrorInfo.CREATOR.createFromParcel(parcel);
assertEquals(UserAction.USER_REPORT, infoFromParcel.userAction);
assertEquals("youtube", infoFromParcel.serviceName);
assertEquals("request", infoFromParcel.request);
assertEquals(R.string.general_error, infoFromParcel.message);
parcel.recycle();
}
}

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="org.schabi.newpipe">
<application
android:name=".DebugApp"
android:label="NewPipe Debug"
tools:replace="android:name, android:label">
<activity
android:name=".MainActivity"
android:label="NewPipe Debug"
tools:replace="android:label"/>
</application>
</manifest>

View File

@@ -0,0 +1,45 @@
package org.schabi.newpipe;
import android.content.Context;
import android.support.multidex.MultiDex;
import com.facebook.stetho.Stetho;
public class DebugApp extends App {
private static final String TAG = DebugApp.class.toString();
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
MultiDex.install(this);
}
@Override
public void onCreate() {
super.onCreate();
initStetho();
}
private void initStetho() {
// Create an InitializerBuilder
Stetho.InitializerBuilder initializerBuilder =
Stetho.newInitializerBuilder(this);
// Enable Chrome DevTools
initializerBuilder.enableWebKitInspector(
Stetho.defaultInspectorModulesProvider(this)
);
// Enable command line interface
initializerBuilder.enableDumpapp(
Stetho.defaultDumperPluginsProvider(getApplicationContext())
);
// Use the InitializerBuilder to generate an Initializer
Stetho.Initializer initializer = initializerBuilder.build();
// Initialize Stetho with the Initializer
Stetho.initialize(initializer);
}
}

View File

@@ -1,78 +1,225 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.schabi.newpipe" >
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="org.schabi.newpipe">
<uses-permission android:name= "android.permission.INTERNET" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<application
android:name=".App"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:logo="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
android:logo="@mipmap/ic_launcher"
android:theme="@style/DarkTheme"
tools:ignore="AllowBackup">
<activity
android:name=".VideoItemListActivity"
android:label="@string/app_name" >
android:name=".MainActivity"
android:label="@string/app_name"
android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity
android:name=".VideoItemDetailActivity"
android:label="@string/title_videoitem_detail" >
android:name=".player.old.PlayVideoActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:theme="@style/VideoPlayerTheme"
tools:ignore="UnusedAttribute"/>
<service
android:name=".player.BackgroundPlayer"
android:exported="false"/>
<service
android:name=".player.PopupVideoPlayer"
android:exported="false"/>
<activity
android:name=".player.MainVideoPlayer"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:label="@string/app_name"
android:launchMode="singleTask"
android:theme="@style/PlayerTheme"/>
<activity
android:name=".settings.SettingsActivity"
android:label="@string/settings"/>
<activity
android:name=".about.AboutActivity"
android:label="@string/title_activity_about"/>
<activity
android:name=".history.HistoryActivity"
android:label="@string/title_activity_history"/>
<activity
android:name=".PanicResponderActivity"
android:launchMode="singleInstance"
android:noHistory="true"
android:theme="@android:style/Theme.NoDisplay">
<intent-filter>
<action android:name="info.guardianproject.panic.action.TRIGGER"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
<activity
android:name=".ExitActivity"
android:label="@string/general_error"
android:theme="@android:style/Theme.NoDisplay"/>
<activity android:name=".report.ErrorActivity"/>
<!-- giga get related -->
<activity
android:name=".download.DownloadActivity"
android:label="@string/app_name"
android:launchMode="singleTask"/>
<service android:name="us.shandian.giga.service.DownloadManagerService"/>
<activity
android:name="com.nononsenseapps.filepicker.FilePickerActivity"
android:label="@string/app_name"
android:launchMode="singleTop"
android:theme="@style/FilePickerTheme"/>
<activity
android:name=".ReCaptchaActivity"
android:label="@string/reCaptchaActivity"/>
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="${applicationId}.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".VideoItemListActivity" />
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths"/>
</provider>
<activity
android:name=".RouterActivity"
android:taskAffinity=""
android:theme="@android:style/Theme.NoDisplay">
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<action android:name="android.media.action.MEDIA_PLAY_FROM_SEARCH"/>
<action android:name="android.nfc.action.NDEF_DISCOVERED"/>
<data
android:host="youtube.com"
android:scheme="http"
android:pathPrefix="/watch"/>
<data
android:host="youtube.com"
android:scheme="https"
android:pathPrefix="/watch"/>
<data
android:host="www.youtube.com"
android:scheme="http"
android:pathPrefix="/watch"/>
<data
android:host="www.youtube.com"
android:scheme="https"
android:pathPrefix="/watch"/>
<data
android:host="m.youtube.com"
android:scheme="http"
android:pathPrefix="/watch"/>
<data
android:host="m.youtube.com"
android:scheme="https"
android:pathPrefix="/watch"/>
<data
android:host="youtu.be"
android:scheme="https"
android:pathPrefix="/"/>
<data
android:host="youtu.be"
android:scheme="http"
android:pathPrefix="/"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="http"/>
<data android:scheme="https"/>
<data android:host="youtube.com"/>
<data android:host="m.youtube.com"/>
<data android:host="www.youtube.com"/>
<!-- video prefix -->
<data android:pathPrefix="/v/"/>
<data android:pathPrefix="/embed/"/>
<data android:pathPrefix="/watch"/>
<data android:pathPrefix="/attribution_link"/>
<!-- channel prefix -->
<data android:pathPrefix="/channel/"/>
<data android:pathPrefix="/user/"/>
<!-- playlist prefix -->
<data android:pathPrefix="/playlist"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<action android:name="android.media.action.MEDIA_PLAY_FROM_SEARCH"/>
<action android:name="android.nfc.action.NDEF_DISCOVERED"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="http"/>
<data android:scheme="https"/>
<data android:host="youtu.be"/>
<data android:pathPrefix="/"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<action android:name="android.media.action.MEDIA_PLAY_FROM_SEARCH"/>
<action android:name="android.nfc.action.NDEF_DISCOVERED"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="vnd.youtube"/>
<data android:scheme="vnd.youtube.launch"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:mimeType="text/plain"/>
</intent-filter>
</activity>
<activity android:name=".PlayVideoActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:theme="@style/FullscreenTheme"
>
</activity>
<activity
android:name=".SettingsActivity"
android:label="@string/title_activity_settings" >
android:name=".RouterPopupActivity"
android:label="@string/popup_mode_share_menu_title"
android:taskAffinity=""
android:theme="@android:style/Theme.NoDisplay">
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<action android:name="android.media.action.MEDIA_PLAY_FROM_SEARCH"/>
<action android:name="android.nfc.action.NDEF_DISCOVERED"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="http"/>
<data android:scheme="https"/>
<data android:host="youtube.com"/>
<data android:host="m.youtube.com"/>
<data android:host="www.youtube.com"/>
<!-- video prefix -->
<data android:pathPrefix="/v/"/>
<data android:pathPrefix="/embed/"/>
<data android:pathPrefix="/watch"/>
<data android:pathPrefix="/attribution_link"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<action android:name="android.media.action.MEDIA_PLAY_FROM_SEARCH"/>
<action android:name="android.nfc.action.NDEF_DISCOVERED"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="http"/>
<data android:scheme="https"/>
<data android:host="youtu.be"/>
<data android:pathPrefix="/"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<action android:name="android.media.action.MEDIA_PLAY_FROM_SEARCH"/>
<action android:name="android.nfc.action.NDEF_DISCOVERED"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="vnd.youtube"/>
<data android:scheme="vnd.youtube.launch"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:mimeType="text/plain"/>
</intent-filter>
</activity>
</application>
</manifest>
</manifest>

View File

@@ -0,0 +1,162 @@
<!doctype html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Apache License - Version 2.0, January 2004</title>
</head>
<body>
<p>Apache License<br>Version 2.0, January 2004<br>
<a href="http://www.apache.org/licenses/">http://www.apache.org/licenses/</a> </p>
<p>TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION</p>
<p><strong><a name="definitions">1. Definitions</a></strong>.</p>
<p>"License" shall mean the terms and conditions for use, reproduction, and
distribution as defined by Sections 1 through 9 of this document.</p>
<p>"Licensor" shall mean the copyright owner or entity authorized by the
copyright owner that is granting the License.</p>
<p>"Legal Entity" shall mean the union of the acting entity and all other
entities that control, are controlled by, or are under common control with
that entity. For the purposes of this definition, "control" means (i) the
power, direct or indirect, to cause the direction or management of such
entity, whether by contract or otherwise, or (ii) ownership of fifty
percent (50%) or more of the outstanding shares, or (iii) beneficial
ownership of such entity.</p>
<p>"You" (or "Your") shall mean an individual or Legal Entity exercising
permissions granted by this License.</p>
<p>"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation source,
and configuration files.</p>
<p>"Object" form shall mean any form resulting from mechanical transformation
or translation of a Source form, including but not limited to compiled
object code, generated documentation, and conversions to other media types.</p>
<p>"Work" shall mean the work of authorship, whether in Source or Object form,
made available under the License, as indicated by a copyright notice that
is included in or attached to the work (an example is provided in the
Appendix below).</p>
<p>"Derivative Works" shall mean any work, whether in Source or Object form,
that is based on (or derived from) the Work and for which the editorial
revisions, annotations, elaborations, or other modifications represent, as
a whole, an original work of authorship. For the purposes of this License,
Derivative Works shall not include works that remain separable from, or
merely link (or bind by name) to the interfaces of, the Work and Derivative
Works thereof.</p>
<p>"Contribution" shall mean any work of authorship, including the original
version of the Work and any modifications or additions to that Work or
Derivative Works thereof, that is intentionally submitted to Licensor for
inclusion in the Work by the copyright owner or by an individual or Legal
Entity authorized to submit on behalf of the copyright owner. For the
purposes of this definition, "submitted" means any form of electronic,
verbal, or written communication sent to the Licensor or its
representatives, including but not limited to communication on electronic
mailing lists, source code control systems, and issue tracking systems that
are managed by, or on behalf of, the Licensor for the purpose of discussing
and improving the Work, but excluding communication that is conspicuously
marked or otherwise designated in writing by the copyright owner as "Not a
Contribution."</p>
<p>"Contributor" shall mean Licensor and any individual or Legal Entity on
behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.</p>
<p><strong><a name="copyright">2. Grant of Copyright License</a></strong>. Subject to the
terms and conditions of this License, each Contributor hereby grants to You
a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of, publicly
display, publicly perform, sublicense, and distribute the Work and such
Derivative Works in Source or Object form.</p>
<p><strong><a name="patent">3. Grant of Patent License</a></strong>. Subject to the terms
and conditions of this License, each Contributor hereby grants to You a
perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made, use,
offer to sell, sell, import, and otherwise transfer the Work, where such
license applies only to those patent claims licensable by such Contributor
that are necessarily infringed by their Contribution(s) alone or by
combination of their Contribution(s) with the Work to which such
Contribution(s) was submitted. If You institute patent litigation against
any entity (including a cross-claim or counterclaim in a lawsuit) alleging
that the Work or a Contribution incorporated within the Work constitutes
direct or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate as of the
date such litigation is filed.</p>
<p><strong><a name="redistribution">4. Redistribution</a></strong>. You may reproduce and
distribute copies of the Work or Derivative Works thereof in any medium,
with or without modifications, and in Source or Object form, provided that
You meet the following conditions:</p>
<ol style="list-style: lower-latin;">
<li>You must give any other recipients of the Work or Derivative Works a
copy of this License; and</li>
<li>You must cause any modified files to carry prominent notices stating
that You changed the files; and</li>
<li>You must retain, in the Source form of any Derivative Works that You
distribute, all copyright, patent, trademark, and attribution notices from
the Source form of the Work, excluding those notices that do not pertain to
any part of the Derivative Works; and</li>
<li>If the Work includes a "NOTICE" text file as part of its distribution,
then any Derivative Works that You distribute must include a readable copy
of the attribution notices contained within such NOTICE file, excluding
those notices that do not pertain to any part of the Derivative Works, in
at least one of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or documentation,
if provided along with the Derivative Works; or, within a display generated
by the Derivative Works, if and wherever such third-party notices normally
appear. The contents of the NOTICE file are for informational purposes only
and do not modify the License. You may add Your own attribution notices
within Derivative Works that You distribute, alongside or as an addendum to
the NOTICE text from the Work, provided that such additional attribution
notices cannot be construed as modifying the License.
<br/>
<br/>
You may add Your own copyright statement to Your modifications and may
provide additional or different license terms and conditions for use,
reproduction, or distribution of Your modifications, or for any such
Derivative Works as a whole, provided Your use, reproduction, and
distribution of the Work otherwise complies with the conditions stated in
this License.
</li>
</ol>
<p><strong><a name="contributions">5. Submission of Contributions</a></strong>. Unless You
explicitly state otherwise, any Contribution intentionally submitted for
inclusion in the Work by You to the Licensor shall be under the terms and
conditions of this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify the
terms of any separate license agreement you may have executed with Licensor
regarding such Contributions.</p>
<p><strong><a name="trademarks">6. Trademarks</a></strong>. This License does not grant
permission to use the trade names, trademarks, service marks, or product
names of the Licensor, except as required for reasonable and customary use
in describing the origin of the Work and reproducing the content of the
NOTICE file.</p>
<p><strong><a name="no-warranty">7. Disclaimer of Warranty</a></strong>. Unless required by
applicable law or agreed to in writing, Licensor provides the Work (and
each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including,
without limitation, any warranties or conditions of TITLE,
NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You
are solely responsible for determining the appropriateness of using or
redistributing the Work and assume any risks associated with Your exercise
of permissions under this License.</p>
<p><strong><a name="no-liability">8. Limitation of Liability</a></strong>. In no event and
under no legal theory, whether in tort (including negligence), contract, or
otherwise, unless required by applicable law (such as deliberate and
grossly negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a result
of this License or out of the use or inability to use the Work (including
but not limited to damages for loss of goodwill, work stoppage, computer
failure or malfunction, or any and all other commercial damages or losses),
even if such Contributor has been advised of the possibility of such
damages.</p>
<p><strong><a name="additional">9. Accepting Warranty or Additional Liability</a></strong>.
While redistributing the Work or Derivative Works thereof, You may choose
to offer, and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this License.
However, in accepting such obligations, You may act only on Your own behalf
and on Your sole responsibility, not on behalf of any other Contributor,
and only if You agree to indemnify, defend, and hold each Contributor
harmless for any liability incurred by, or claims asserted against, such
Contributor by reason of your accepting any such warranty or additional
liability.</p>
</body>
</html>

View File

@@ -0,0 +1,400 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>GNU General Public License v2.0 - GNU Project - Free Software Foundation (FSF)</title>
<link rel="alternate" type="application/rdf+xml"
href="http://www.gnu.org/licenses/old-licenses/gpl-2.0.rdf" />
</head>
<body>
<h3><a id="SEC1">GNU GENERAL PUBLIC LICENSE</a></h3>
<p>
Version 2, June 1991
</p>
<pre>
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
</pre>
<h3 id="preamble"><a id="SEC2">Preamble</a></h3>
<p>
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
</p>
<p>
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
</p>
<p>
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
</p>
<p>
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
</p>
<p>
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
</p>
<p>
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
</p>
<p>
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
</p>
<p>
The precise terms and conditions for copying, distribution and
modification follow.
</p>
<h3 id="terms"><a id="SEC3">TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</a></h3>
<p id="section0">
<strong>0.</strong>
This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
</p>
<p>
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
</p>
<p id="section1">
<strong>1.</strong>
You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
</p>
<p>
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
</p>
<p id="section2">
<strong>2.</strong>
You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
</p>
<dl>
<dt></dt>
<dd>
<strong>a)</strong>
You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
</dd>
<dt></dt>
<dd>
<strong>b)</strong>
You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
</dd>
<dt></dt>
<dd>
<strong>c)</strong>
If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
</dd>
</dl>
<p>
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
</p>
<p>
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
</p>
<p>
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
</p>
<p id="section3">
<strong>3.</strong>
You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
</p>
<!-- we use this doubled UL to get the sub-sections indented, -->
<!-- while making the bullets as unobvious as possible. -->
<dl>
<dt></dt>
<dd>
<strong>a)</strong>
Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
</dd>
<dt></dt>
<dd>
<strong>b)</strong>
Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
</dd>
<dt></dt>
<dd>
<strong>c)</strong>
Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
</dd>
</dl>
<p>
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major softwareComponents (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
</p>
<p>
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
</p>
<p id="section4">
<strong>4.</strong>
You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
</p>
<p id="section5">
<strong>5.</strong>
You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
</p>
<p id="section6">
<strong>6.</strong>
Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
</p>
<p id="section7">
<strong>7.</strong>
If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
</p>
<p>
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
</p>
<p>
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
</p>
<p>
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
</p>
<p id="section8">
<strong>8.</strong>
If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
</p>
<p id="section9">
<strong>9.</strong>
The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
</p>
<p>
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
</p>
<p id="section10">
<strong>10.</strong>
If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
</p>
<p id="section11"><strong>NO WARRANTY</strong></p>
<p>
<strong>11.</strong>
BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
</p>
<p id="section12">
<strong>12.</strong>
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
</p>
</body></html>

View File

@@ -0,0 +1,639 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>GNU General Public License v3.0 - GNU Project - Free Software Foundation (FSF)</title>
<link rel="alternate" type="application/rdf+xml"
href="http://www.gnu.org/licenses/gpl-3.0.rdf" />
</head>
<body>
<h3 style="text-align: center;">GNU GENERAL PUBLIC LICENSE</h3>
<p style="text-align: center;">Version 3, 29 June 2007</p>
<p>Copyright &copy; 2007 Free Software Foundation, Inc.
&lt;<a href="http://fsf.org/">http://fsf.org/</a>&gt;</p><p>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.</p>
<h3><a name="preamble"></a>Preamble</h3>
<p>The GNU General Public License is a free, copyleft license for
software and other kinds of works.</p>
<p>The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.</p>
<p>When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.</p>
<p>To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.</p>
<p>For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.</p>
<p>Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.</p>
<p>For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.</p>
<p>Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.</p>
<p>Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.</p>
<p>The precise terms and conditions for copying, distribution and
modification follow.</p>
<h3><a name="terms"></a>TERMS AND CONDITIONS</h3>
<h4><a name="section0"></a>0. Definitions.</h4>
<p>&ldquo;This License&rdquo; refers to version 3 of the GNU General Public License.</p>
<p>&ldquo;Copyright&rdquo; also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.</p>
<p>&ldquo;The Program&rdquo; refers to any copyrightable work licensed under this
License. Each licensee is addressed as &ldquo;you&rdquo;. &ldquo;Licensees&rdquo; and
&ldquo;recipients&rdquo; may be individuals or organizations.</p>
<p>To &ldquo;modify&rdquo; a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a &ldquo;modified version&rdquo; of the
earlier work or a work &ldquo;based on&rdquo; the earlier work.</p>
<p>A &ldquo;covered work&rdquo; means either the unmodified Program or a work based
on the Program.</p>
<p>To &ldquo;propagate&rdquo; a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.</p>
<p>To &ldquo;convey&rdquo; a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.</p>
<p>An interactive user interface displays &ldquo;Appropriate Legal Notices&rdquo;
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.</p>
<h4><a name="section1"></a>1. Source Code.</h4>
<p>The &ldquo;source code&rdquo; for a work means the preferred form of the work
for making modifications to it. &ldquo;Object code&rdquo; means any non-source
form of a work.</p>
<p>A &ldquo;Standard Interface&rdquo; means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.</p>
<p>The &ldquo;System Libraries&rdquo; of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
&ldquo;Major Component&rdquo;, in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.</p>
<p>The &ldquo;Corresponding Source&rdquo; for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.</p>
<p>The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.</p>
<p>The Corresponding Source for a work in source code form is that
same work.</p>
<h4><a name="section2"></a>2. Basic Permissions.</h4>
<p>All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.</p>
<p>You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.</p>
<p>Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.</p>
<h4><a name="section3"></a>3. Protecting Users' Legal Rights From Anti-Circumvention Law.</h4>
<p>No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.</p>
<p>When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.</p>
<h4><a name="section4"></a>4. Conveying Verbatim Copies.</h4>
<p>You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.</p>
<p>You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.</p>
<h4><a name="section5"></a>5. Conveying Modified Source Versions.</h4>
<p>You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:</p>
<ul>
<li>a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.</li>
<li>b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
&ldquo;keep intact all notices&rdquo;.</li>
<li>c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.</li>
<li>d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.</li>
</ul>
<p>A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
&ldquo;aggregate&rdquo; if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.</p>
<h4><a name="section6"></a>6. Conveying Non-Source Forms.</h4>
<p>You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:</p>
<ul>
<li>a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.</li>
<li>b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.</li>
<li>c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.</li>
<li>d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.</li>
<li>e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.</li>
</ul>
<p>A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.</p>
<p>A &ldquo;User Product&rdquo; is either (1) a &ldquo;consumer product&rdquo;, which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, &ldquo;normally used&rdquo; refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.</p>
<p>&ldquo;Installation Information&rdquo; for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.</p>
<p>If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).</p>
<p>The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.</p>
<p>Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.</p>
<h4><a name="section7"></a>7. Additional Terms.</h4>
<p>&ldquo;Additional permissions&rdquo; are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.</p>
<p>When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.</p>
<p>Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:</p>
<ul>
<li>a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or</li>
<li>b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or</li>
<li>c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or</li>
<li>d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or</li>
<li>e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or</li>
<li>f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.</li>
</ul>
<p>All other non-permissive additional terms are considered &ldquo;further
restrictions&rdquo; within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.</p>
<p>If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.</p>
<p>Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.</p>
<h4><a name="section8"></a>8. Termination.</h4>
<p>You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).</p>
<p>However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.</p>
<p>Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.</p>
<p>Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.</p>
<h4><a name="section9"></a>9. Acceptance Not Required for Having Copies.</h4>
<p>You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.</p>
<h4><a name="section10"></a>10. Automatic Licensing of Downstream Recipients.</h4>
<p>Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.</p>
<p>An &ldquo;entity transaction&rdquo; is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.</p>
<p>You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.</p>
<h4><a name="section11"></a>11. Patents.</h4>
<p>A &ldquo;contributor&rdquo; is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's &ldquo;contributor version&rdquo;.</p>
<p>A contributor's &ldquo;essential patent claims&rdquo; are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, &ldquo;control&rdquo; includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.</p>
<p>Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.</p>
<p>In the following three paragraphs, a &ldquo;patent license&rdquo; is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To &ldquo;grant&rdquo; such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.</p>
<p>If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. &ldquo;Knowingly relying&rdquo; means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.</p>
<p>If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.</p>
<p>A patent license is &ldquo;discriminatory&rdquo; if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.</p>
<p>Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.</p>
<h4><a name="section12"></a>12. No Surrender of Others' Freedom.</h4>
<p>If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.</p>
<h4><a name="section13"></a>13. Use with the GNU Affero General Public License.</h4>
<p>Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.</p>
<h4><a name="section14"></a>14. Revised Versions of this License.</h4>
<p>The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.</p>
<p>Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License &ldquo;or any later version&rdquo; applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.</p>
<p>If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.</p>
<p>Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.</p>
<h4><a name="section15"></a>15. Disclaimer of Warranty.</h4>
<p>THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM &ldquo;AS IS&rdquo; WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.</p>
<h4><a name="section16"></a>16. Limitation of Liability.</h4>
<p>IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.</p>
<h4><a name="section17"></a>17. Interpretation of Sections 15 and 16.</h4>
<p>If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.</p>
</body></html>

View File

@@ -0,0 +1,26 @@
<html>
<head></head>
<body>
<p>Copyright (c) &lt;year&gt; &lt;copyright holders&gt;</p>
<p>Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:</p>
<p>
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.</p>
<p>
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.<br />
NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>
</body>
</html>

View File

@@ -0,0 +1,260 @@
<!DOCTYPE html>
<!-- saved from url=(0038)https://www.mozilla.org/en-US/MPL/2.0/ -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Mozilla Public License, version 2.0</title>
<body>
<h1 id="mozilla-public-license-version-2.0">Mozilla Public License<br>Version 2.0</h1>
<h2 id="definitions">1. Definitions</h2>
<dl>
<dt>1.1. “Contributor”</dt>
<dd><p>means each individual or legal entity that creates, contributes to the creation of, or
owns Covered Software.</p>
</dd>
<dt>1.2. “Contributor Version”</dt>
<dd><p>means the combination of the Contributions of others (if any) used by a Contributor and
that particular Contributors Contribution.</p>
</dd>
<dt>1.3. “Contribution”</dt>
<dd><p>means Covered Software of a particular Contributor.</p>
</dd>
<dt>1.4. “Covered Software”</dt>
<dd><p>means Source Code Form to which the initial Contributor has attached the notice in
Exhibit A, the Executable Form of such Source Code Form, and Modifications of such Source
Code Form, in each case including portions thereof.</p>
</dd>
<dt>1.5. “Incompatible With Secondary Licenses”</dt>
<dd><p>means</p>
<ol type="a">
<li><p>that the initial Contributor has attached the notice described in Exhibit B to
the Covered Software; or</p></li>
<li><p>that the Covered Software was made available under the terms of version 1.1 or
earlier of the License, but not also under the terms of a Secondary License.</p>
</li>
</ol>
</dd>
<dt>1.6. “Executable Form”</dt>
<dd><p>means any form of the work other than Source Code Form.</p>
</dd>
<dt>1.7. “Larger Work”</dt>
<dd><p>means a work that combines Covered Software with other material, in a separate file or
files, that is not Covered Software.</p>
</dd>
<dt>1.8. “License”</dt>
<dd><p>means this document.</p>
</dd>
<dt>1.9. “Licensable”</dt>
<dd><p>means having the right to grant, to the maximum extent possible, whether at the time of
the initial grant or subsequently, any and all of the rights conveyed by this License.</p>
</dd>
<dt>1.10. “Modifications”</dt>
<dd><p>means any of the following:</p>
<ol type="a">
<li><p>any file in Source Code Form that results from an addition to, deletion from, or
modification of the contents of Covered Software; or</p></li>
<li><p>any new file in Source Code Form that contains any Covered Software.</p></li>
</ol>
</dd>
<dt>1.11. “Patent Claims” of a Contributor</dt>
<dd><p>means any patent claim(s), including without limitation, method, process, and apparatus
claims, in any patent Licensable by such Contributor that would be infringed, but for the
grant of the License, by the making, using, selling, offering for sale, having made, import,
or transfer of either its Contributions or its Contributor Version.</p>
</dd>
<dt>1.12. “Secondary License”</dt>
<dd><p>means either the GNU General Public License, Version 2.0, the GNU Lesser General Public
License, Version 2.1, the GNU Affero General Public License, Version 3.0, or any later
versions of those licenses.</p>
</dd>
<dt>1.13. “Source Code Form”</dt>
<dd><p>means the form of the work preferred for making modifications.</p>
</dd>
<dt>1.14. “You” (or “Your”)</dt>
<dd><p>means an individual or a legal entity exercising rights under this License. For legal
entities, “You” includes any entity that controls, is controlled by, or is under common
control with You. For purposes of this definition, “control” means (a) the power, direct or
indirect, to cause the direction or management of such entity, whether by contract or
otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or
beneficial ownership of such entity.</p>
</dd>
</dl>
<h2 id="license-grants-and-conditions">2. License Grants and Conditions</h2>
<h3 id="grants">2.1. Grants</h3>
<p>Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license:</p>
<ol type="a">
<li><p>under intellectual property rights (other than patent or trademark) Licensable by such
Contributor to use, reproduce, make available, modify, display, perform, distribute, and
otherwise exploit its Contributions, either on an unmodified basis, with Modifications, or
as part of a Larger Work; and</p></li>
<li><p>under Patent Claims of such Contributor to make, use, sell, offer for sale, have made,
import, and otherwise transfer either its Contributions or its Contributor Version.</p></li>
</ol>
<h3 id="effective-date">2.2. Effective Date</h3>
<p>The licenses granted in Section&nbsp;2.1 with respect to any Contribution become effective for
each Contribution on the date the Contributor first distributes such Contribution.</p>
<h3 id="limitations-on-grant-scope">2.3. Limitations on Grant Scope</h3>
<p>The licenses granted in this Section&nbsp;2 are the only rights granted under this License. No
additional rights or licenses will be implied from the distribution or licensing of Covered
Software under this License. Notwithstanding Section&nbsp;2.1(b) above, no patent license is
granted by a Contributor:</p>
<ol type="a">
<li><p>for any code that a Contributor has removed from Covered Software; or</p></li>
<li><p>for infringements caused by: (i) Your and any other third partys modifications of
Covered Software, or (ii) the combination of its Contributions with other software (except
as part of its Contributor Version); or</p></li>
<li><p>under Patent Claims infringed by Covered Software in the absence of its
Contributions.</p></li>
</ol>
<p>This License does not grant any rights in the trademarks, service marks, or logos of any
Contributor (except as may be necessary to comply with the notice requirements in Section&nbsp;3.4).</p>
<h3 id="subsequent-licenses">2.4. Subsequent Licenses</h3>
<p>No Contributor makes additional grants as a result of Your choice to distribute the Covered
Software under a subsequent version of this License (see Section&nbsp;10.2) or under the terms
of a Secondary License (if permitted under the terms of Section&nbsp;3.3).</p>
<h3 id="representation">2.5. Representation</h3>
<p>Each Contributor represents that the Contributor believes its Contributions are its original
creation(s) or it has sufficient rights to grant the rights to its Contributions conveyed by
this License.</p>
<h3 id="fair-use">2.6. Fair Use</h3>
<p>This License is not intended to limit any rights You have under applicable copyright doctrines of
fair use, fair dealing, or other equivalents.</p>
<h3 id="conditions">2.7. Conditions</h3>
<p>Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in Section&nbsp;2.1.</p>
<h2 id="responsibilities">3. Responsibilities</h2>
<h3 id="distribution-of-source-form">3.1. Distribution of Source Form</h3>
<p>All distribution of Covered Software in Source Code Form, including any Modifications that You
create or to which You contribute, must be under the terms of this License. You must inform
recipients that the Source Code Form of the Covered Software is governed by the terms of this
License, and how they can obtain a copy of this License. You may not attempt to alter or
restrict the recipients rights in the Source Code Form.</p>
<h3 id="distribution-of-executable-form">3.2. Distribution of Executable Form</h3>
<p>If You distribute Covered Software in Executable Form then:</p>
<ol type="a">
<li><p>such Covered Software must also be made available in Source Code Form, as described in
Section&nbsp;3.1, and You must inform recipients of the Executable Form how they can obtain
a copy of such Source Code Form by reasonable means in a timely manner, at a charge no more
than the cost of distribution to the recipient; and</p></li>
<li><p>You may distribute such Executable Form under the terms of this License, or sublicense it
under different terms, provided that the license for the Executable Form does not attempt to
limit or alter the recipients rights in the Source Code Form under this License.</p></li>
</ol>
<h3 id="distribution-of-a-larger-work">3.3. Distribution of a Larger Work</h3>
<p>You may create and distribute a Larger Work under terms of Your choice, provided that You also
comply with the requirements of this License for the Covered Software. If the Larger Work is a
combination of Covered Software with a work governed by one or more Secondary Licenses, and the
Covered Software is not Incompatible With Secondary Licenses, this License permits You to
additionally distribute such Covered Software under the terms of such Secondary License(s), so
that the recipient of the Larger Work may, at their option, further distribute the Covered
Software under the terms of either this License or such Secondary License(s).</p>
<h3 id="notices">3.4. Notices</h3>
<p>You may not remove or alter the substance of any license notices (including copyright notices,
patent notices, disclaimers of warranty, or limitations of liability) contained within the
Source Code Form of the Covered Software, except that You may alter any license notices to the
extent required to remedy known factual inaccuracies.</p>
<h3 id="application-of-additional-terms">3.5. Application of Additional Terms</h3>
<p>You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability
obligations to one or more recipients of Covered Software. However, You may do so only on Your
own behalf, and not on behalf of any Contributor. You must make it absolutely clear that any
such warranty, support, indemnity, or liability obligation is offered by You alone, and You
hereby agree to indemnify every Contributor for any liability incurred by such Contributor as a
result of warranty, support, indemnity or liability terms You offer. You may include additional
disclaimers of warranty and limitations of liability specific to any jurisdiction.</p>
<h2 id="inability-to-comply-due-to-statute-or-regulation">4. Inability to Comply Due to Statute or
Regulation</h2>
<p>If it is impossible for You to comply with any of the terms of this License with respect to some
or all of the Covered Software due to statute, judicial order, or regulation then You must: (a)
comply with the terms of this License to the maximum extent possible; and (b) describe the
limitations and the code they affect. Such description must be placed in a text file included
with all distributions of the Covered Software under this License. Except to the extent
prohibited by statute or regulation, such description must be sufficiently detailed for a
recipient of ordinary skill to be able to understand it.</p>
<h2 id="termination">5. Termination</h2>
<p>5.1. The rights granted under this License will terminate automatically if You fail to comply
with any of its terms. However, if You become compliant, then the rights granted under this
License from a particular Contributor are reinstated (a) provisionally, unless and until such
Contributor explicitly and finally terminates Your grants, and (b) on an ongoing basis, if such
Contributor fails to notify You of the non-compliance by some reasonable means prior to 60 days
after You have come back into compliance. Moreover, Your grants from a particular Contributor
are reinstated on an ongoing basis if such Contributor notifies You of the non-compliance by
some reasonable means, this is the first time You have received notice of non-compliance with
this License from such Contributor, and You become compliant prior to 30 days after Your receipt
of the notice.</p>
<p>5.2. If You initiate litigation against any entity by asserting a patent infringement claim
(excluding declaratory judgment actions, counter-claims, and cross-claims) alleging that a
Contributor Version directly or indirectly infringes any patent, then the rights granted to You
by any and all Contributors for the Covered Software under Section&nbsp;2.1 of this License
shall terminate.</p>
<p>5.3. In the event of termination under Sections&nbsp;5.1 or 5.2 above, all end user license
agreements (excluding distributors and resellers) which have been validly granted by You or Your
distributors under this License prior to termination shall survive termination.</p>
<h2 id="disclaimer-of-warranty">6. Disclaimer of Warranty</h2>
<p><em>Covered Software is provided under this License on an “as is” basis, without warranty of any
kind, either expressed, implied, or statutory, including, without limitation, warranties that
the Covered Software is free of defects, merchantable, fit for a particular purpose or
non-infringing. The entire risk as to the quality and performance of the Covered Software is
with You. Should any Covered Software prove defective in any respect, You (not any Contributor)
assume the cost of any necessary servicing, repair, or correction. This disclaimer of warranty
constitutes an essential part of this License. No use of any Covered Software is authorized
under this License except under this disclaimer.</em></p>
<h2 id="limitation-of-liability">7. Limitation of Liability</h2>
<p><em>Under no circumstances and under no legal theory, whether tort (including negligence),
contract, or otherwise, shall any Contributor, or anyone who distributes Covered Software as
permitted above, be liable to You for any direct, indirect, special, incidental, or
consequential damages of any character including, without limitation, damages for lost profits,
loss of goodwill, work stoppage, computer failure or malfunction, or any and all other
commercial damages or losses, even if such party shall have been informed of the possibility of
such damages. This limitation of liability shall not apply to liability for death or personal
injury resulting from such partys negligence to the extent applicable law prohibits such
limitation. Some jurisdictions do not allow the exclusion or limitation of incidental or
consequential damages, so this exclusion and limitation may not apply to You.</em></p>
<h2 id="litigation">8. Litigation</h2>
<p>Any litigation relating to this License may be brought only in the courts of a jurisdiction where
the defendant maintains its principal place of business and such litigation shall be governed by
laws of that jurisdiction, without reference to its conflict-of-law provisions. Nothing in this
Section shall prevent a partys ability to bring cross-claims or counter-claims.</p>
<h2 id="miscellaneous">9. Miscellaneous</h2>
<p>This License represents the complete agreement concerning the subject matter hereof. If any
provision of this License is held to be unenforceable, such provision shall be reformed only to
the extent necessary to make it enforceable. Any law or regulation which provides that the
language of a contract shall be construed against the drafter shall not be used to construe this
License against a Contributor.</p>
<h2 id="versions-of-the-license">10. Versions of the License</h2>
<h3 id="new-versions">10.1. New Versions</h3>
<p>Mozilla Foundation is the license steward. Except as provided in Section&nbsp;10.3, no one other
than the license steward has the right to modify or publish new versions of this License. Each
version will be given a distinguishing version number.</p>
<h3 id="effect-of-new-versions">10.2. Effect of New Versions</h3>
<p>You may distribute the Covered Software under the terms of the version of the License under which
You originally received the Covered Software, or under the terms of any subsequent version
published by the license steward.</p>
<h3 id="modified-versions">10.3. Modified Versions</h3>
<p>If you create software not governed by this License, and you want to create a new license for
such software, you may create and use a modified version of this License if you rename the
license and remove any references to the name of the license steward (except to note that such
modified license differs from this License).</p>
<h3 id="distributing-source-code-form-that-is-incompatible-with-secondary-licenses">10.4.
Distributing Source Code Form that is Incompatible With Secondary Licenses</h3>
<p>If You choose to distribute Source Code Form that is Incompatible With Secondary Licenses under
the terms of this version of the License, the notice described in Exhibit B of this License must
be attached.</p>
<h2 id="exhibit-a---source-code-form-license-notice">Exhibit A - Source Code Form License
Notice</h2>
<blockquote>
<p>This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a
copy of the MPL was not distributed with this file, You can obtain one at
https://mozilla.org/MPL/2.0/.</p>
</blockquote>
<p>If it is not possible or desirable to put the notice in a particular file, then You may include
the notice in a location (such as a LICENSE file in a relevant directory) where a recipient
would be likely to look for such a notice.</p>
<p>You may add additional accurate notices of copyright ownership.</p>
<h2 id="exhibit-b---incompatible-with-secondary-licenses-notice">Exhibit B - “Incompatible With
Secondary Licenses” Notice</h2>
<blockquote>
<p>This Source Code Form is “Incompatible With Secondary Licenses”, as defined by the Mozilla
Public License, v. 2.0.</p>
</blockquote>
</body>
</html>

View File

@@ -1,329 +0,0 @@
package org.schabi.newpipe;
import android.app.DownloadManager;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.net.Uri;
import android.os.Bundle;
import android.preference.Preference;
import android.preference.PreferenceManager;
import android.support.v4.view.MenuItemCompat;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.widget.ArrayAdapter;
import java.io.File;
/**
* Created by Christian Schabesberger on 18.08.15.
*
* Copyright (C) Christian Schabesberger 2015 <chris.schabesberger@mailbox.org>
* DetailsMenuHandler.java is part of NewPipe.
*
* NewPipe is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NewPipe is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NewPipe. If not, see <http://www.gnu.org/licenses/>.
*/
public class ActionBarHandler {
private static final String TAG = ActionBarHandler.class.toString();
private static final String KORE_PACKET = "org.xbmc.kore";
private static ActionBarHandler handler = null;
private Context context = null;
private String webisteUrl = "";
private AppCompatActivity activity;
private VideoInfo.VideoStream[] videoStreams = null;
private VideoInfo.AudioStream audioStream = null;
private int selectedStream = -1;
private String videoTitle = "";
SharedPreferences defaultPreferences = null;
public static ActionBarHandler getHandler() {
if(handler == null) {
handler = new ActionBarHandler();
}
return handler;
}
class ForamatItemSelectListener implements ActionBar.OnNavigationListener {
@Override
public boolean onNavigationItemSelected(int itemPosition, long itemId) {
selectFormatItem((int)itemId);
return true;
}
}
public void setupNavMenu(AppCompatActivity activity) {
this.activity = activity;
activity.getSupportActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
}
public void setStreams(VideoInfo.VideoStream[] videoStreams, VideoInfo.AudioStream[] audioStreams) {
this.videoStreams = videoStreams;
selectedStream = 0;
String[] itemArray = new String[videoStreams.length];
String defaultResolution = defaultPreferences
.getString(context.getString(R.string.defaultResolutionPreference),
context.getString(R.string.defaultResolutionListItem));
int defaultResolutionPos = 0;
for(int i = 0; i < videoStreams.length; i++) {
itemArray[i] = VideoInfo.getNameById(videoStreams[i].format) + " " + videoStreams[i].resolution;
if(defaultResolution.equals(videoStreams[i].resolution)) {
defaultResolutionPos = i;
}
}
ArrayAdapter<String> itemAdapter = new ArrayAdapter<String>(activity.getBaseContext(),
android.R.layout.simple_spinner_dropdown_item, itemArray);
if(activity != null) {
ActionBar ab = activity.getSupportActionBar();
ab.setListNavigationCallbacks(itemAdapter
,new ForamatItemSelectListener());
ab.setSelectedNavigationItem(defaultResolutionPos);
}
// set audioStream
audioStream = null;
String preferedFormat = PreferenceManager.getDefaultSharedPreferences(context)
.getString(context.getString(R.string.defaultAudioFormatPreference), "webm");
if(preferedFormat.equals("webm")) {
for(VideoInfo.AudioStream s : audioStreams) {
if(s.format == VideoInfo.I_WEBMA) {
audioStream = s;
}
}
} else if(preferedFormat.equals("m4a")){
for(VideoInfo.AudioStream s : audioStreams) {
Log.d(TAG, VideoInfo.getMimeById(s.format) + " : " + Integer.toString(s.bandWidth));
if(s.format == VideoInfo.I_M4A &&
(audioStream == null || audioStream.bandWidth > s.bandWidth)) {
audioStream = s;
Log.d(TAG, "last choosen");
}
}
}
}
private void selectFormatItem(int i) {
selectedStream = i;
}
public boolean setupMenu(Menu menu, MenuInflater inflater, Context context) {
this.context = context;
// CAUTION set item properties programmatically otherwise it would not be accepted by
// appcompat itemsinflater.inflate(R.menu.videoitem_detail, menu);
defaultPreferences = PreferenceManager.getDefaultSharedPreferences(context);
inflater.inflate(R.menu.videoitem_detail, menu);
MenuItem playItem = menu.findItem(R.id.menu_item_play);
MenuItem shareItem = menu.findItem(R.id.menu_item_share);
MenuItem castItem = menu.findItem(R.id.action_play_with_kodi);
MenuItemCompat.setShowAsAction(playItem, MenuItemCompat.SHOW_AS_ACTION_ALWAYS
| MenuItemCompat.SHOW_AS_ACTION_WITH_TEXT);
MenuItemCompat.setShowAsAction(shareItem, MenuItemCompat.SHOW_AS_ACTION_IF_ROOM
| MenuItemCompat.SHOW_AS_ACTION_WITH_TEXT);
castItem.setVisible(defaultPreferences
.getBoolean(context.getString(R.string.showPlayWidthKodiPreference), false));
return true;
}
public boolean onItemSelected(MenuItem item, Context context) {
this.context = context;
int id = item.getItemId();
switch(id) {
case R.id.menu_item_play:
playVideo();
break;
case R.id.menu_item_share:
if(!videoTitle.isEmpty()) {
Intent intent = new Intent();
intent.setAction(Intent.ACTION_SEND);
intent.putExtra(Intent.EXTRA_TEXT, webisteUrl);
intent.setType("text/plain");
context.startActivity(Intent.createChooser(intent, context.getString(R.string.shareDialogTitle)));
}
break;
case R.id.menu_item_openInBrowser: {
openInBrowser();
}
break;
case R.id.menu_item_download:
downloadVideo();
break;
case R.id.action_settings: {
Intent intent = new Intent(context, SettingsActivity.class);
context.startActivity(intent);
}
break;
case R.id.action_play_with_kodi:
playWithKodi();
break;
case R.id.menu_item_play_audio:
playAudio();
break;
default:
Log.e(TAG, "Menu Item not known");
}
return true;
}
public void setVideoInfo(String websiteUrl, String videoTitle) {
this.webisteUrl = websiteUrl;
this.videoTitle = videoTitle;
}
public void playVideo() {
// ----------- THE MAGIC MOMENT ---------------
if(!videoTitle.isEmpty()) {
if (PreferenceManager.getDefaultSharedPreferences(context)
.getBoolean(context.getString(R.string.useExternalPlayer), false)) {
Intent intent = new Intent();
try {
intent.setAction(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.parse(videoStreams[selectedStream].url),
VideoInfo.getMimeById(videoStreams[selectedStream].format));
context.startActivity(intent); // HERE !!!
} catch (Exception e) {
e.printStackTrace();
AlertDialog.Builder builder = new AlertDialog.Builder(context);
builder.setMessage(R.string.noPlayerFound)
.setPositiveButton(R.string.installStreamPlayer, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Intent intent = new Intent();
intent.setAction(Intent.ACTION_VIEW);
intent.setData(Uri.parse(context.getString(R.string.fdroidVLCurl)));
context.startActivity(intent);
}
})
.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
}
});
builder.create().show();
}
} else {
Intent intent = new Intent(context, PlayVideoActivity.class);
intent.putExtra(PlayVideoActivity.VIDEO_TITLE, videoTitle);
intent.putExtra(PlayVideoActivity.STREAM_URL, videoStreams[selectedStream].url);
intent.putExtra(PlayVideoActivity.VIDEO_URL, webisteUrl);
context.startActivity(intent);
}
}
// --------------------------------------------
}
public void downloadVideo() {
Log.d(TAG, "bla");
if(!videoTitle.isEmpty()) {
String videoSuffix = "." + VideoInfo.getSuffixById(videoStreams[selectedStream].format);
String audioSuffix = "." + VideoInfo.getSuffixById(audioStream.format);
Bundle args = new Bundle();
args.putString(DownloadDialog.FILE_SUFFIX_VIDEO, videoSuffix);
args.putString(DownloadDialog.FILE_SUFFIX_AUDIO, audioSuffix);
args.putString(DownloadDialog.TITLE, videoTitle);
args.putString(DownloadDialog.VIDEO_URL, videoStreams[selectedStream].url);
args.putString(DownloadDialog.AUDIO_URL, audioStream.url);
DownloadDialog downloadDialog = new DownloadDialog();
downloadDialog.setArguments(args);
downloadDialog.show(activity.getSupportFragmentManager(), "downloadDialog");
}
}
public void openInBrowser() {
if(!videoTitle.isEmpty()) {
Intent intent = new Intent();
intent.setAction(Intent.ACTION_VIEW);
intent.setData(Uri.parse(webisteUrl));
context.startActivity(Intent.createChooser(intent, context.getString(R.string.chooseBrowser)));
}
}
public void playWithKodi() {
if(!videoTitle.isEmpty()) {
try {
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setPackage(KORE_PACKET);
intent.setData(Uri.parse(webisteUrl.replace("https", "http")));
context.startActivity(intent);
} catch (Exception e) {
e.printStackTrace();
AlertDialog.Builder builder = new AlertDialog.Builder(context);
builder.setMessage(R.string.koreNotFound)
.setPositiveButton(R.string.installeKore, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Intent intent = new Intent();
intent.setAction(Intent.ACTION_VIEW);
intent.setData(Uri.parse(context.getString(R.string.fdroidKoreUrl)));
context.startActivity(intent);
}
})
.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
}
});
builder.create().show();
}
}
}
public void playAudio() {
Intent intent = new Intent();
try {
intent.setAction(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.parse(audioStream.url),
VideoInfo.getMimeById(audioStream.format));
context.startActivity(intent); // HERE !!!
} catch (Exception e) {
e.printStackTrace();
AlertDialog.Builder builder = new AlertDialog.Builder(context);
builder.setMessage(R.string.noPlayerFound)
.setPositiveButton(R.string.installStreamPlayer, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Intent intent = new Intent();
intent.setAction(Intent.ACTION_VIEW);
intent.setData(Uri.parse(context.getString(R.string.fdroidVLCurl)));
context.startActivity(intent);
}
})
.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Log.i(TAG, "You unlocked a secret unicorn.");
}
});
builder.create().show();
}
}
}

View File

@@ -1,10 +1,10 @@
package org.schabi.newpipe;
/**
* Created by Christian Schabesberger on 23.08.15.
/*
* Created by Christian Schabesberger on 24.12.15.
*
* Copyright (C) Christian Schabesberger 2015 <chris.schabesberger@mailbox.org>
* StreamingService.java is part of NewPipe.
* ActivityCommunicator.java is part of NewPipe.
*
* NewPipe is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -20,16 +20,20 @@ package org.schabi.newpipe;
* along with NewPipe. If not, see <http://www.gnu.org/licenses/>.
*/
public interface StreamingService {
class ServiceInfo {
public String name = "";
}
ServiceInfo getServiceInfo();
Class getExtractorClass();
Class getSearchEngineClass();
/**
* Singleton:
* Used to send data between certain Activity/Services within the same process.
* This can be considered as an ugly hack inside the Android universe. **/
public class ActivityCommunicator {
// When a VIEW_ACTION is caught this function will test if the url delivered within the calling
// Intent was meant to be watched with this Service.
// Return false if this service shall not allow to be callean through ACTIONs.
boolean acceptUrl(String videoUrl);
private static ActivityCommunicator activityCommunicator;
public static ActivityCommunicator getCommunicator() {
if(activityCommunicator == null) {
activityCommunicator = new ActivityCommunicator();
}
return activityCommunicator;
}
public volatile Class returnActivity;
}

View File

@@ -0,0 +1,152 @@
package org.schabi.newpipe;
import android.app.Application;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.content.Context;
import android.os.Build;
import android.util.Log;
import com.nostra13.universalimageloader.core.ImageLoader;
import com.nostra13.universalimageloader.core.ImageLoaderConfiguration;
import org.acra.ACRA;
import org.acra.config.ACRAConfiguration;
import org.acra.config.ACRAConfigurationException;
import org.acra.config.ConfigurationBuilder;
import org.acra.sender.ReportSenderFactory;
import org.schabi.newpipe.extractor.NewPipe;
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.StateSaver;
import java.io.IOException;
import java.io.InterruptedIOException;
import java.net.SocketException;
import io.reactivex.annotations.NonNull;
import io.reactivex.exceptions.CompositeException;
import io.reactivex.exceptions.UndeliverableException;
import io.reactivex.functions.Consumer;
import io.reactivex.plugins.RxJavaPlugins;
/*
* Copyright (C) Hans-Christoph Steiner 2016 <hans@eds.org>
* App.java is part of NewPipe.
*
* NewPipe is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NewPipe is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NewPipe. If not, see <http://www.gnu.org/licenses/>.
*/
public class App extends Application {
protected static final String TAG = App.class.toString();
@SuppressWarnings("unchecked")
private static final Class<? extends ReportSenderFactory>[] reportSenderFactoryClasses = new Class[]{AcraReportSenderFactory.class};
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
initACRA();
}
@Override
public void onCreate() {
super.onCreate();
// Initialize settings first because others inits can use its values
SettingsActivity.initSettings(this);
NewPipe.init(Downloader.getInstance());
NewPipeDatabase.init(this);
StateSaver.init(this);
initNotificationChannel();
// Initialize image loader
ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(this).build();
ImageLoader.getInstance().init(config);
configureRxJavaErrorHandler();
}
private void configureRxJavaErrorHandler() {
// https://github.com/ReactiveX/RxJava/wiki/What's-different-in-2.0#error-handling
RxJavaPlugins.setErrorHandler(new Consumer<Throwable>() {
@Override
public void accept(@NonNull Throwable throwable) throws Exception {
Log.e(TAG, "RxJavaPlugins.ErrorHandler called with -> : throwable = [" + throwable.getClass().getName() + "]");
if (throwable instanceof UndeliverableException) {
// As UndeliverableException is a wrapper, get the cause of it to get the "real" exception
throwable = throwable.getCause();
}
if (throwable instanceof CompositeException) {
for (Throwable element : ((CompositeException) throwable).getExceptions()) {
if (checkThrowable(element)) return;
}
}
if (checkThrowable(throwable)) return;
// Throw uncaught exception that will trigger the report system
Thread.currentThread().getUncaughtExceptionHandler()
.uncaughtException(Thread.currentThread(), throwable);
}
private boolean checkThrowable(@NonNull Throwable throwable) {
// Don't crash the application over a simple network problem
return ExtractorHelper.hasAssignableCauseThrowable(throwable,
IOException.class, SocketException.class, InterruptedException.class, InterruptedIOException.class);
}
});
}
private void initACRA() {
try {
final ACRAConfiguration acraConfig = new ConfigurationBuilder(this)
.setReportSenderFactoryClasses(reportSenderFactoryClasses)
.setBuildConfigClass(BuildConfig.class)
.build();
ACRA.init(this, acraConfig);
} catch (ACRAConfigurationException ace) {
ace.printStackTrace();
ErrorActivity.reportError(this, ace, null, null, ErrorActivity.ErrorInfo.make(UserAction.SOMETHING_ELSE, "none",
"Could not initialize ACRA crash report", R.string.app_ui_crash));
}
}
public void initNotificationChannel() {
if (Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.O) {
return;
}
final String id = getString(R.string.notification_channel_id);
final CharSequence name = getString(R.string.notification_channel_name);
final String description = getString(R.string.notification_channel_description);
// Keep this below DEFAULT to avoid making noise on every notification update
final int importance = NotificationManager.IMPORTANCE_LOW;
NotificationChannel mChannel = new NotificationChannel(id, name, importance);
mChannel.setDescription(description);
NotificationManager mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
mNotificationManager.createNotificationChannel(mChannel);
}
}

View File

@@ -0,0 +1,121 @@
package org.schabi.newpipe;
import android.content.Context;
import android.content.res.TypedArray;
import android.os.Bundle;
import android.support.annotation.AttrRes;
import android.support.annotation.NonNull;
import android.support.v4.app.Fragment;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
import com.nostra13.universalimageloader.core.DisplayImageOptions;
import com.nostra13.universalimageloader.core.ImageLoader;
import com.nostra13.universalimageloader.core.display.FadeInBitmapDisplayer;
import icepick.Icepick;
public abstract class BaseFragment extends Fragment {
protected final String TAG = getClass().getSimpleName() + "@" + Integer.toHexString(hashCode());
protected boolean DEBUG = MainActivity.DEBUG;
protected AppCompatActivity activity;
public static final ImageLoader imageLoader = ImageLoader.getInstance();
/*//////////////////////////////////////////////////////////////////////////
// Fragment's Lifecycle
//////////////////////////////////////////////////////////////////////////*/
@Override
public void onAttach(Context context) {
super.onAttach(context);
activity = (AppCompatActivity) context;
}
@Override
public void onDetach() {
super.onDetach();
activity = null;
}
@Override
public void onCreate(Bundle savedInstanceState) {
if (DEBUG) Log.d(TAG, "onCreate() called with: savedInstanceState = [" + savedInstanceState + "]");
super.onCreate(savedInstanceState);
Icepick.restoreInstanceState(this, savedInstanceState);
if (savedInstanceState != null) onRestoreInstanceState(savedInstanceState);
}
@Override
public void onViewCreated(View rootView, Bundle savedInstanceState) {
super.onViewCreated(rootView, savedInstanceState);
if (DEBUG) {
Log.d(TAG, "onViewCreated() called with: rootView = [" + rootView + "], savedInstanceState = [" + savedInstanceState + "]");
}
initViews(rootView, savedInstanceState);
initListeners();
}
@Override
public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
Icepick.saveInstanceState(this, outState);
}
protected void onRestoreInstanceState(@NonNull Bundle savedInstanceState) {
}
/*//////////////////////////////////////////////////////////////////////////
// Init
//////////////////////////////////////////////////////////////////////////*/
protected void initViews(View rootView, Bundle savedInstanceState) {
}
protected void initListeners() {
}
/*//////////////////////////////////////////////////////////////////////////
// Utils
//////////////////////////////////////////////////////////////////////////*/
protected final int resolveResourceIdFromAttr(@AttrRes int attr) {
TypedArray a = activity.getTheme().obtainStyledAttributes(new int[]{attr});
int attributeResourceId = a.getResourceId(0, 0);
a.recycle();
return attributeResourceId;
}
/*//////////////////////////////////////////////////////////////////////////
// DisplayImageOptions default configurations
//////////////////////////////////////////////////////////////////////////*/
public static final DisplayImageOptions BASE_OPTIONS =
new DisplayImageOptions.Builder().cacheInMemory(true).build();
public static final DisplayImageOptions DISPLAY_AVATAR_OPTIONS =
new DisplayImageOptions.Builder()
.cloneFrom(BASE_OPTIONS)
.showImageOnLoading(R.drawable.buddy)
.showImageForEmptyUri(R.drawable.buddy)
.showImageOnFail(R.drawable.buddy)
.build();
public static final DisplayImageOptions DISPLAY_THUMBNAIL_OPTIONS =
new DisplayImageOptions.Builder()
.cloneFrom(BASE_OPTIONS)
.displayer(new FadeInBitmapDisplayer(250))
.showImageForEmptyUri(R.drawable.dummy_thumbnail)
.showImageOnFail(R.drawable.dummy_thumbnail)
.build();
public static final DisplayImageOptions DISPLAY_BANNER_OPTIONS =
new DisplayImageOptions.Builder()
.cloneFrom(BASE_OPTIONS)
.showImageOnLoading(R.drawable.channel_banner)
.showImageForEmptyUri(R.drawable.channel_banner)
.showImageOnFail(R.drawable.channel_banner)
.build();
}

View File

@@ -1,89 +0,0 @@
package org.schabi.newpipe;
import android.app.Dialog;
import android.app.DownloadManager;
import android.content.Context;
import android.content.DialogInterface;
import android.content.SharedPreferences;
import android.net.Uri;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.v4.app.DialogFragment;
import android.support.v7.app.AlertDialog;
import android.util.Log;
import java.io.File;
/**
* Created by Christian Schabesberger on 21.09.15.
*
* Copyright (C) Christian Schabesberger 2015 <chris.schabesberger@mailbox.org>
* DownloadDialog.java is part of NewPipe.
*
* NewPipe is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NewPipe is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NewPipe. If not, see <http://www.gnu.org/licenses/>.
*/
public class DownloadDialog extends DialogFragment {
private static final String TAG = DialogFragment.class.getName();
public static final String TITLE = "name";
public static final String FILE_SUFFIX_AUDIO = "file_suffix_audio";
public static final String FILE_SUFFIX_VIDEO = "file_suffix_video";
public static final String AUDIO_URL = "audio_url";
public static final String VIDEO_URL = "video_url";
Bundle arguments;
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
arguments = getArguments();
super.onCreateDialog(savedInstanceState);
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
builder.setTitle(R.string.downloadDialogTitle)
.setItems(R.array.downloadOptions, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Context context = getActivity();
SharedPreferences defaultPreferences = PreferenceManager.getDefaultSharedPreferences(context);
String suffix = "";
String title = arguments.getString(TITLE);
String url = "";
switch(which) {
case 0: // Video
suffix = arguments.getString(FILE_SUFFIX_VIDEO);
url = arguments.getString(VIDEO_URL);
break;
case 1:
suffix = arguments.getString(FILE_SUFFIX_AUDIO);
url = arguments.getString(AUDIO_URL);
break;
default:
Log.d(TAG, "lolz");
}
DownloadManager dm = (DownloadManager) context.getSystemService(Context.DOWNLOAD_SERVICE);
DownloadManager.Request request = new DownloadManager.Request(
Uri.parse(url));
request.setDestinationUri(Uri.fromFile(new File(
defaultPreferences.getString("download_path_preference", "/storage/emulated/0/NewPipe")
+ "/" + title + suffix)));
try {
dm.enqueue(request);
} catch (Exception e) {
e.printStackTrace();
}
}
});
return builder.create();
}
}

View File

@@ -1,14 +1,27 @@
package org.schabi.newpipe;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import android.util.Log;
/**
* Created by Christian Schabesberger on 14.08.15.
import org.schabi.newpipe.extractor.exceptions.ReCaptchaException;
import org.schabi.newpipe.util.ExtractorHelper;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.InterruptedIOException;
import java.net.URL;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import javax.net.ssl.HttpsURLConnection;
/*
* Created by Christian Schabesberger on 28.01.16.
*
* Copyright (C) Christian Schabesberger 2015 <chris.schabesberger@mailbox.org>
* Copyright (C) Christian Schabesberger 2016 <chris.schabesberger@mailbox.org>
* Downloader.java is part of NewPipe.
*
* NewPipe is free software: you can redistribute it and/or modify
@@ -25,29 +38,134 @@ import java.net.URL;
* along with NewPipe. If not, see <http://www.gnu.org/licenses/>.
*/
public class Downloader {
public class Downloader implements org.schabi.newpipe.extractor.Downloader {
private static final String USER_AGENT = "Mozilla/5.0";
public static String download(String siteUrl) {
public static final String USER_AGENT = "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0";
private static String mCookies = "";
private static Downloader instance = null;
private Downloader() {
}
public static Downloader getInstance() {
if (instance == null) {
synchronized (Downloader.class) {
if (instance == null) {
instance = new Downloader();
}
}
}
return instance;
}
public static synchronized void setCookies(String cookies) {
Downloader.mCookies = cookies;
}
public static synchronized String getCookies() {
return Downloader.mCookies;
}
/**
* Download the text file at the supplied URL as in download(String),
* but set the HTTP header field "Accept-Language" to the supplied string.
*
* @param siteUrl the URL of the text file to return the contents of
* @param language the language (usually a 2-character code) to set as the preferred language
* @return the contents of the specified text file
*/
@Override
public String download(String siteUrl, String language) throws IOException, ReCaptchaException {
Map<String, String> requestProperties = new HashMap<>();
requestProperties.put("Accept-Language", language);
return download(siteUrl, requestProperties);
}
/**
* Download the text file at the supplied URL as in download(String),
* but set the HTTP headers included in the customProperties map.
*
* @param siteUrl the URL of the text file to return the contents of
* @param customProperties set request header properties
* @return the contents of the specified text file
* @throws IOException
*/
@Override
public String download(String siteUrl, Map<String, String> customProperties) throws IOException, ReCaptchaException {
URL url = new URL(siteUrl);
HttpsURLConnection con = (HttpsURLConnection) url.openConnection();
Iterator it = customProperties.entrySet().iterator();
while (it.hasNext()) {
Map.Entry pair = (Map.Entry) it.next();
con.setRequestProperty((String) pair.getKey(), (String) pair.getValue());
}
return dl(con);
}
/**
* Download (via HTTP) the text file located at the supplied URL, and return its contents.
* Primarily intended for downloading web pages.
*
* @param siteUrl the URL of the text file to download
* @return the contents of the specified text file
*/
@Override
public String download(String siteUrl) throws IOException, ReCaptchaException {
URL url = new URL(siteUrl);
HttpsURLConnection con = (HttpsURLConnection) url.openConnection();
//HttpsURLConnection con = NetCipher.getHttpsURLConnection(url);
return dl(con);
}
/**
* Common functionality between download(String url) and download(String url, String language)
*/
private static String dl(HttpsURLConnection con) throws IOException, ReCaptchaException {
StringBuilder response = new StringBuilder();
BufferedReader in = null;
StringBuffer response = new StringBuffer();
try {
URL url = new URL(siteUrl);
HttpURLConnection con = (HttpURLConnection) url.openConnection();
con.setReadTimeout(30 * 1000);// 30s
con.setRequestMethod("GET");
con.setRequestProperty("User-Agent", USER_AGENT);
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
if (getCookies().length() > 0) {
con.setRequestProperty("Cookie", getCookies());
}
in = new BufferedReader(new InputStreamReader(con.getInputStream()));
for (Map.Entry<String, List<String>> entry : con.getHeaderFields().entrySet()) {
System.err.println(entry.getKey() + ": " + entry.getValue());
}
String inputLine;
while((inputLine = in.readLine()) != null) {
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
} catch (Exception e) {
e.printStackTrace();
Log.e("Downloader", "dl() ----- Exception thrown → " + e.getClass().getName());
if (ExtractorHelper.isInterruptedCaused(e)) {
throw new InterruptedIOException(e.getMessage());
}
/*
* HTTP 429 == Too Many Request
* Receive from Youtube.com = ReCaptcha challenge request
* See : https://github.com/rg3/youtube-dl/issues/5138
*/
if (con.getResponseCode() == 429) {
throw new ReCaptchaException("reCaptcha Challenge requested");
}
throw new IOException(con.getResponseCode() + " " + con.getResponseMessage(), e);
} finally {
if (in != null) {
in.close();
}
}
return response.toString();
}
}

View File

@@ -0,0 +1,54 @@
package org.schabi.newpipe;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
/*
* Copyright (C) Hans-Christoph Steiner 2016 <hans@eds.org>
* ExitActivity.java is part of NewPipe.
*
* NewPipe is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NewPipe is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NewPipe. If not, see <http://www.gnu.org/licenses/>.
*/
public class ExitActivity extends Activity {
@SuppressLint("NewApi")
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (Build.VERSION.SDK_INT >= 21) {
finishAndRemoveTask();
} else {
finish();
}
System.exit(0);
}
public static void exitAndRemoveFromRecentApps(Activity activity) {
Intent intent = new Intent(activity, ExitActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK
| Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS
| Intent.FLAG_ACTIVITY_CLEAR_TASK
| Intent.FLAG_ACTIVITY_NO_ANIMATION);
activity.startActivity(intent);
}
}

View File

@@ -1,30 +0,0 @@
package org.schabi.newpipe;
import android.graphics.Bitmap;
/**
* Created by Christian Schabesberger on 10.08.15.
*
* Copyright (C) Christian Schabesberger 2015 <chris.schabesberger@mailbox.org>
* Extractor.java is part of NewPipe.
*
* NewPipe is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NewPipe is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NewPipe. If not, see <http://www.gnu.org/licenses/>.
*/
public interface Extractor {
VideoInfo getVideoInfo(String siteUrl);
String getVideoUrl(String videoId);
String getVideoId(String videoUrl);
}

View File

@@ -0,0 +1,324 @@
/*
* Created by Christian Schabesberger on 02.08.16.
* <p>
* Copyright (C) Christian Schabesberger 2016 <chris.schabesberger@mailbox.org>
* DownloadActivity.java is part of NewPipe.
* <p>
* NewPipe is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* NewPipe is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with NewPipe. If not, see <http://www.gnu.org/licenses/>.
*/
package org.schabi.newpipe;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.preference.PreferenceManager;
import android.support.annotation.NonNull;
import android.support.v4.app.Fragment;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import org.schabi.newpipe.database.AppDatabase;
import org.schabi.newpipe.database.history.dao.HistoryDAO;
import org.schabi.newpipe.database.history.dao.SearchHistoryDAO;
import org.schabi.newpipe.database.history.dao.WatchHistoryDAO;
import org.schabi.newpipe.database.history.model.HistoryEntry;
import org.schabi.newpipe.database.history.model.SearchHistoryEntry;
import org.schabi.newpipe.database.history.model.WatchHistoryEntry;
import org.schabi.newpipe.extractor.StreamingService;
import org.schabi.newpipe.extractor.stream.AudioStream;
import org.schabi.newpipe.extractor.stream.StreamInfo;
import org.schabi.newpipe.extractor.stream.VideoStream;
import org.schabi.newpipe.fragments.BackPressable;
import org.schabi.newpipe.fragments.detail.VideoDetailFragment;
import org.schabi.newpipe.fragments.list.search.SearchFragment;
import org.schabi.newpipe.history.HistoryListener;
import org.schabi.newpipe.util.Constants;
import org.schabi.newpipe.util.NavigationHelper;
import org.schabi.newpipe.util.StateSaver;
import org.schabi.newpipe.util.ThemeHelper;
import java.util.Date;
import io.reactivex.disposables.Disposable;
import io.reactivex.functions.Consumer;
import io.reactivex.schedulers.Schedulers;
import io.reactivex.subjects.PublishSubject;
public class MainActivity extends AppCompatActivity implements HistoryListener {
private static final String TAG = "MainActivity";
public static final boolean DEBUG = false;
private SharedPreferences sharedPreferences;
/*//////////////////////////////////////////////////////////////////////////
// Activity's LifeCycle
//////////////////////////////////////////////////////////////////////////*/
@Override
protected void onCreate(Bundle savedInstanceState) {
if (DEBUG) Log.d(TAG, "onCreate() called with: savedInstanceState = [" + savedInstanceState + "]");
ThemeHelper.setTheme(this);
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
if (getSupportFragmentManager() != null && getSupportFragmentManager().getBackStackEntryCount() == 0) {
initFragments();
}
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);
initHistory();
}
@Override
protected void onDestroy() {
super.onDestroy();
if (!isChangingConfigurations()) {
StateSaver.clearStateFiles();
}
disposeHistory();
}
@Override
protected void onResume() {
super.onResume();
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);
if (sharedPreferences.getBoolean(Constants.KEY_THEME_CHANGE, false)) {
if (DEBUG) Log.d(TAG, "Theme has changed, recreating activity...");
sharedPreferences.edit().putBoolean(Constants.KEY_THEME_CHANGE, false).apply();
// https://stackoverflow.com/questions/10844112/runtimeexception-performing-pause-of-activity-that-is-not-resumed
// Briefly, let the activity resume properly posting the recreate call to end of the message queue
new Handler(Looper.getMainLooper()).post(new Runnable() {
@Override
public void run() {
MainActivity.this.recreate();
}
});
}
}
@Override
protected void onNewIntent(Intent intent) {
if (DEBUG) Log.d(TAG, "onNewIntent() called with: intent = [" + intent + "]");
if (intent != null) {
// Return if launched from a launcher (e.g. Nova Launcher, Pixel Launcher ...)
// to not destroy the already created backstack
String action = intent.getAction();
if ((action != null && action.equals(Intent.ACTION_MAIN)) && intent.hasCategory(Intent.CATEGORY_LAUNCHER)) return;
}
super.onNewIntent(intent);
setIntent(intent);
handleIntent(intent);
}
@Override
public void onBackPressed() {
if (DEBUG) Log.d(TAG, "onBackPressed() called");
Fragment fragment = getSupportFragmentManager().findFragmentById(R.id.fragment_holder);
// If current fragment implements BackPressable (i.e. can/wanna handle back press) delegate the back press to it
if (fragment instanceof BackPressable) {
if (((BackPressable) fragment).onBackPressed()) return;
}
if (getSupportFragmentManager().getBackStackEntryCount() == 1) {
finish();
} else super.onBackPressed();
}
/*//////////////////////////////////////////////////////////////////////////
// Menu
//////////////////////////////////////////////////////////////////////////*/
@Override
public boolean onCreateOptionsMenu(Menu menu) {
if (DEBUG) Log.d(TAG, "onCreateOptionsMenu() called with: menu = [" + menu + "]");
super.onCreateOptionsMenu(menu);
Fragment fragment = getSupportFragmentManager().findFragmentById(R.id.fragment_holder);
if (!(fragment instanceof VideoDetailFragment)) {
findViewById(R.id.toolbar).findViewById(R.id.toolbar_spinner).setVisibility(View.GONE);
}
if (!(fragment instanceof SearchFragment)) {
findViewById(R.id.toolbar).findViewById(R.id.toolbar_search_container).setVisibility(View.GONE);
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.main_menu, menu);
}
ActionBar actionBar = getSupportActionBar();
if (actionBar != null) {
actionBar.setDisplayShowTitleEnabled(false);
actionBar.setDisplayHomeAsUpEnabled(false);
}
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
if (DEBUG) Log.d(TAG, "onOptionsItemSelected() called with: item = [" + item + "]");
int id = item.getItemId();
switch (id) {
case android.R.id.home:
NavigationHelper.gotoMainFragment(getSupportFragmentManager());
return true;
case R.id.action_settings:
NavigationHelper.openSettings(this);
return true;
case R.id.action_show_downloads:
return NavigationHelper.openDownloads(this);
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);
}
}
/*//////////////////////////////////////////////////////////////////////////
// Init
//////////////////////////////////////////////////////////////////////////*/
private void initFragments() {
if (DEBUG) Log.d(TAG, "initFragments() called");
StateSaver.clearStateFiles();
if (getIntent() != null && getIntent().hasExtra(Constants.KEY_LINK_TYPE)) {
handleIntent(getIntent());
} else NavigationHelper.gotoMainFragment(getSupportFragmentManager());
}
/*//////////////////////////////////////////////////////////////////////////
// Utils
//////////////////////////////////////////////////////////////////////////*/
private void handleIntent(Intent intent) {
if (DEBUG) Log.d(TAG, "handleIntent() called with: intent = [" + intent + "]");
if (intent.hasExtra(Constants.KEY_LINK_TYPE)) {
String url = intent.getStringExtra(Constants.KEY_URL);
int serviceId = intent.getIntExtra(Constants.KEY_SERVICE_ID, 0);
String title = intent.getStringExtra(Constants.KEY_TITLE);
switch (((StreamingService.LinkType) intent.getSerializableExtra(Constants.KEY_LINK_TYPE))) {
case STREAM:
boolean autoPlay = intent.getBooleanExtra(VideoDetailFragment.AUTO_PLAY, false);
NavigationHelper.openVideoDetailFragment(getSupportFragmentManager(), serviceId, url, title, autoPlay);
break;
case CHANNEL:
NavigationHelper.openChannelFragment(getSupportFragmentManager(), serviceId, url, title);
break;
case PLAYLIST:
NavigationHelper.openPlaylistFragment(getSupportFragmentManager(), serviceId, url, title);
break;
}
} else if (intent.hasExtra(Constants.KEY_OPEN_SEARCH)) {
String searchQuery = intent.getStringExtra(Constants.KEY_QUERY);
if (searchQuery == null) searchQuery = "";
int serviceId = intent.getIntExtra(Constants.KEY_SERVICE_ID, 0);
NavigationHelper.openSearchFragment(getSupportFragmentManager(), serviceId, searchQuery);
} else {
NavigationHelper.gotoMainFragment(getSupportFragmentManager());
}
}
/*//////////////////////////////////////////////////////////////////////////
// History
//////////////////////////////////////////////////////////////////////////*/
private WatchHistoryDAO watchHistoryDAO;
private SearchHistoryDAO searchHistoryDAO;
private PublishSubject<HistoryEntry> historyEntrySubject;
private Disposable disposable;
private void initHistory() {
final AppDatabase database = NewPipeDatabase.getInstance();
watchHistoryDAO = database.watchHistoryDAO();
searchHistoryDAO = database.searchHistoryDAO();
historyEntrySubject = PublishSubject.create();
disposable = historyEntrySubject
.observeOn(Schedulers.io())
.subscribe(getHistoryEntryConsumer());
}
private void disposeHistory() {
if (disposable != null) disposable.dispose();
watchHistoryDAO = null;
searchHistoryDAO = null;
}
@NonNull
private Consumer<HistoryEntry> getHistoryEntryConsumer() {
return new Consumer<HistoryEntry>() {
@Override
public void accept(HistoryEntry historyEntry) throws Exception {
//noinspection unchecked
HistoryDAO<HistoryEntry> historyDAO = (HistoryDAO<HistoryEntry>)
(historyEntry instanceof SearchHistoryEntry ? searchHistoryDAO : watchHistoryDAO);
HistoryEntry latestEntry = historyDAO.getLatestEntry();
if (historyEntry.hasEqualValues(latestEntry)) {
latestEntry.setCreationDate(historyEntry.getCreationDate());
historyDAO.update(latestEntry);
} else {
historyDAO.insert(historyEntry);
}
}
};
}
private void addWatchHistoryEntry(StreamInfo streamInfo) {
if (sharedPreferences.getBoolean(getString(R.string.enable_watch_history_key), true)) {
WatchHistoryEntry entry = new WatchHistoryEntry(streamInfo);
historyEntrySubject.onNext(entry);
}
}
@Override
public void onVideoPlayed(StreamInfo streamInfo, VideoStream videoStream) {
addWatchHistoryEntry(streamInfo);
}
@Override
public void onAudioPlayed(StreamInfo streamInfo, AudioStream audioStream) {
addWatchHistoryEntry(streamInfo);
}
@Override
public void onSearch(int serviceId, String query) {
// Add search history entry
if (sharedPreferences.getBoolean(getString(R.string.enable_search_history_key), true)) {
SearchHistoryEntry searchHistoryEntry = new SearchHistoryEntry(new Date(), serviceId, query);
historyEntrySubject.onNext(searchHistoryEntry);
}
}
}

View File

@@ -0,0 +1,31 @@
package org.schabi.newpipe;
import android.arch.persistence.room.Room;
import android.content.Context;
import android.support.annotation.NonNull;
import org.schabi.newpipe.database.AppDatabase;
import static org.schabi.newpipe.database.AppDatabase.DATABASE_NAME;
public final class NewPipeDatabase {
private static AppDatabase databaseInstance;
private NewPipeDatabase() {
//no instance
}
public static void init(Context context) {
databaseInstance = Room.databaseBuilder(context.getApplicationContext(),
AppDatabase.class, DATABASE_NAME
).build();
}
@NonNull
public static AppDatabase getInstance() {
if (databaseInstance == null) throw new RuntimeException("Database not initialized");
return databaseInstance;
}
}

View File

@@ -0,0 +1,49 @@
package org.schabi.newpipe;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
/*
* Copyright (C) Hans-Christoph Steiner 2016 <hans@eds.org>
* PanicResponderActivity.java is part of NewPipe.
*
* NewPipe is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NewPipe is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NewPipe. If not, see <http://www.gnu.org/licenses/>.
*/
public class PanicResponderActivity extends Activity {
public static final String PANIC_TRIGGER_ACTION = "info.guardianproject.panic.action.TRIGGER";
@SuppressLint("NewApi")
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Intent intent = getIntent();
if (intent != null && PANIC_TRIGGER_ACTION.equals(intent.getAction())) {
// TODO explicitly clear the search results once they are restored when the app restarts
// or if the app reloads the current video after being killed, that should be cleared also
ExitActivity.exitAndRemoveFromRecentApps(this);
}
if (Build.VERSION.SDK_INT >= 21) {
finishAndRemoveTask();
} else {
finish();
}
}
}

View File

@@ -0,0 +1,157 @@
package org.schabi.newpipe;
import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.os.Build;
import android.os.Bundle;
import android.support.v4.app.NavUtils;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.MenuItem;
import android.webkit.CookieManager;
import android.webkit.ValueCallback;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
/*
* Created by beneth <bmauduit@beneth.fr> on 06.12.16.
*
* Copyright (C) Christian Schabesberger 2015 <chris.schabesberger@mailbox.org>
* ReCaptchaActivity.java is part of NewPipe.
*
* NewPipe is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NewPipe is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NewPipe. If not, see <http://www.gnu.org/licenses/>.
*/
public class ReCaptchaActivity extends AppCompatActivity {
public static final int RECAPTCHA_REQUEST = 10;
public static final String TAG = ReCaptchaActivity.class.toString();
public static final String YT_URL = "https://www.youtube.com";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_recaptcha);
// Set return to Cancel by default
setResult(RESULT_CANCELED);
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
ActionBar actionBar = getSupportActionBar();
if (actionBar != null) {
actionBar.setDisplayHomeAsUpEnabled(true);
actionBar.setTitle(R.string.reCaptcha_title);
actionBar.setDisplayShowTitleEnabled(true);
}
WebView myWebView = findViewById(R.id.reCaptchaWebView);
// Enable Javascript
WebSettings webSettings = myWebView.getSettings();
webSettings.setJavaScriptEnabled(true);
ReCaptchaWebViewClient webClient = new ReCaptchaWebViewClient(this);
myWebView.setWebViewClient(webClient);
// Cleaning cache, history and cookies from webView
myWebView.clearCache(true);
myWebView.clearHistory();
android.webkit.CookieManager cookieManager = CookieManager.getInstance();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
cookieManager.removeAllCookies(new ValueCallback<Boolean>() {
@Override
public void onReceiveValue(Boolean aBoolean) {}
});
} else {
cookieManager.removeAllCookie();
}
myWebView.loadUrl(YT_URL);
}
private class ReCaptchaWebViewClient extends WebViewClient {
private Activity context;
private String mCookies;
ReCaptchaWebViewClient(Activity ctx) {
context = ctx;
}
@Override
public void onPageStarted(WebView view, String url, Bitmap favicon) {
// TODO: Start Loader
super.onPageStarted(view, url, favicon);
}
@Override
public void onPageFinished(WebView view, String url) {
String cookies = CookieManager.getInstance().getCookie(url);
// TODO: Stop Loader
// find cookies : s_gl & goojf and Add cookies to Downloader
if (find_access_cookies(cookies)) {
// Give cookies to Downloader class
Downloader.setCookies(mCookies);
// Closing activity and return to parent
setResult(RESULT_OK);
finish();
}
}
private boolean find_access_cookies(String cookies) {
boolean ret = false;
String c_s_gl = "";
String c_goojf = "";
String[] parts = cookies.split("; ");
for (String part : parts) {
if (part.trim().startsWith("s_gl")) {
c_s_gl = part.trim();
}
if (part.trim().startsWith("goojf")) {
c_goojf = part.trim();
}
}
if (c_s_gl.length() > 0 && c_goojf.length() > 0) {
ret = true;
//mCookies = c_s_gl + "; " + c_goojf;
// Youtube seems to also need the other cookies:
mCookies = cookies;
}
return ret;
}
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
switch (id) {
case android.R.id.home: {
Intent intent = new Intent(this, org.schabi.newpipe.MainActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
NavUtils.navigateUpTo(this, intent);
return true;
}
default:
return false;
}
}
}

View File

@@ -0,0 +1,133 @@
package org.schabi.newpipe;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.Toast;
import org.schabi.newpipe.util.NavigationHelper;
import java.util.Collection;
import java.util.HashSet;
/*
* Copyright (C) Christian Schabesberger 2017 <chris.schabesberger@mailbox.org>
* RouterActivity .java is part of NewPipe.
*
* OpenHitboxStreams is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* OpenHitboxStreams is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with OpenHitboxStreams. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* This Acitivty is designed to route share/open intents to the specified service, and
* to the part of the service which can handle the url.
*/
public class RouterActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
String videoUrl = getUrl(getIntent());
handleUrl(videoUrl);
}
protected void handleUrl(String url) {
try {
NavigationHelper.openByLink(this, url);
} catch (Exception e) {
Toast.makeText(this, R.string.url_not_supported_toast, Toast.LENGTH_LONG).show();
}
finish();
}
/*//////////////////////////////////////////////////////////////////////////
// Utils
//////////////////////////////////////////////////////////////////////////*/
/**
* Removes invisible separators (\p{Z}) and punctuation characters including
* brackets (\p{P}). See http://www.regular-expressions.info/unicode.html for
* more details.
*/
protected final static String REGEX_REMOVE_FROM_URL = "[\\p{Z}\\p{P}]";
protected String getUrl(Intent intent) {
// first gather data and find service
String videoUrl = null;
if (intent.getData() != null) {
// this means the video was called though another app
videoUrl = intent.getData().toString();
} else if (intent.getStringExtra(Intent.EXTRA_TEXT) != null) {
//this means that vidoe was called through share menu
String extraText = intent.getStringExtra(Intent.EXTRA_TEXT);
videoUrl = getUris(extraText)[0];
}
return videoUrl;
}
protected String removeHeadingGibberish(final String input) {
int start = 0;
for (int i = input.indexOf("://") - 1; i >= 0; i--) {
if (!input.substring(i, i + 1).matches("\\p{L}")) {
start = i + 1;
break;
}
}
return input.substring(start, input.length());
}
protected String trim(final String input) {
if (input == null || input.length() < 1) {
return input;
} else {
String output = input;
while (output.length() > 0 && output.substring(0, 1).matches(REGEX_REMOVE_FROM_URL)) {
output = output.substring(1);
}
while (output.length() > 0
&& output.substring(output.length() - 1, output.length()).matches(REGEX_REMOVE_FROM_URL)) {
output = output.substring(0, output.length() - 1);
}
return output;
}
}
/**
* Retrieves all Strings which look remotely like URLs from a text.
* Used if NewPipe was called through share menu.
*
* @param sharedText text to scan for URLs.
* @return potential URLs
*/
protected String[] getUris(final String sharedText) {
final Collection<String> result = new HashSet<>();
if (sharedText != null) {
final String[] array = sharedText.split("\\p{Space}");
for (String s : array) {
s = trim(s);
if (s.length() != 0) {
if (s.matches(".+://.+")) {
result.add(removeHeadingGibberish(s));
} else if (s.matches(".+\\..+")) {
result.add("http://" + s);
}
}
}
}
return result.toArray(new String[result.size()]);
}
}

View File

@@ -0,0 +1,49 @@
package org.schabi.newpipe;
import android.content.Intent;
import android.os.Build;
import android.widget.Toast;
import org.schabi.newpipe.extractor.NewPipe;
import org.schabi.newpipe.extractor.StreamingService;
import org.schabi.newpipe.extractor.exceptions.ExtractionException;
import org.schabi.newpipe.player.PopupVideoPlayer;
import org.schabi.newpipe.util.Constants;
import org.schabi.newpipe.util.PermissionHelper;
/**
* Get the url from the intent and open a popup player
*/
public class RouterPopupActivity extends RouterActivity {
@Override
protected void handleUrl(String url) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M
&& !PermissionHelper.checkSystemAlertWindowPermission(this)) {
Toast.makeText(this, R.string.msg_popup_permission, Toast.LENGTH_LONG).show();
return;
}
StreamingService service;
try {
service = NewPipe.getServiceByUrl(url);
} catch (ExtractionException e) {
Toast.makeText(this, R.string.url_not_supported_toast, Toast.LENGTH_LONG).show();
return;
}
Intent callIntent = new Intent(this, PopupVideoPlayer.class);
switch (service.getLinkTypeByUrl(url)) {
case STREAM:
break;
default:
Toast.makeText(this, R.string.url_not_supported_toast, Toast.LENGTH_LONG).show();
return;
}
callIntent.putExtra(Constants.KEY_URL, url);
callIntent.putExtra(Constants.KEY_SERVICE_ID, service.getServiceId());
startService(callIntent);
finish();
}
}

View File

@@ -1,50 +0,0 @@
package org.schabi.newpipe;
import android.util.Log;
import org.schabi.newpipe.youtube.YoutubeService;
/**
* Created by Christian Schabesberger on 23.08.15.
*
* Copyright (C) Christian Schabesberger 2015 <chris.schabesberger@mailbox.org>
* ServiceList.java is part of NewPipe.
*
* NewPipe is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NewPipe is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NewPipe. If not, see <http://www.gnu.org/licenses/>.
*/
public class ServiceList {
private static final String TAG = ServiceList.class.toString();
private static final StreamingService[] services = {
new YoutubeService()
};
public static StreamingService[] getServices() {
return services;
}
public static StreamingService getService(int serviceId) {
return services[serviceId];
}
public static StreamingService getService(String serviceName) {
return services[getIdOfService(serviceName)];
}
public static int getIdOfService(String serviceName) {
for(int i = 0; i < services.length; i++) {
if(services[i].getServiceInfo().name == serviceName) {
return i;
}
}
Log.e(TAG, "Error: Service " + serviceName + " not known.");
return -1;
}
}

View File

@@ -1,168 +0,0 @@
package org.schabi.newpipe;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.os.Bundle;
import android.os.Environment;
import android.preference.PreferenceActivity;
import android.preference.PreferenceFragment;
import android.preference.PreferenceManager;
import android.support.annotation.LayoutRes;
import android.support.annotation.Nullable;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatDelegate;
import android.support.v7.widget.Toolbar;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
/**
* Created by Christian Schabesberger on 31.08.15.
*
* Copyright (C) Christian Schabesberger 2015 <chris.schabesberger@mailbox.org>
* SettingsActivity.java is part of NewPipe.
*
* NewPipe is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NewPipe is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NewPipe. If not, see <http://www.gnu.org/licenses/>.
*/
public class SettingsActivity extends PreferenceActivity {
private AppCompatDelegate mDelegate = null;
@Override
protected void onCreate(Bundle savedInstanceBundle) {
getDelegate().installViewFactory();
getDelegate().onCreate(savedInstanceBundle);
super.onCreate(savedInstanceBundle);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getFragmentManager().beginTransaction()
.replace(android.R.id.content, new SettingsFragment())
.commit();
}
public static class SettingsFragment extends PreferenceFragment {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.settings_screen);
}
}
@Override
protected void onPostCreate(Bundle savedInstanceState) {
super.onPostCreate(savedInstanceState);
getDelegate().onPostCreate(savedInstanceState);
}
public ActionBar getSupportActionBar() {
return getDelegate().getSupportActionBar();
}
public void setSupportActionBar(@Nullable Toolbar toolbar) {
getDelegate().setSupportActionBar(toolbar);
}
@Override
public MenuInflater getMenuInflater() {
return getDelegate().getMenuInflater();
}
@Override
public void setContentView(@LayoutRes int layoutResID) {
getDelegate().setContentView(layoutResID);
}
@Override
public void setContentView(View view) {
getDelegate().setContentView(view);
}
@Override
public void setContentView(View view, ViewGroup.LayoutParams params) {
getDelegate().setContentView(view, params);
}
@Override
public void addContentView(View view, ViewGroup.LayoutParams params) {
getDelegate().addContentView(view, params);
}
@Override
protected void onPostResume() {
super.onPostResume();
getDelegate().onPostResume();
}
@Override
protected void onTitleChanged(CharSequence title, int color) {
super.onTitleChanged(title, color);
getDelegate().setTitle(title);
}
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
getDelegate().onConfigurationChanged(newConfig);
}
@Override
protected void onStop() {
super.onStop();
getDelegate().onStop();
}
@Override
protected void onDestroy() {
super.onDestroy();
getDelegate().onDestroy();
}
public void invalidateOptionsMenu() {
getDelegate().invalidateOptionsMenu();
}
private AppCompatDelegate getDelegate() {
if (mDelegate == null) {
mDelegate = AppCompatDelegate.create(this, null);
}
return mDelegate;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
if(id == android.R.id.home) {
finish();
}
return true;
}
public static void initSettings(Context context) {
PreferenceManager.setDefaultValues(context, R.xml.settings_screen, false);
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);
if(sp.getString(context.getString(R.string.downloadPathPreference), "").isEmpty()){
SharedPreferences.Editor spEditor = sp.edit();
String newPipeDownloadStorage =
Environment.getExternalStorageDirectory().getAbsolutePath() + "/NewPipe";
spEditor.putString(context.getString(R.string.downloadPathPreference)
, newPipeDownloadStorage);
spEditor.commit();
}
}
}

View File

@@ -1,145 +0,0 @@
package org.schabi.newpipe;
/**
* Created by Christian Schabesberger on 26.08.15.
*
* Copyright (C) Christian Schabesberger 2015 <chris.schabesberger@mailbox.org>
* VideoInfo.java is part of NewPipe.
*
* NewPipe is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NewPipe is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NewPipe. If not, see <http://www.gnu.org/licenses/>.
*/
import android.graphics.Bitmap;
import android.util.Log;
import java.util.Vector;
public class VideoInfo {
private static final String TAG = VideoInfo.class.toString();
// format identifier
public static final int I_MPEG_4 = 0x0;
public static final int I_3GPP = 0x1;
public static final int I_WEBM = 0x2;
public static final int I_M4A = 0x3;
public static final int I_WEBMA = 0x4;
// format name
public static final String F_MPEG_4 = "MPEG-4";
public static final String F_3GPP = "3GPP";
public static final String F_WEBM = "WebM";
public static final String F_M4A = "m4a";
public static final String F_WEBMA = "WebM";
// file suffix
public static final String C_MPEG_4 = "mp4";
public static final String C_3GPP = "3gp";
public static final String C_WEBM = "webm";
public static final String C_M4A = "m4a";
public static final String C_WEBMA = "webm";
// mimeType
public static final String M_MPEG_4 = "video/mp4";
public static final String M_3GPP = "video/3gpp";
public static final String M_WEBM = "video/webm";
public static final String M_M4A = "audio/mp4";
public static final String M_WEBMA = "audio/webm";
public static final int VIDEO_AVAILABLE = 0x00;
public static final int VIDEO_UNAVAILABLE = 0x01;
public static final int VIDEO_UNAVAILABLE_GEMA = 0x02;
public static String getNameById(int id) {
switch(id) {
case I_MPEG_4: return F_MPEG_4;
case I_3GPP: return F_3GPP;
case I_WEBM: return F_WEBM;
case I_M4A: return F_M4A;
case I_WEBMA: return F_WEBMA;
default: Log.e(TAG, "format not known: " +
Integer.toString(id) + "call the programmer he messed it up.");
}
return "";
}
public static String getSuffixById(int id) {
switch(id) {
case I_MPEG_4: return C_MPEG_4;
case I_3GPP: return C_3GPP;
case I_WEBM: return C_WEBM;
case I_M4A: return C_M4A;
case I_WEBMA: return C_WEBMA;
default: Log.e(TAG, "format not known: " +
Integer.toString(id) + "call the programmer he messed it up.");
}
return "";
}
public static String getMimeById(int id) {
switch(id) {
case I_MPEG_4: return M_MPEG_4;
case I_3GPP: return M_3GPP;
case I_WEBM: return M_WEBM;
case I_M4A: return M_M4A;
case I_WEBMA: return M_WEBMA;
default: Log.e(TAG, "format not known: " +
Integer.toString(id) + "call the programmer he messed it up.");
}
return "";
}
public static class VideoStream {
public VideoStream(String url, int format, String res) {
this.url = url; this.format = format; resolution = res;
}
public String url = ""; //url of the stream
public int format = -1;
public String resolution = "";
}
public static class AudioStream {
public AudioStream(String url, int format, int bandWidth, int samplingRate) {
this.url = url; this.format = format;
this.bandWidth = bandWidth; this.samplingRate = samplingRate;
}
public String url = "";
public int format = -1;
public int bandWidth = -1;
public int samplingRate = -1;
}
public String id = "";
public String uploader = "";
public String upload_date = "";
public String uploader_thumbnail_url = "";
public Bitmap uploader_thumbnail = null;
public String title = "";
public String thumbnail_url = "";
public Bitmap thumbnail = null;
public String description = "";
public int duration = -1;
public int age_limit = 0;
public String webpage_url = "";
public String view_count = "";
public String like_count = "";
public String dislike_count = "";
public String average_rating = "";
public VideoStream[] videoStreams = null;
public AudioStream[] audioStreams = null;
public VideoInfoItem nextVideo = null;
public Vector<VideoInfoItem> relatedVideos = null;
public int videoAvailableStatus = VIDEO_AVAILABLE;
}

View File

@@ -1,34 +0,0 @@
package org.schabi.newpipe;
import android.graphics.Bitmap;
/**
* Created by Christian Schabesberger on 26.08.15.
*
* Copyright (C) Christian Schabesberger 2015 <chris.schabesberger@mailbox.org>
* VideoInfoItem.java is part of NewPipe.
*
* NewPipe is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NewPipe is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NewPipe. If not, see <http://www.gnu.org/licenses/>.
*/
public class VideoInfoItem {
public String id = "";
public String title = "";
public String uploader = "";
public String duration = "";
public String thumbnail_url = "";
public Bitmap thumbnail = null;
public String webpage_url = "";
public String upload_date = "";
}

View File

@@ -1,137 +0,0 @@
package org.schabi.newpipe;
import android.content.ContentProviderOperation;
import android.content.res.Configuration;
import android.os.Build;
import android.preference.PreferenceManager;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.NavUtils;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.WindowManager;
import org.schabi.newpipe.youtube.YoutubeExtractor;
/**
* Copyright (C) Christian Schabesberger 2015 <chris.schabesberger@mailbox.org>
* VideoItemDetailActivity.java is part of NewPipe.
*
* NewPipe is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NewPipe is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NewPipe. If not, see <http://www.gnu.org/licenses/>.
*/
public class VideoItemDetailActivity extends AppCompatActivity {
private static final String TAG = VideoItemDetailActivity.class.toString();
private String videoUrl;
private int currentStreamingService = -1;
private boolean isLandscape;
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_videoitem_detail);
// Show the Up button in the action bar.
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
ActionBarHandler.getHandler().setupNavMenu(this);
// savedInstanceState is non-null when there is fragment state
// saved from previous configurations of this activity
// (e.g. when rotating the screen from portrait to landscape).
// In this case, the fragment will automatically be re-added
// to its container so we don't need to manually add it.
// For more information, see the Fragments API guide at:
//
// http://developer.android.com/guide/components/fragments.html
//
Bundle arguments = new Bundle();
if (savedInstanceState == null) {
// this means the video was called though another app
if (getIntent().getData() != null) {
videoUrl = getIntent().getData().toString();
StreamingService[] serviceList = ServiceList.getServices();
Extractor extractor = null;
for (int i = 0; i < serviceList.length; i++) {
if (serviceList[i].acceptUrl(videoUrl)) {
arguments.putInt(VideoItemDetailFragment.STREAMING_SERVICE, i);
try {
currentStreamingService = i;
extractor = (Extractor) ServiceList.getService(i)
.getExtractorClass().newInstance();
} catch (Exception e) {
e.printStackTrace();
}
break;
}
}
arguments.putString(VideoItemDetailFragment.VIDEO_URL,
extractor.getVideoUrl(extractor.getVideoId(videoUrl)));
arguments.putBoolean(VideoItemDetailFragment.AUTO_PLAY,
PreferenceManager.getDefaultSharedPreferences(this)
.getBoolean(getString(R.string.autoPlayThroughIntent), false));
} else {
videoUrl = getIntent().getStringExtra(VideoItemDetailFragment.VIDEO_URL);
currentStreamingService = getIntent().getIntExtra(VideoItemDetailFragment.STREAMING_SERVICE, -1);
arguments.putString(VideoItemDetailFragment.VIDEO_URL, videoUrl);
arguments.putInt(VideoItemDetailFragment.STREAMING_SERVICE, currentStreamingService);
arguments.putBoolean(VideoItemDetailFragment.AUTO_PLAY, false);
}
// Create the detail fragment and add it to the activity
// using a fragment transaction.
VideoItemDetailFragment fragment = new VideoItemDetailFragment();
fragment.setArguments(arguments);
getSupportFragmentManager().beginTransaction()
.add(R.id.videoitem_detail_container, fragment)
.commit();
}
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
if (id == android.R.id.home) {
// This ID represents the Home or Up button. In the case of this
// activity, the Up button is shown. Use NavUtils to allow users
// to navigate up one level in the application structure. For
// more details, see the Navigation pattern on Android Design:
//
// http://developer.android.com/design/patterns/navigation.html#up-vs-back
//
Intent intent = new Intent(this, VideoItemListActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
NavUtils.navigateUpTo(this, intent);
return true;
} else {
ActionBarHandler.getHandler().onItemSelected(item, this);
}
return super.onOptionsItemSelected(item);
}
@Override
public boolean onCreatePanelMenu(int featured, Menu menu) {
super.onCreatePanelMenu(featured, menu);
MenuInflater inflater = getMenuInflater();
ActionBarHandler.getHandler().setupMenu(menu, inflater, this);
return true;
}
}

View File

@@ -1,299 +0,0 @@
package org.schabi.newpipe;
import android.app.Activity;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.media.Image;
import android.os.Bundle;
import android.os.Handler;
import android.preference.PreferenceManager;
import android.support.design.widget.FloatingActionButton;
import android.support.v4.app.Fragment;
import android.support.v7.app.ActionBar;
import android.text.Html;
import android.text.method.LinkMovementMethod;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.GridLayout;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.ProgressBar;
import android.widget.RelativeLayout;
import android.widget.TextView;
import java.net.URL;
import java.util.Vector;
/**
* Copyright (C) Christian Schabesberger 2015 <chris.schabesberger@mailbox.org>
* VideoItemDetailFragment.java is part of NewPipe.
*
* NewPipe is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NewPipe is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NewPipe. If not, see <http://www.gnu.org/licenses/>.
*/
public class VideoItemDetailFragment extends Fragment {
private static final String TAG = VideoItemDetailFragment.class.toString();
/**
* The fragment argument representing the item ID that this fragment
* represents.
*/
public static final String ARG_ITEM_ID = "item_id";
public static final String VIDEO_URL = "video_url";
public static final String STREAMING_SERVICE = "streaming_service";
public static final String AUTO_PLAY = "auto_play";
private boolean autoPlayEnabled = false;
private Thread extractorThread = null;
private class ExtractorRunnable implements Runnable {
private Handler h = new Handler();
private Class extractorClass;
private String videoUrl;
public ExtractorRunnable(String videoUrl, Class extractorClass, VideoItemDetailFragment f) {
this.extractorClass = extractorClass;
this.videoUrl = videoUrl;
}
@Override
public void run() {
try {
Extractor extractor = (Extractor) extractorClass.newInstance();
VideoInfo videoInfo = extractor.getVideoInfo(videoUrl);
h.post(new VideoResultReturnedRunnable(videoInfo));
if (videoInfo.videoAvailableStatus == VideoInfo.VIDEO_AVAILABLE) {
h.post(new SetThumbnailRunnable(
BitmapFactory.decodeStream(
new URL(videoInfo.thumbnail_url)
.openConnection()
.getInputStream()), SetThumbnailRunnable.VIDEO_THUMBNAIL));
h.post(new SetThumbnailRunnable(
BitmapFactory.decodeStream(
new URL(videoInfo.uploader_thumbnail_url)
.openConnection()
.getInputStream()), SetThumbnailRunnable.CHANNEL_THUMBNAIL));
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
private class VideoResultReturnedRunnable implements Runnable {
private VideoInfo videoInfo;
public VideoResultReturnedRunnable(VideoInfo videoInfo) {
this.videoInfo = videoInfo;
}
@Override
public void run() {
updateInfo(videoInfo);
}
}
private class SetThumbnailRunnable implements Runnable {
public static final int CHANNEL_THUMBNAIL = 2;
public static final int VIDEO_THUMBNAIL = 1;
private Bitmap thumbnail;
private int thumbnailId;
public SetThumbnailRunnable(Bitmap thumbnail, int id) {
this.thumbnail = thumbnail;
this.thumbnailId = id;
}
@Override
public void run() {
updateThumbnail(thumbnail, thumbnailId);
}
}
public void updateThumbnail(Bitmap thumbnail, int id) {
Activity a = getActivity();
ImageView thumbnailView = null;
try {
switch (id) {
case SetThumbnailRunnable.VIDEO_THUMBNAIL:
thumbnailView = (ImageView) a.findViewById(R.id.detailThumbnailView);
break;
case SetThumbnailRunnable.CHANNEL_THUMBNAIL:
thumbnailView = (ImageView) a.findViewById(R.id.detailUploaderThumbnailView);
break;
default:
Log.d(TAG, "Error: Thumbnail id not known");
return;
}
if (thumbnailView != null) {
thumbnailView.setImageBitmap(thumbnail);
}
} catch (java.lang.NullPointerException e) {
// No god programm design i know. :/
Log.w(TAG, "updateThumbnail(): Fragment closed before thread ended work");
}
}
public void updateInfo(VideoInfo info) {
Activity a = getActivity();
try {
ProgressBar progressBar = (ProgressBar) a.findViewById(R.id.detailProgressBar);
TextView videoTitleView = (TextView) a.findViewById(R.id.detailVideoTitleView);
TextView uploaderView = (TextView) a.findViewById(R.id.detailUploaderView);
TextView viewCountView = (TextView) a.findViewById(R.id.detailViewCountView);
TextView thumbsUpView = (TextView) a.findViewById(R.id.detailThumbsUpCountView);
TextView thumbsDownView = (TextView) a.findViewById(R.id.detailThumbsDownCountView);
TextView uploadDateView = (TextView) a.findViewById(R.id.detailUploadDateView);
TextView descriptionView = (TextView) a.findViewById(R.id.detailDescriptionView);
ImageView thumbnailView = (ImageView) a.findViewById(R.id.detailThumbnailView);
ImageView uploaderThumbnailView = (ImageView) a.findViewById(R.id.detailUploaderThumbnailView);
ImageView thumbsUpPic = (ImageView) a.findViewById(R.id.detailThumbsUpImgView);
ImageView thumbsDownPic = (ImageView) a.findViewById(R.id.detailThumbsDownImgView);
View textSeperationLine = a.findViewById(R.id.textSeperationLine);
if(textSeperationLine != null) {
textSeperationLine.setVisibility(View.VISIBLE);
}
progressBar.setVisibility(View.GONE);
videoTitleView.setVisibility(View.VISIBLE);
uploaderView.setVisibility(View.VISIBLE);
uploadDateView.setVisibility(View.VISIBLE);
viewCountView.setVisibility(View.VISIBLE);
thumbsUpView.setVisibility(View.VISIBLE);
thumbsDownView.setVisibility(View.VISIBLE);
uploadDateView.setVisibility(View.VISIBLE);
descriptionView.setVisibility(View.VISIBLE);
thumbnailView.setVisibility(View.VISIBLE);
uploaderThumbnailView.setVisibility(View.VISIBLE);
thumbsUpPic.setVisibility(View.VISIBLE);
thumbsDownPic.setVisibility(View.VISIBLE);
switch (info.videoAvailableStatus) {
case VideoInfo.VIDEO_AVAILABLE: {
videoTitleView.setText(info.title);
uploaderView.setText(info.uploader);
viewCountView.setText(info.view_count + " " + a.getString(R.string.viewSufix));
thumbsUpView.setText(info.like_count);
thumbsDownView.setText(info.dislike_count);
uploadDateView.setText(a.getString(R.string.uploadDatePrefix) + " " + info.upload_date);
descriptionView.setText(Html.fromHtml(info.description));
descriptionView.setMovementMethod(LinkMovementMethod.getInstance());
ActionBarHandler.getHandler().setVideoInfo(info.webpage_url, info.title);
// parse streams
Vector<VideoInfo.VideoStream> streamsToUse = new Vector<>();
for (VideoInfo.VideoStream i : info.videoStreams) {
if (useStream(i, streamsToUse)) {
streamsToUse.add(i);
}
}
VideoInfo.VideoStream[] streamList = new VideoInfo.VideoStream[streamsToUse.size()];
for (int i = 0; i < streamList.length; i++) {
streamList[i] = streamsToUse.get(i);
}
ActionBarHandler.getHandler().setStreams(streamList, info.audioStreams);
}
break;
case VideoInfo.VIDEO_UNAVAILABLE_GEMA:
thumbnailView.setImageBitmap(BitmapFactory.decodeResource(getResources(), R.drawable.gruese_die_gema_unangebracht));
break;
case VideoInfo.VIDEO_UNAVAILABLE:
thumbnailView.setImageBitmap(BitmapFactory.decodeResource(getResources(), R.drawable.not_available_monkey));
break;
default:
Log.e(TAG, "Video Availeble Status not known.");
}
if(autoPlayEnabled) {
ActionBarHandler.getHandler().playVideo();
}
} catch (java.lang.NullPointerException e) {
Log.w(TAG, "updateInfo(): Fragment closed before thread ended work... or else");
e.printStackTrace();
}
}
private boolean useStream(VideoInfo.VideoStream stream, Vector<VideoInfo.VideoStream> streams) {
for(VideoInfo.VideoStream i : streams) {
if(i.resolution.equals(stream.resolution)) {
return false;
}
}
return true;
}
/**
* Mandatory empty constructor for the fragment manager to instantiate the
* fragment (e.g. upon screen orientation changes).
*/
public VideoItemDetailFragment() {
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
try {
StreamingService streamingService = ServiceList.getService(
getArguments().getInt(STREAMING_SERVICE));
extractorThread = new Thread(new ExtractorRunnable(
getArguments().getString(VIDEO_URL), streamingService.getExtractorClass(), this));
autoPlayEnabled = getArguments().getBoolean(AUTO_PLAY);
extractorThread.start();
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_videoitem_detail, container, false);
return rootView;
}
@Override
public void onActivityCreated(Bundle savedInstanceBundle) {
super.onActivityCreated(savedInstanceBundle);
FloatingActionButton playVideoButton = (FloatingActionButton) getActivity().findViewById(R.id.playVideoButton);
if(PreferenceManager.getDefaultSharedPreferences(getActivity())
.getBoolean(getString(R.string.leftHandLayout), false) && checkIfLandscape()) {
RelativeLayout.LayoutParams oldLayout = (RelativeLayout.LayoutParams) playVideoButton.getLayoutParams();
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(
RelativeLayout.LayoutParams.WRAP_CONTENT,
RelativeLayout.LayoutParams.WRAP_CONTENT);
layoutParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
layoutParams.addRule(RelativeLayout.ALIGN_PARENT_LEFT);
layoutParams.setMargins(oldLayout.leftMargin, oldLayout.topMargin, oldLayout.rightMargin, oldLayout.rightMargin);
playVideoButton.setLayoutParams(layoutParams);
}
playVideoButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
ActionBarHandler.getHandler().playVideo();
}
});
}
public boolean checkIfLandscape() {
DisplayMetrics displayMetrics = new DisplayMetrics();
getActivity().getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
return displayMetrics.heightPixels < displayMetrics.widthPixels;
}
}

View File

@@ -1,232 +0,0 @@
package org.schabi.newpipe;
import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
import android.os.Build;
import android.os.Bundle;
import android.os.Environment;
import android.preference.PreferenceManager;
import android.support.v7.app.AppCompatActivity;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.WindowManager;
import android.view.inputmethod.InputMethodManager;
import android.support.v7.widget.SearchView;
import android.widget.ImageView;
/**
* Copyright (C) Christian Schabesberger 2015 <chris.schabesberger@mailbox.org>
* VideoItemListActivity.java is part of NewPipe.
*
* NewPipe is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NewPipe is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NewPipe. If not, see <http://www.gnu.org/licenses/>.
*/
public class VideoItemListActivity extends AppCompatActivity
implements VideoItemListFragment.Callbacks {
private static final String TAG = VideoItemListFragment.class.toString();
private static final String QUERY = "query";
private static final String STREAMING_SERVICE = "streaming_service";
private int currentStreamingServiceId = -1;
private String searchQuery = "";
private VideoItemListFragment listFragment;
public class SearchVideoQueryListener implements SearchView.OnQueryTextListener {
@Override
public boolean onQueryTextSubmit(String query) {
try {
searchQuery = query;
listFragment.search(query);
// hide virtual keyboard
InputMethodManager inputManager =
(InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
inputManager.hideSoftInputFromWindow(
getCurrentFocus().getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
// clear focus
// 1. to not open up the keyboard after switching back to this
// 2. It's a workaround to a seeming bug by the Android OS it self, causing
// onQueryTextSubmit to trigger twice when focus is not cleared.
// See: http://stackoverflow.com/questions/17874951/searchview-onquerytextsubmit-runs-twice-while-i-pressed-once
getCurrentFocus().clearFocus();
hideWatermark();
} catch(Exception e) {
e.printStackTrace();
}
return true;
}
@Override
public boolean onQueryTextChange(String newText) {
return true;
}
}
private void hideWatermark() {
ImageView waterMark = (ImageView) findViewById(R.id.list_view_watermark);
if(waterMark != null) {
waterMark.setVisibility(View.GONE);
}
}
/**
* Whether or not the activity is in two-pane mode, i.e. running on a tablet
* device.
*/
private boolean mTwoPane;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_videoitem_list);
listFragment = (VideoItemListFragment)
getSupportFragmentManager().findFragmentById(R.id.videoitem_list);
//-------- remove this line when multiservice support is implemented ----------
currentStreamingServiceId = ServiceList.getIdOfService("Youtube");
//-----------------------------------------------------------------------------
VideoItemListFragment listFragment = (VideoItemListFragment) getSupportFragmentManager()
.findFragmentById(R.id.videoitem_list);
listFragment.setStreamingService(ServiceList.getService(currentStreamingServiceId));
if(savedInstanceState != null) {
searchQuery = savedInstanceState.getString(QUERY);
currentStreamingServiceId = savedInstanceState.getInt(STREAMING_SERVICE);
if(!searchQuery.isEmpty()) {
hideWatermark();
listFragment.search(searchQuery);
}
}
if (findViewById(R.id.videoitem_detail_container) != null) {
// The detail container view will be present only in the
// large-screen layouts (res/values-large and
// res/values-sw600dp). If this view is present, then the
// activity should be in two-pane mode.
mTwoPane = true;
// In two-pane mode, list items should be given the
// 'activated' state when touched.
((VideoItemListFragment) getSupportFragmentManager()
.findFragmentById(R.id.videoitem_list))
.setActivateOnItemClick(true);
SearchView searchView = (SearchView)findViewById(R.id.searchViewTablet);
// Somehow the seticonifiedbydefault property set by the layout xml is not working on
// the support version on SearchView, so it needs to be set programmatically.
searchView.setIconifiedByDefault(false);
searchView.setIconified(false);
searchView.setOnQueryTextListener(new SearchVideoQueryListener());
ActionBarHandler.getHandler().setupNavMenu(this);
}
SettingsActivity.initSettings(this);
// TODO: If exposing deep links into your app, handle intents here.
}
/**
* Callback method from {@link VideoItemListFragment.Callbacks}
* indicating that the item with the given ID was selected.
*/
@Override
public void onItemSelected(String id) {
VideoListAdapter listAdapter = (VideoListAdapter) ((VideoItemListFragment)
getSupportFragmentManager()
.findFragmentById(R.id.videoitem_list))
.getListAdapter();
String webpage_url = listAdapter.getVideoList().get((int) Long.parseLong(id)).webpage_url;
if (mTwoPane) {
// In two-pane mode, show the detail view in this activity by
// adding or replacing the detail fragment using a
// fragment transaction.
Bundle arguments = new Bundle();
arguments.putString(VideoItemDetailFragment.ARG_ITEM_ID, id);
arguments.putString(VideoItemDetailFragment.VIDEO_URL, webpage_url);
arguments.putInt(VideoItemDetailFragment.STREAMING_SERVICE, currentStreamingServiceId);
VideoItemDetailFragment fragment = new VideoItemDetailFragment();
fragment.setArguments(arguments);
getSupportFragmentManager().beginTransaction()
.replace(R.id.videoitem_detail_container, fragment)
.commit();
} else {
// In single-pane mode, simply start the detail activity
// for the selected item ID.
Intent detailIntent = new Intent(this, VideoItemDetailActivity.class);
detailIntent.putExtra(VideoItemDetailFragment.ARG_ITEM_ID, id);
detailIntent.putExtra(VideoItemDetailFragment.VIDEO_URL, webpage_url);
detailIntent.putExtra(VideoItemDetailFragment.STREAMING_SERVICE, currentStreamingServiceId);
startActivity(detailIntent);
}
}
public boolean onCreatePanelMenu(int featured, Menu menu) {
super.onCreatePanelMenu(featured, menu);
if(findViewById(R.id.videoitem_detail_container) == null) {
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.videoitem_list, menu);
MenuItem searchItem = menu.findItem(R.id.action_search);
SearchView searchView = (SearchView) searchItem.getActionView();
searchView.setFocusable(false);
searchView.setOnQueryTextListener(
new SearchVideoQueryListener());
} else {
MenuInflater inflater = getMenuInflater();
ActionBarHandler.getHandler().setupMenu(menu, inflater, this);
}
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
if(id == R.id.action_settings) {
Intent intent = new Intent(this, SettingsActivity.class);
startActivity(intent);
} else {
ActionBarHandler.getHandler().onItemSelected(item, this);
return super.onOptionsItemSelected(item);
}
return true;
}
@Override
public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
/*
if (mActivatedPosition != ListView.INVALID_POSITION) {
// Serialize and persist the activated item position.
outState.putInt(STATE_ACTIVATED_POSITION, mActivatedPosition);
}
*/
outState.putString(QUERY, searchQuery);
outState.putInt(STREAMING_SERVICE, currentStreamingServiceId);
}
}

View File

@@ -1,368 +0,0 @@
package org.schabi.newpipe;
import android.app.Activity;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.os.Handler;
import android.support.v4.app.ListFragment;
import android.util.Log;
import android.view.View;
import android.widget.AbsListView;
import android.widget.ListView;
import android.widget.Toast;
import java.net.URL;
import java.util.List;
import java.util.Vector;
/**
* Copyright (C) Christian Schabesberger 2015 <chris.schabesberger@mailbox.org>
* VideoItemListFragment.java is part of NewPipe.
*
* NewPipe is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NewPipe is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NewPipe. If not, see <http://www.gnu.org/licenses/>.
*/
public class VideoItemListFragment extends ListFragment {
private static final String TAG = VideoItemListFragment.class.toString();
private StreamingService streamingService = null;
private VideoListAdapter videoListAdapter;
private String query = "";
private int lastPage = 0;
private Thread searchThread = null;
private SearchRunnable searchRunnable = null;
private Thread loadThumbsThread = null;
private LoadThumbsRunnable loadThumbsRunnable = null;
// used to track down if results posted by threads ar still valid
private int currentRequestId = -1;
private class ResultRunnable implements Runnable {
private SearchEngine.Result result;
private int reuqestId;
public ResultRunnable(SearchEngine.Result result, int requestId) {
this.result = result;
this.reuqestId = requestId;
}
@Override
public void run() {
updateListOnResult(result, reuqestId);
}
}
private class SearchRunnable implements Runnable {
private Class engineClass = null;
private String query;
private int page;
Handler h = new Handler();
private volatile boolean run = true;
private int requestId;
public SearchRunnable(Class engineClass, String query, int page, int requestId) {
this.engineClass = engineClass;
this.query = query;
this.page = page;
this.requestId = requestId;
}
void terminate() {
run = false;
}
@Override
public void run() {
SearchEngine engine = null;
try {
engine = (SearchEngine) engineClass.newInstance();
} catch(Exception e) {
e.printStackTrace();
return;
}
try {
SearchEngine.Result result = engine.search(query, page);
if(run) {
h.post(new ResultRunnable(result, requestId));
}
} catch(Exception e) {
e.printStackTrace();
h.post(new Runnable() {
@Override
public void run() {
Toast.makeText(getActivity(), "Network Error", Toast.LENGTH_SHORT).show();
}
});
}
}
}
private class LoadThumbsRunnable implements Runnable {
private Vector<String> thumbnailUrlList = new Vector<>();
private Vector<Boolean> downloadedList;
Handler h = new Handler();
private volatile boolean run = true;
private int requestId;
public LoadThumbsRunnable(Vector<VideoInfoItem> videoList,
Vector<Boolean> downloadedList, int requestId) {
for(VideoInfoItem item : videoList) {
thumbnailUrlList.add(item.thumbnail_url);
}
this.downloadedList = downloadedList;
this.requestId = requestId;
}
public void terminate() {
run = false;
}
public boolean isRunning() {
return run;
}
@Override
public void run() {
for(int i = 0; i < thumbnailUrlList.size() && run; i++) {
if(!downloadedList.get(i)) {
Bitmap thumbnail = null;
try {
thumbnail = BitmapFactory.decodeStream(
new URL(thumbnailUrlList.get(i)).openConnection().getInputStream());
h.post(new SetThumbnailRunnable(i, thumbnail, requestId));
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
}
private class SetThumbnailRunnable implements Runnable {
private int index;
private Bitmap thumbnail;
private int requestId;
public SetThumbnailRunnable(int index, Bitmap thumbnail, int requestId) {
this.index = index;
this.thumbnail = thumbnail;
this.requestId = requestId;
}
@Override
public void run() {
if(requestId == currentRequestId) {
videoListAdapter.updateDownloadedThumbnailList(index, true);
videoListAdapter.setThumbnail(index, thumbnail);
}
}
}
public void search(String query) {
this.query = query;
this.lastPage = 1;
videoListAdapter.clearVideoList();
setListShown(false);
startSearch(query, lastPage);
getListView().smoothScrollToPosition(0);
}
public void nextPage() {
lastPage++;
Log.d(TAG, getString(R.string.searchPage) + Integer.toString(lastPage));
startSearch(query, lastPage);
}
private void startSearch(String query, int page) {
currentRequestId++;
terminateThreads();
searchRunnable = new SearchRunnable(streamingService.getSearchEngineClass(), query, page, currentRequestId);
searchThread = new Thread(searchRunnable);
searchThread.start();
}
public void setStreamingService(StreamingService streamingService) {
this.streamingService = streamingService;
}
public void updateListOnResult(SearchEngine.Result result, int requestId) {
if(requestId == currentRequestId) {
setListShown(true);
if (result.resultList.isEmpty()) {
Toast.makeText(getActivity(), result.errorMessage, Toast.LENGTH_LONG).show();
} else {
if (!result.suggestion.isEmpty()) {
Toast.makeText(getActivity(), getString(R.string.didYouMean) + result.suggestion + " ?",
Toast.LENGTH_LONG).show();
}
updateList(result.resultList);
}
}
}
private void updateList(Vector<VideoInfoItem> list) {
try {
videoListAdapter.addVideoList(list);
terminateThreads();
loadThumbsRunnable = new LoadThumbsRunnable(videoListAdapter.getVideoList(),
videoListAdapter.getDownloadedThumbnailList(), currentRequestId);
loadThumbsThread = new Thread(loadThumbsRunnable);
loadThumbsThread.start();
} catch(java.lang.IllegalStateException e) {
Log.w(TAG, "Trying to set value while activity is not existing anymore.");
} catch(Exception e) {
e.printStackTrace();
}
}
public void terminateThreads() {
if(loadThumbsRunnable != null && loadThumbsRunnable.isRunning()) {
loadThumbsRunnable.terminate();
try {
loadThumbsThread.join();
} catch(Exception e) {
e.printStackTrace();
}
}
if(searchThread != null) {
searchRunnable.terminate();
// No need to join, since we don't realy terminate the thread. We just demand
// it to post its result runnable into the gui main loop.
}
}
void displayList() {
}
/**
* The serialization (saved instance state) Bundle key representing the
* activated item position. Only used on tablets.
*/
private static final String STATE_ACTIVATED_POSITION = "activated_position";
/**
* The current activated item position. Only used on tablets.
*/
private int mActivatedPosition = ListView.INVALID_POSITION;
/**
* A callback interface that all activities containing this fragment must
* implement. This mechanism allows activities to be notified of item
* selections.
*/
public interface Callbacks {
/**
* Callback for when an item has been selected.
*/
void onItemSelected(String id);
}
Callbacks mCallbacks = null;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
videoListAdapter = new VideoListAdapter(getActivity(), this);
setListAdapter(videoListAdapter);
// Restore the previously serialized activated item position.
if (savedInstanceState != null
&& savedInstanceState.containsKey(STATE_ACTIVATED_POSITION)) {
setActivatedPosition(savedInstanceState.getInt(STATE_ACTIVATED_POSITION));
}
getListView().setOnScrollListener(new AbsListView.OnScrollListener() {
private static final float OVERSCROLL_THRESHOLD_IN_PIXELS = 100;
private float downY;
long lastScrollDate = 0;
@Override
public void onScrollStateChanged(AbsListView view, int scrollState) {
}
@Override
public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
ListView list = getListView();
if (list.getChildAt(0) != null
&& list.getLastVisiblePosition() == list.getAdapter().getCount() - 1
&& list.getChildAt(list.getChildCount() - 1).getBottom() <= list.getHeight()) {
long time = System.currentTimeMillis();
if ((time - lastScrollDate) > 200) {
lastScrollDate = time;
nextPage();
}
}
}
});
}
@Override
public void onAttach(Activity activity) {
super.onAttach(activity);
// Activities containing this fragment must implement its callbacks.
if (!(activity instanceof Callbacks)) {
throw new IllegalStateException("Activity must implement fragment's callbacks.");
}
mCallbacks = (Callbacks) activity;
}
@Override
public void onDetach() {
super.onDetach();
}
@Override
public void onListItemClick(ListView listView, View view, int position, long id) {
super.onListItemClick(listView, view, position, id);
setActivatedPosition(position);
mCallbacks.onItemSelected(Long.toString(id));
}
@Override
public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
/*
if (mActivatedPosition != ListView.INVALID_POSITION) {
// Serialize and persist the activated item position.
outState.putInt(STATE_ACTIVATED_POSITION, mActivatedPosition);
}
*/
}
/**
* Turns on activate-on-click mode. When this mode is on, list items will be
* given the 'activated' state when touched.
*/
public void setActivateOnItemClick(boolean activateOnItemClick) {
// When setting CHOICE_MODE_SINGLE, ListView will automatically
// give items the 'activated' state when touched.
getListView().setChoiceMode(activateOnItemClick
? ListView.CHOICE_MODE_SINGLE
: ListView.CHOICE_MODE_NONE);
}
private void setActivatedPosition(int position) {
if (position == ListView.INVALID_POSITION) {
getListView().setItemChecked(mActivatedPosition, false);
} else {
getListView().setItemChecked(position, true);
}
mActivatedPosition = position;
}
}

View File

@@ -1,137 +0,0 @@
package org.schabi.newpipe;
import android.content.Context;
import android.graphics.Bitmap;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;
import java.util.Vector;
/**
* Created by the-scrabi on 11.08.15.
*
* Copyright (C) Christian Schabesberger 2015 <chris.schabesberger@mailbox.org>
* VideoListAdapter.java is part of NewPipe.
*
* NewPipe is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NewPipe is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NewPipe. If not, see <http://www.gnu.org/licenses/>.
*/
public class VideoListAdapter extends BaseAdapter {
private static final String TAG = VideoListAdapter.class.toString();
private LayoutInflater inflater;
private Vector<VideoInfoItem> videoList = new Vector<>();
private Vector<Boolean> downloadedThumbnailList = new Vector<>();
VideoItemListFragment videoListFragment;
ListView listView;
public VideoListAdapter(Context context, VideoItemListFragment videoListFragment) {
inflater = LayoutInflater.from(context);
this.videoListFragment = videoListFragment;
this.listView = videoListFragment.getListView();
}
public void addVideoList(Vector<VideoInfoItem> videos) {
videoList.addAll(videos);
for(int i = 0; i < videos.size(); i++) {
downloadedThumbnailList.add(false);
}
notifyDataSetChanged();
}
public void clearVideoList() {
videoList = new Vector<>();
downloadedThumbnailList = new Vector<>();
notifyDataSetChanged();
}
public Vector<VideoInfoItem> getVideoList() {
return videoList;
}
public void updateDownloadedThumbnailList(int index, boolean val) {
downloadedThumbnailList.set(index, val);
}
public Vector<Boolean> getDownloadedThumbnailList() {
return downloadedThumbnailList;
}
public void setThumbnail(int index, Bitmap thumbnail) {
videoList.get(index).thumbnail = thumbnail;
downloadedThumbnailList.set(index, true);
notifyDataSetChanged();
}
@Override
public int getCount() {
return videoList.size();
}
@Override
public Object getItem(int position) {
return videoList.get(position);
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder holder;
if(convertView == null) {
convertView = inflater.inflate(R.layout.video_item, parent, false);
holder = new ViewHolder();
holder.itemThumbnailView = (ImageView) convertView.findViewById(R.id.itemThumbnailView);
holder.itemVideoTitleView = (TextView) convertView.findViewById(R.id.itemVideoTitleView);
holder.itemUploaderView = (TextView) convertView.findViewById(R.id.itemUploaderView);
holder.itemDurationView = (TextView) convertView.findViewById(R.id.itemDurationView);
holder.itemUploadDateView = (TextView) convertView.findViewById(R.id.itemUploadDateView);
convertView.setTag(holder);
} else {
holder = (ViewHolder) convertView.getTag();
}
final Context context = parent.getContext();
if(videoList.get(position).thumbnail == null) {
holder.itemThumbnailView.setImageResource(R.drawable.dummi_thumbnail);
} else {
holder.itemThumbnailView.setImageBitmap(videoList.get(position).thumbnail);
}
holder.itemVideoTitleView.setText(videoList.get(position).title);
holder.itemUploaderView.setText(videoList.get(position).uploader);
holder.itemDurationView.setText(videoList.get(position).duration);
holder.itemUploadDateView.setText(videoList.get(position).upload_date);
if(listView.isItemChecked(position)) {
convertView.setBackgroundColor(context.getResources().getColor(R.color.primaryColorYoutube));
} else {
convertView.setBackgroundColor(0);
}
return convertView;
}
private class ViewHolder {
public ImageView itemThumbnailView;
public TextView itemVideoTitleView, itemUploaderView, itemDurationView, itemUploadDateView;
}
}

View File

@@ -0,0 +1,199 @@
package org.schabi.newpipe.about;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import org.schabi.newpipe.BuildConfig;
import org.schabi.newpipe.R;
import org.schabi.newpipe.util.NavigationHelper;
import org.schabi.newpipe.util.ThemeHelper;
public class AboutActivity extends AppCompatActivity {
/**
* List of all software components
*/
private static final SoftwareComponent[] SOFTWARE_COMPONENTS = new SoftwareComponent[]{
new SoftwareComponent("Giga Get", "2014", "Peter Cai", "https://github.com/PaperAirplane-Dev-Team/GigaGet", StandardLicenses.GPL2),
new SoftwareComponent("NewPipe Extractor", "2017", "Christian Schabesberger", "https://github.com/TeamNewPipe/NewPipeExtractor", StandardLicenses.GPL3),
new SoftwareComponent("Jsoup", "2017", "Jonathan Hedley", "https://github.com/jhy/jsoup", StandardLicenses.MIT),
new SoftwareComponent("Google Gson", "2008", "Google Inc", "https://github.com/google/gson", StandardLicenses.APACHE2),
new SoftwareComponent("Rhino", "2015", "Mozilla", "https://www.mozilla.org/rhino/", StandardLicenses.MPL2),
new SoftwareComponent("ACRA", "2013", "Kevin Gaudin", "http://www.acra.ch", StandardLicenses.APACHE2),
new SoftwareComponent("Universal Image Loader", "2011 - 2015", "Sergey Tarasevich", "https://github.com/nostra13/Android-Universal-Image-Loader", StandardLicenses.APACHE2),
new SoftwareComponent("CircleImageView", "2014 - 2017", "Henning Dodenhof", "https://github.com/hdodenhof/CircleImageView", StandardLicenses.APACHE2),
new SoftwareComponent("ParalaxScrollView", "2014", "Nir Hartmann", "https://github.com/nirhart/ParallaxScroll", StandardLicenses.MIT),
new SoftwareComponent("NoNonsense-FilePicker", "2016", "Jonas Kalderstam", "https://github.com/spacecowboy/NoNonsense-FilePicker", StandardLicenses.MPL2),
new SoftwareComponent("ExoPlayer", "2014-2017", "Google Inc", "https://github.com/google/ExoPlayer", StandardLicenses.APACHE2),
new SoftwareComponent("RxAndroid", "2015", "The RxAndroid authors", "https://github.com/ReactiveX/RxAndroid", StandardLicenses.APACHE2),
new SoftwareComponent("RxJava", "2016-present", "RxJava Contributors", "https://github.com/ReactiveX/RxJava", StandardLicenses.APACHE2),
new SoftwareComponent("RxBinding", "2015", "Jake Wharton", "https://github.com/JakeWharton/RxBinding", StandardLicenses.APACHE2)
};
/**
* The {@link android.support.v4.view.PagerAdapter} that will provide
* fragments for each of the sections. We use a
* {@link FragmentPagerAdapter} derivative, which will keep every
* loaded fragment in memory. If this becomes too memory intensive, it
* may be best to switch to a
* {@link android.support.v4.app.FragmentStatePagerAdapter}.
*/
private SectionsPagerAdapter mSectionsPagerAdapter;
/**
* The {@link ViewPager} that will host the section contents.
*/
private ViewPager mViewPager;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ThemeHelper.setTheme(this);
setContentView(R.layout.activity_about);
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
// Create the adapter that will return a fragment for each of the three
// primary sections of the activity.
mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager());
// Set up the ViewPager with the sections adapter.
mViewPager = findViewById(R.id.container);
mViewPager.setAdapter(mSectionsPagerAdapter);
TabLayout tabLayout = findViewById(R.id.tabs);
tabLayout.setupWithViewPager(mViewPager);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.menu_about, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
switch (id) {
case android.R.id.home:
finish();
return true;
case R.id.action_settings:
NavigationHelper.openSettings(this);
return true;
case R.id.action_show_downloads:
return NavigationHelper.openDownloads(this);
}
return super.onOptionsItemSelected(item);
}
/**
* A placeholder fragment containing a simple view.
*/
public static class AboutFragment extends Fragment {
public AboutFragment() {
}
/**
* Returns a new instance of this fragment for the given section
* number.
*/
public static AboutFragment newInstance() {
return new AboutFragment();
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_about, container, false);
TextView version = rootView.findViewById(R.id.app_version);
version.setText(BuildConfig.VERSION_NAME);
View githubLink = rootView.findViewById(R.id.github_link);
githubLink.setOnClickListener(new OnGithubLinkClickListener());
View licenseLink = rootView.findViewById(R.id.app_read_license);
licenseLink.setOnClickListener(new OnReadFullLicenseClickListener());
return rootView;
}
private static class OnGithubLinkClickListener implements View.OnClickListener {
@Override
public void onClick(final View view) {
final Context context = view.getContext();
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(context.getString(R.string.github_url)));
context.startActivity(intent);
}
}
private static class OnReadFullLicenseClickListener implements View.OnClickListener {
@Override
public void onClick(View v) {
LicenseFragment.showLicense(v.getContext(), StandardLicenses.GPL3);
}
}
}
/**
* A {@link FragmentPagerAdapter} that returns a fragment corresponding to
* one of the sections/tabs/pages.
*/
public class SectionsPagerAdapter extends FragmentPagerAdapter {
public SectionsPagerAdapter(FragmentManager fm) {
super(fm);
}
@Override
public Fragment getItem(int position) {
switch (position) {
case 0:
return AboutFragment.newInstance();
case 1:
return LicenseFragment.newInstance(SOFTWARE_COMPONENTS);
}
return null;
}
@Override
public int getCount() {
// Show 2 total pages.
return 2;
}
@Override
public CharSequence getPageTitle(int position) {
switch (position) {
case 0:
return getString(R.string.tab_about);
case 1:
return getString(R.string.tab_licenses);
}
return null;
}
}
}

View File

@@ -0,0 +1,69 @@
package org.schabi.newpipe.about;
import android.net.Uri;
import android.os.Parcel;
import android.os.Parcelable;
/**
* A software license
*/
public class License implements Parcelable {
public static final Creator<License> CREATOR = new Creator<License>() {
@Override
public License createFromParcel(Parcel source) {
return new License(source);
}
@Override
public License[] newArray(int size) {
return new License[size];
}
};
private final String abbreviation;
private final String name;
private String filename;
public License(String name, String abbreviation, String filename) {
if(name == null) throw new NullPointerException("name is null");
if(abbreviation == null) throw new NullPointerException("abbreviation is null");
if(filename == null) throw new NullPointerException("filename is null");
this.name = name;
this.filename = filename;
this.abbreviation = abbreviation;
}
protected License(Parcel in) {
this.filename = in.readString();
this.abbreviation = in.readString();
this.name = in.readString();
}
public Uri getContentUri() {
return new Uri.Builder()
.scheme("file")
.path("/android_asset")
.appendPath(filename)
.build();
}
public String getAbbreviation() {
return abbreviation;
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(this.filename);
dest.writeString(this.abbreviation);
dest.writeString(this.name);
}
public String getName() {
return name;
}
}

View File

@@ -0,0 +1,150 @@
package org.schabi.newpipe.about;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v7.app.AlertDialog;
import android.view.ContextMenu;
import android.view.LayoutInflater;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebView;
import android.widget.TextView;
import org.schabi.newpipe.R;
import java.util.Arrays;
import java.util.Comparator;
/**
* Fragment containing the software licenses
*/
public class LicenseFragment extends Fragment {
private static final String ARG_COMPONENTS = "components";
private SoftwareComponent[] softwareComponents;
private SoftwareComponent mComponentForContextMenu;
public static LicenseFragment newInstance(SoftwareComponent[] softwareComponents) {
if(softwareComponents == null) {
throw new NullPointerException("softwareComponents is null");
}
LicenseFragment fragment = new LicenseFragment();
Bundle bundle = new Bundle();
bundle.putParcelableArray(ARG_COMPONENTS, softwareComponents);
fragment.setArguments(bundle);
return fragment;
}
/**
* Shows a popup containing the license
* @param context the context to use
* @param license the license to show
*/
public static void showLicense(Context context, License license) {
if(context == null) {
throw new NullPointerException("context is null");
}
if(license == null) {
throw new NullPointerException("license is null");
}
AlertDialog.Builder alert = new AlertDialog.Builder(context);
alert.setTitle(license.getName());
WebView wv = new WebView(context);
wv.loadUrl(license.getContentUri().toString());
alert.setView(wv);
alert.setNegativeButton(android.R.string.ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
}
});
alert.show();
}
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
softwareComponents = (SoftwareComponent[]) getArguments().getParcelableArray(ARG_COMPONENTS);
// Sort components by name
Arrays.sort(softwareComponents, new Comparator<SoftwareComponent>() {
@Override
public int compare(SoftwareComponent o1, SoftwareComponent o2) {
return o1.getName().compareTo(o2.getName());
}
});
}
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_licenses, container, false);
ViewGroup softwareComponentsView = rootView.findViewById(R.id.software_components);
for (final SoftwareComponent component : softwareComponents) {
View componentView = inflater.inflate(R.layout.item_software_component, container, false);
TextView softwareName = componentView.findViewById(R.id.name);
TextView copyright = componentView.findViewById(R.id.copyright);
softwareName.setText(component.getName());
copyright.setText(getContext().getString(R.string.copyright,
component.getYears(),
component.getCopyrightOwner(),
component.getLicense().getAbbreviation()));
componentView.setTag(component);
componentView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Context context = v.getContext();
if (context != null) {
showLicense(context, component.getLicense());
}
}
});
softwareComponentsView.addView(componentView);
registerForContextMenu(componentView);
}
return rootView;
}
@Override
public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) {
MenuInflater inflater = getActivity().getMenuInflater();
SoftwareComponent component = (SoftwareComponent) v.getTag();
menu.setHeaderTitle(component.getName());
inflater.inflate(R.menu.software_component, menu);
super.onCreateContextMenu(menu, v, menuInfo);
mComponentForContextMenu = (SoftwareComponent) v.getTag();
}
@Override
public boolean onContextItemSelected(MenuItem item) {
// item.getMenuInfo() is null so we use the tag of the view
final SoftwareComponent component = mComponentForContextMenu;
if (component == null) {
return false;
}
switch (item.getItemId()) {
case R.id.action_website:
openWebsite(component.getLink());
return true;
case R.id.action_show_license:
showLicense(getContext(), component.getLicense());
}
return false;
}
private void openWebsite(String componentLink) {
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(componentLink));
startActivity(browserIntent);
}
}

View File

@@ -0,0 +1,83 @@
package org.schabi.newpipe.about;
import android.os.Parcel;
import android.os.Parcelable;
public class SoftwareComponent implements Parcelable {
public static final Creator<SoftwareComponent> CREATOR = new Creator<SoftwareComponent>() {
@Override
public SoftwareComponent createFromParcel(Parcel source) {
return new SoftwareComponent(source);
}
@Override
public SoftwareComponent[] newArray(int size) {
return new SoftwareComponent[size];
}
};
public String getName() {
return name;
}
public String getYears() {
return years;
}
public String getCopyrightOwner() {
return copyrightOwner;
}
public String getLink() {
return link;
}
public String getVersion() {
return version;
}
private final License license;
private final String name;
private final String years;
private final String copyrightOwner;
private final String link;
private final String version;
public SoftwareComponent(String name, String years, String copyrightOwner, String link, License license) {
this.name = name;
this.years = years;
this.copyrightOwner = copyrightOwner;
this.link = link;
this.license = license;
this.version = null;
}
protected SoftwareComponent(Parcel in) {
this.name = in.readString();
this.license = in.readParcelable(License.class.getClassLoader());
this.copyrightOwner = in.readString();
this.link = in.readString();
this.years = in.readString();
this.version = in.readString();
}
public License getLicense() {
return license;
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(name);
dest.writeParcelable(license, flags);
dest.writeString(copyrightOwner);
dest.writeString(link);
dest.writeString(years);
dest.writeString(version);
}
}

View File

@@ -0,0 +1,12 @@
package org.schabi.newpipe.about;
/**
* Standard software licenses
*/
public final class StandardLicenses {
public static final License GPL2 = new License("GNU General Public License, Version 2.0", "GPLv2", "gpl_2.html");
public static final License GPL3 = new License("GNU General Public License, Version 3.0", "GPLv3", "gpl_3.html");
public static final License APACHE2 = new License("Apache License, Version 2.0", "ALv2", "apache2.html");
public static final License MPL2 = new License("Mozilla Public License, Version 2.0", "MPL 2.0", "mpl2.html");
public static final License MIT = new License("MIT License", "MIT", "mit.html");
}

View File

@@ -0,0 +1,26 @@
package org.schabi.newpipe.database;
import android.arch.persistence.room.Database;
import android.arch.persistence.room.RoomDatabase;
import android.arch.persistence.room.TypeConverters;
import org.schabi.newpipe.database.history.Converters;
import org.schabi.newpipe.database.history.dao.SearchHistoryDAO;
import org.schabi.newpipe.database.history.dao.WatchHistoryDAO;
import org.schabi.newpipe.database.history.model.SearchHistoryEntry;
import org.schabi.newpipe.database.history.model.WatchHistoryEntry;
import org.schabi.newpipe.database.subscription.SubscriptionDAO;
import org.schabi.newpipe.database.subscription.SubscriptionEntity;
@TypeConverters({Converters.class})
@Database(entities = {SubscriptionEntity.class, WatchHistoryEntry.class, SearchHistoryEntry.class}, version = 1, exportSchema = false)
public abstract class AppDatabase extends RoomDatabase {
public static final String DATABASE_NAME = "newpipe.db";
public abstract SubscriptionDAO subscriptionDAO();
public abstract WatchHistoryDAO watchHistoryDAO();
public abstract SearchHistoryDAO searchHistoryDAO();
}

View File

@@ -0,0 +1,49 @@
package org.schabi.newpipe.database;
import android.arch.persistence.room.Dao;
import android.arch.persistence.room.Delete;
import android.arch.persistence.room.Insert;
import android.arch.persistence.room.OnConflictStrategy;
import android.arch.persistence.room.Update;
import java.util.Collection;
import java.util.List;
import io.reactivex.Flowable;
@Dao
public interface BasicDAO<Entity> {
/* Inserts */
@Insert(onConflict = OnConflictStrategy.FAIL)
long insert(final Entity entity);
@Insert(onConflict = OnConflictStrategy.FAIL)
List<Long> insertAll(final Entity... entities);
@Insert(onConflict = OnConflictStrategy.FAIL)
List<Long> insertAll(final Collection<Entity> entities);
@Insert(onConflict = OnConflictStrategy.REPLACE)
long upsert(final Entity entity);
/* Searches */
Flowable<List<Entity>> getAll();
Flowable<List<Entity>> listByService(int serviceId);
/* Deletes */
@Delete
int delete(final Entity entity);
@Delete
int delete(final Collection<Entity> entities);
int deleteAll();
/* Updates */
@Update
int update(final Entity entity);
@Update
int update(final Collection<Entity> entities);
}

View File

@@ -0,0 +1,28 @@
package org.schabi.newpipe.database.history;
import android.arch.persistence.room.TypeConverter;
import java.util.Date;
public class Converters {
/**
* Convert a long value to a date
* @param value the long value
* @return the date
*/
@TypeConverter
public static Date fromTimestamp(Long value) {
return value == null ? null : new Date(value);
}
/**
* Convert a date to a long value
* @param date the date
* @return the long value
*/
@TypeConverter
public static Long dateToTimestamp(Date date) {
return date == null ? null : date.getTime();
}
}

View File

@@ -0,0 +1,7 @@
package org.schabi.newpipe.database.history.dao;
import org.schabi.newpipe.database.BasicDAO;
public interface HistoryDAO<T> extends BasicDAO<T> {
T getLatestEntry();
}

View File

@@ -0,0 +1,37 @@
package org.schabi.newpipe.database.history.dao;
import android.arch.persistence.room.Dao;
import android.arch.persistence.room.Query;
import org.schabi.newpipe.database.history.model.SearchHistoryEntry;
import java.util.List;
import io.reactivex.Flowable;
import static org.schabi.newpipe.database.history.model.SearchHistoryEntry.CREATION_DATE;
import static org.schabi.newpipe.database.history.model.SearchHistoryEntry.ID;
import static org.schabi.newpipe.database.history.model.SearchHistoryEntry.SERVICE_ID;
import static org.schabi.newpipe.database.history.model.SearchHistoryEntry.TABLE_NAME;
@Dao
public interface SearchHistoryDAO extends HistoryDAO<SearchHistoryEntry> {
String ORDER_BY_CREATION_DATE = " ORDER BY " + CREATION_DATE + " DESC";
@Query("SELECT * FROM " + TABLE_NAME + " WHERE " + ID + " = (SELECT MAX(" + ID + ") FROM " + TABLE_NAME + ")")
@Override
SearchHistoryEntry getLatestEntry();
@Query("DELETE FROM " + TABLE_NAME)
@Override
int deleteAll();
@Query("SELECT * FROM " + TABLE_NAME + ORDER_BY_CREATION_DATE)
@Override
Flowable<List<SearchHistoryEntry>> getAll();
@Query("SELECT * FROM " + TABLE_NAME + " WHERE " + SERVICE_ID + " = :serviceId" + ORDER_BY_CREATION_DATE)
@Override
Flowable<List<SearchHistoryEntry>> listByService(int serviceId);
}

View File

@@ -0,0 +1,37 @@
package org.schabi.newpipe.database.history.dao;
import android.arch.persistence.room.Dao;
import android.arch.persistence.room.Query;
import org.schabi.newpipe.database.history.model.WatchHistoryEntry;
import java.util.List;
import io.reactivex.Flowable;
import static org.schabi.newpipe.database.history.model.WatchHistoryEntry.CREATION_DATE;
import static org.schabi.newpipe.database.history.model.WatchHistoryEntry.ID;
import static org.schabi.newpipe.database.history.model.WatchHistoryEntry.SERVICE_ID;
import static org.schabi.newpipe.database.history.model.WatchHistoryEntry.TABLE_NAME;
@Dao
public interface WatchHistoryDAO extends HistoryDAO<WatchHistoryEntry> {
String ORDER_BY_CREATION_DATE = " ORDER BY " + CREATION_DATE + " DESC";
@Query("SELECT * FROM " + TABLE_NAME + " WHERE " + ID + " = (SELECT MAX(" + ID + ") FROM " + TABLE_NAME + ")")
@Override
WatchHistoryEntry getLatestEntry();
@Query("DELETE FROM " + TABLE_NAME)
@Override
int deleteAll();
@Query("SELECT * FROM " + TABLE_NAME + ORDER_BY_CREATION_DATE)
@Override
Flowable<List<WatchHistoryEntry>> getAll();
@Query("SELECT * FROM " + TABLE_NAME + " WHERE " + SERVICE_ID + " = :serviceId" + ORDER_BY_CREATION_DATE)
@Override
Flowable<List<WatchHistoryEntry>> listByService(int serviceId);
}

View File

@@ -0,0 +1,60 @@
package org.schabi.newpipe.database.history.model;
import android.arch.persistence.room.ColumnInfo;
import android.arch.persistence.room.Entity;
import android.arch.persistence.room.Ignore;
import android.arch.persistence.room.PrimaryKey;
import java.util.Date;
@Entity
public abstract class HistoryEntry {
public static final String ID = "id";
public static final String SERVICE_ID = "service_id";
public static final String CREATION_DATE = "creation_date";
@ColumnInfo(name = CREATION_DATE)
private Date creationDate;
@ColumnInfo(name = SERVICE_ID)
private int serviceId;
@ColumnInfo(name = ID)
@PrimaryKey(autoGenerate = true)
private long id;
public HistoryEntry(Date creationDate, int serviceId) {
this.serviceId = serviceId;
this.creationDate = creationDate;
}
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public Date getCreationDate() {
return creationDate;
}
public void setCreationDate(Date creationDate) {
this.creationDate = creationDate;
}
public int getServiceId() {
return serviceId;
}
public void setServiceId(int serviceId) {
this.serviceId = serviceId;
}
@Ignore
public boolean hasEqualValues(HistoryEntry otherEntry) {
return otherEntry != null && getServiceId() == otherEntry.getServiceId();
}
}

View File

@@ -0,0 +1,37 @@
package org.schabi.newpipe.database.history.model;
import android.arch.persistence.room.ColumnInfo;
import android.arch.persistence.room.Entity;
import android.arch.persistence.room.Ignore;
import java.util.Date;
@Entity(tableName = SearchHistoryEntry.TABLE_NAME)
public class SearchHistoryEntry extends HistoryEntry {
public static final String TABLE_NAME = "search_history";
public static final String SEARCH = "search";
@ColumnInfo(name = SEARCH)
private String search;
public SearchHistoryEntry(Date creationDate, int serviceId, String search) {
super(creationDate, serviceId);
this.search = search;
}
public String getSearch() {
return search;
}
public void setSearch(String search) {
this.search = search;
}
@Ignore
@Override
public boolean hasEqualValues(HistoryEntry otherEntry) {
return otherEntry instanceof SearchHistoryEntry && super.hasEqualValues(otherEntry)
&& getSearch().equals(((SearchHistoryEntry) otherEntry).getSearch());
}
}

View File

@@ -0,0 +1,109 @@
package org.schabi.newpipe.database.history.model;
import android.arch.persistence.room.ColumnInfo;
import android.arch.persistence.room.Entity;
import android.arch.persistence.room.Ignore;
import org.schabi.newpipe.extractor.stream.StreamInfo;
import java.util.Date;
@Entity(tableName = WatchHistoryEntry.TABLE_NAME)
public class WatchHistoryEntry extends HistoryEntry {
public static final String TABLE_NAME = "watch_history";
public static final String TITLE = "title";
public static final String URL = "url";
public static final String STREAM_ID = "stream_id";
public static final String THUMBNAIL_URL = "thumbnail_url";
public static final String UPLOADER = "uploader";
public static final String DURATION = "duration";
@ColumnInfo(name = TITLE)
private String title;
@ColumnInfo(name = URL)
private String url;
@ColumnInfo(name = STREAM_ID)
private String streamId;
@ColumnInfo(name = THUMBNAIL_URL)
private String thumbnailURL;
@ColumnInfo(name = UPLOADER)
private String uploader;
@ColumnInfo(name = DURATION)
private long duration;
public WatchHistoryEntry(Date creationDate, int serviceId, String title, String url, String streamId, String thumbnailURL, String uploader, long duration) {
super(creationDate, serviceId);
this.title = title;
this.url = url;
this.streamId = streamId;
this.thumbnailURL = thumbnailURL;
this.uploader = uploader;
this.duration = duration;
}
public WatchHistoryEntry(StreamInfo streamInfo) {
this(new Date(), streamInfo.service_id, streamInfo.name, streamInfo.url,
streamInfo.id, streamInfo.thumbnail_url, streamInfo.uploader_name, streamInfo.duration);
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getStreamId() {
return streamId;
}
public void setStreamId(String streamId) {
this.streamId = streamId;
}
public String getThumbnailURL() {
return thumbnailURL;
}
public void setThumbnailURL(String thumbnailURL) {
this.thumbnailURL = thumbnailURL;
}
public String getUploader() {
return uploader;
}
public void setUploader(String uploader) {
this.uploader = uploader;
}
public long getDuration() {
return duration;
}
public void setDuration(int duration) {
this.duration = duration;
}
@Ignore
@Override
public boolean hasEqualValues(HistoryEntry otherEntry) {
return otherEntry instanceof WatchHistoryEntry && super.hasEqualValues(otherEntry)
&& getUrl().equals(((WatchHistoryEntry) otherEntry).getUrl());
}
}

View File

@@ -0,0 +1,34 @@
package org.schabi.newpipe.database.subscription;
import android.arch.persistence.room.Dao;
import android.arch.persistence.room.Query;
import org.schabi.newpipe.database.BasicDAO;
import java.util.List;
import io.reactivex.Flowable;
import static org.schabi.newpipe.database.subscription.SubscriptionEntity.SUBSCRIPTION_SERVICE_ID;
import static org.schabi.newpipe.database.subscription.SubscriptionEntity.SUBSCRIPTION_TABLE;
import static org.schabi.newpipe.database.subscription.SubscriptionEntity.SUBSCRIPTION_URL;
@Dao
public interface SubscriptionDAO extends BasicDAO<SubscriptionEntity> {
@Override
@Query("SELECT * FROM " + SUBSCRIPTION_TABLE)
Flowable<List<SubscriptionEntity>> getAll();
@Override
@Query("DELETE FROM " + SUBSCRIPTION_TABLE)
int deleteAll();
@Override
@Query("SELECT * FROM " + SUBSCRIPTION_TABLE + " WHERE " + SUBSCRIPTION_SERVICE_ID + " = :serviceId")
Flowable<List<SubscriptionEntity>> listByService(int serviceId);
@Query("SELECT * FROM " + SUBSCRIPTION_TABLE + " WHERE " +
SUBSCRIPTION_URL + " LIKE :url AND " +
SUBSCRIPTION_SERVICE_ID + " = :serviceId")
Flowable<List<SubscriptionEntity>> getSubscription(int serviceId, String url);
}

View File

@@ -0,0 +1,127 @@
package org.schabi.newpipe.database.subscription;
import android.arch.persistence.room.ColumnInfo;
import android.arch.persistence.room.Entity;
import android.arch.persistence.room.Ignore;
import android.arch.persistence.room.Index;
import android.arch.persistence.room.PrimaryKey;
import org.schabi.newpipe.extractor.channel.ChannelInfoItem;
import static org.schabi.newpipe.database.subscription.SubscriptionEntity.SUBSCRIPTION_SERVICE_ID;
import static org.schabi.newpipe.database.subscription.SubscriptionEntity.SUBSCRIPTION_TABLE;
import static org.schabi.newpipe.database.subscription.SubscriptionEntity.SUBSCRIPTION_URL;
@Entity(tableName = SUBSCRIPTION_TABLE,
indices = {@Index(value = {SUBSCRIPTION_SERVICE_ID, SUBSCRIPTION_URL}, unique = true)})
public class SubscriptionEntity {
final static String SUBSCRIPTION_TABLE = "subscriptions";
final static String SUBSCRIPTION_SERVICE_ID = "service_id";
final static String SUBSCRIPTION_URL = "url";
final static String SUBSCRIPTION_NAME = "name";
final static String SUBSCRIPTION_AVATAR_URL = "avatar_url";
final static String SUBSCRIPTION_SUBSCRIBER_COUNT = "subscriber_count";
final static String SUBSCRIPTION_DESCRIPTION = "description";
@PrimaryKey(autoGenerate = true)
private long uid = 0;
@ColumnInfo(name = SUBSCRIPTION_SERVICE_ID)
private int serviceId = -1;
@ColumnInfo(name = SUBSCRIPTION_URL)
private String url;
@ColumnInfo(name = SUBSCRIPTION_NAME)
private String name;
@ColumnInfo(name = SUBSCRIPTION_AVATAR_URL)
private String avatarUrl;
@ColumnInfo(name = SUBSCRIPTION_SUBSCRIBER_COUNT)
private Long subscriberCount;
@ColumnInfo(name = SUBSCRIPTION_DESCRIPTION)
private String description;
public long getUid() {
return uid;
}
/* Keep this package-private since UID should always be auto generated by Room impl */
void setUid(long uid) {
this.uid = uid;
}
public int getServiceId() {
return serviceId;
}
public void setServiceId(int serviceId) {
this.serviceId = serviceId;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getAvatarUrl() {
return avatarUrl;
}
public void setAvatarUrl(String avatarUrl) {
this.avatarUrl = avatarUrl;
}
public Long getSubscriberCount() {
return subscriberCount;
}
public void setSubscriberCount(Long subscriberCount) {
this.subscriberCount = subscriberCount;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
@Ignore
public void setData(final String name,
final String avatarUrl,
final String description,
final Long subscriberCount) {
this.setName(name);
this.setAvatarUrl(avatarUrl);
this.setDescription(description);
this.setSubscriberCount(subscriberCount);
}
@Ignore
public ChannelInfoItem toChannelInfoItem() {
ChannelInfoItem item = new ChannelInfoItem();
item.url = getUrl();
item.service_id = getServiceId();
item.name = getName();
item.thumbnail_url = getAvatarUrl();
item.subscriber_count = getSubscriberCount();
item.description = getDescription();
return item;
}
}

View File

@@ -0,0 +1,90 @@
package org.schabi.newpipe.download;
import android.app.FragmentTransaction;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.ViewTreeObserver;
import org.schabi.newpipe.R;
import org.schabi.newpipe.settings.SettingsActivity;
import org.schabi.newpipe.util.ThemeHelper;
import us.shandian.giga.service.DownloadManagerService;
import us.shandian.giga.ui.fragment.AllMissionsFragment;
import us.shandian.giga.ui.fragment.MissionsFragment;
public class DownloadActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
// Service
Intent i = new Intent();
i.setClass(this, DownloadManagerService.class);
startService(i);
ThemeHelper.setTheme(this);
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_downloader);
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
ActionBar actionBar = getSupportActionBar();
if (actionBar != null) {
actionBar.setDisplayHomeAsUpEnabled(true);
actionBar.setTitle(R.string.downloads_title);
actionBar.setDisplayShowTitleEnabled(true);
}
// Fragment
getWindow().getDecorView().getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
@Override
public void onGlobalLayout() {
updateFragments();
getWindow().getDecorView().getViewTreeObserver().removeGlobalOnLayoutListener(this);
}
});
}
private void updateFragments() {
MissionsFragment fragment = new AllMissionsFragment();
getFragmentManager().beginTransaction()
.replace(R.id.frame, fragment)
.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE)
.commit();
}
public boolean onCreateOptionsMenu(Menu menu) {
super.onCreateOptionsMenu(menu);
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.download_menu, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home: {
onBackPressed();
return true;
}
case R.id.action_settings: {
Intent intent = new Intent(this, SettingsActivity.class);
startActivity(intent);
return true;
}
default:
return super.onOptionsItemSelected(item);
}
}
}

View File

@@ -0,0 +1,271 @@
package org.schabi.newpipe.download;
import android.os.Bundle;
import android.support.annotation.IdRes;
import android.support.annotation.Nullable;
import android.support.v4.app.DialogFragment;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.EditText;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.SeekBar;
import android.widget.Spinner;
import android.widget.TextView;
import org.schabi.newpipe.MainActivity;
import org.schabi.newpipe.R;
import org.schabi.newpipe.extractor.MediaFormat;
import org.schabi.newpipe.extractor.stream.AudioStream;
import org.schabi.newpipe.extractor.stream.StreamInfo;
import org.schabi.newpipe.extractor.stream.VideoStream;
import org.schabi.newpipe.fragments.detail.SpinnerToolbarAdapter;
import org.schabi.newpipe.settings.NewPipeSettings;
import org.schabi.newpipe.util.FilenameUtils;
import org.schabi.newpipe.util.ListHelper;
import org.schabi.newpipe.util.PermissionHelper;
import org.schabi.newpipe.util.ThemeHelper;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import us.shandian.giga.service.DownloadManagerService;
public class DownloadDialog extends DialogFragment implements RadioGroup.OnCheckedChangeListener, AdapterView.OnItemSelectedListener {
private static final String TAG = "DialogFragment";
private static final boolean DEBUG = MainActivity.DEBUG;
private static final String INFO_KEY = "info_key";
private static final String SORTED_VIDEOS_LIST_KEY = "sorted_videos_list_key";
private static final String SELECTED_VIDEO_KEY = "selected_video_key";
private static final String SELECTED_AUDIO_KEY = "selected_audio_key";
private StreamInfo currentInfo;
private ArrayList<VideoStream> sortedStreamVideosList;
private int selectedVideoIndex;
private int selectedAudioIndex;
private EditText nameEditText;
private Spinner streamsSpinner;
private RadioGroup radioVideoAudioGroup;
private TextView threadsCountTextView;
private SeekBar threadsSeekBar;
public static DownloadDialog newInstance(StreamInfo info, ArrayList<VideoStream> sortedStreamVideosList, int selectedVideoIndex) {
DownloadDialog dialog = new DownloadDialog();
dialog.setInfo(info, sortedStreamVideosList, selectedVideoIndex);
dialog.setStyle(DialogFragment.STYLE_NO_TITLE, 0);
return dialog;
}
private void setInfo(StreamInfo info, ArrayList<VideoStream> sortedStreamVideosList, int selectedVideoIndex) {
this.currentInfo = info;
this.selectedVideoIndex = selectedVideoIndex;
this.sortedStreamVideosList = sortedStreamVideosList;
}
/*//////////////////////////////////////////////////////////////////////////
// LifeCycle
//////////////////////////////////////////////////////////////////////////*/
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (DEBUG) Log.d(TAG, "onCreate() called with: savedInstanceState = [" + savedInstanceState + "]");
if (!PermissionHelper.checkStoragePermissions(getActivity())) {
getDialog().dismiss();
return;
}
if (savedInstanceState != null) {
Serializable serial = savedInstanceState.getSerializable(INFO_KEY);
if (serial instanceof StreamInfo) currentInfo = (StreamInfo) serial;
serial = savedInstanceState.getSerializable(SORTED_VIDEOS_LIST_KEY);
if (serial instanceof ArrayList) { //noinspection unchecked
sortedStreamVideosList = (ArrayList<VideoStream>) serial;
}
selectedVideoIndex = savedInstanceState.getInt(SELECTED_VIDEO_KEY, 0);
selectedAudioIndex = savedInstanceState.getInt(SELECTED_AUDIO_KEY, 0);
}
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
if (DEBUG) Log.d(TAG, "onCreateView() called with: inflater = [" + inflater + "], container = [" + container + "], savedInstanceState = [" + savedInstanceState + "]");
return inflater.inflate(R.layout.dialog_url, container);
}
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
nameEditText = view.findViewById(R.id.file_name);
nameEditText.setText(FilenameUtils.createFilename(getContext(), currentInfo.name));
selectedAudioIndex = ListHelper.getDefaultAudioFormat(getContext(), currentInfo.audio_streams);
streamsSpinner = view.findViewById(R.id.quality_spinner);
streamsSpinner.setOnItemSelectedListener(this);
threadsCountTextView = view.findViewById(R.id.threads_count);
threadsSeekBar = view.findViewById(R.id.threads);
radioVideoAudioGroup = view.findViewById(R.id.video_audio_group);
radioVideoAudioGroup.setOnCheckedChangeListener(this);
initToolbar(view.<Toolbar>findViewById(R.id.toolbar));
checkDownloadOptions(view);
setupVideoSpinner(sortedStreamVideosList, streamsSpinner);
int def = 3;
threadsCountTextView.setText(String.valueOf(def));
threadsSeekBar.setProgress(def - 1);
threadsSeekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
@Override
public void onProgressChanged(SeekBar seekbar, int progress, boolean fromUser) {
threadsCountTextView.setText(String.valueOf(progress + 1));
}
@Override
public void onStartTrackingTouch(SeekBar p1) {
}
@Override
public void onStopTrackingTouch(SeekBar p1) {
}
});
}
@Override
public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putSerializable(INFO_KEY, currentInfo);
outState.putSerializable(SORTED_VIDEOS_LIST_KEY, sortedStreamVideosList);
outState.putInt(SELECTED_VIDEO_KEY, selectedVideoIndex);
outState.putInt(SELECTED_AUDIO_KEY, selectedAudioIndex);
}
/*//////////////////////////////////////////////////////////////////////////
// Inits
//////////////////////////////////////////////////////////////////////////*/
private void initToolbar(Toolbar toolbar) {
if (DEBUG) Log.d(TAG, "initToolbar() called with: toolbar = [" + toolbar + "]");
toolbar.setTitle(R.string.download_dialog_title);
toolbar.setNavigationIcon(ThemeHelper.isLightThemeSelected(getActivity()) ? R.drawable.ic_arrow_back_black_24dp : R.drawable.ic_arrow_back_white_24dp);
toolbar.inflateMenu(R.menu.dialog_url);
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
getDialog().dismiss();
}
});
toolbar.setOnMenuItemClickListener(new Toolbar.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
if (item.getItemId() == R.id.okay) {
downloadSelected();
return true;
} else return false;
}
});
}
public void setupAudioSpinner(final List<AudioStream> audioStreams, Spinner spinner) {
String[] items = new String[audioStreams.size()];
for (int i = 0; i < audioStreams.size(); i++) {
AudioStream audioStream = audioStreams.get(i);
items[i] = MediaFormat.getNameById(audioStream.format) + " " + audioStream.average_bitrate + "kbps";
}
ArrayAdapter<String> itemAdapter = new ArrayAdapter<>(getContext(), android.R.layout.simple_spinner_dropdown_item, items);
spinner.setAdapter(itemAdapter);
spinner.setSelection(selectedAudioIndex);
}
public void setupVideoSpinner(final List<VideoStream> videoStreams, Spinner spinner) {
spinner.setAdapter(new SpinnerToolbarAdapter(getContext(), videoStreams, true));
spinner.setSelection(selectedVideoIndex);
}
/*//////////////////////////////////////////////////////////////////////////
// Radio group Video&Audio options - Listener
//////////////////////////////////////////////////////////////////////////*/
@Override
public void onCheckedChanged(RadioGroup group, @IdRes int checkedId) {
if (DEBUG) Log.d(TAG, "onCheckedChanged() called with: group = [" + group + "], checkedId = [" + checkedId + "]");
switch (checkedId) {
case R.id.audio_button:
setupAudioSpinner(currentInfo.audio_streams, streamsSpinner);
break;
case R.id.video_button:
setupVideoSpinner(sortedStreamVideosList, streamsSpinner);
break;
}
}
/*//////////////////////////////////////////////////////////////////////////
// Streams Spinner Listener
//////////////////////////////////////////////////////////////////////////*/
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
if (DEBUG) Log.d(TAG, "onItemSelected() called with: parent = [" + parent + "], view = [" + view + "], position = [" + position + "], id = [" + id + "]");
switch (radioVideoAudioGroup.getCheckedRadioButtonId()) {
case R.id.audio_button:
selectedAudioIndex = position;
break;
case R.id.video_button:
selectedVideoIndex = position;
break;
}
}
@Override
public void onNothingSelected(AdapterView<?> parent) {
}
/*//////////////////////////////////////////////////////////////////////////
// Utils
//////////////////////////////////////////////////////////////////////////*/
protected void checkDownloadOptions(View view) {
RadioButton audioButton = view.findViewById(R.id.audio_button);
RadioButton videoButton = view.findViewById(R.id.video_button);
if (currentInfo.audio_streams == null || currentInfo.audio_streams.size() == 0) {
audioButton.setVisibility(View.GONE);
videoButton.setChecked(true);
} else if (sortedStreamVideosList == null || sortedStreamVideosList.size() == 0) {
videoButton.setVisibility(View.GONE);
audioButton.setChecked(true);
}
}
private void downloadSelected() {
String url, location;
String fileName = nameEditText.getText().toString().trim();
if (fileName.isEmpty()) fileName = FilenameUtils.createFilename(getContext(), currentInfo.name);
boolean isAudio = radioVideoAudioGroup.getCheckedRadioButtonId() == R.id.audio_button;
url = isAudio ? currentInfo.audio_streams.get(selectedAudioIndex).url : sortedStreamVideosList.get(selectedVideoIndex).url;
location = isAudio ? NewPipeSettings.getAudioDownloadPath(getContext()) : NewPipeSettings.getVideoDownloadPath(getContext());
if (isAudio) fileName += "." + MediaFormat.getSuffixById(currentInfo.audio_streams.get(selectedAudioIndex).format);
else fileName += "." + MediaFormat.getSuffixById(sortedStreamVideosList.get(selectedVideoIndex).format);
DownloadManagerService.startMission(getContext(), url, location, fileName, isAudio, threadsSeekBar.getProgress() + 1);
getDialog().dismiss();
}
}

View File

@@ -0,0 +1,13 @@
package org.schabi.newpipe.fragments;
/**
* Indicates that the current fragment can handle back presses
*/
public interface BackPressable {
/**
* A back press was delegated to this fragment
*
* @return if the back press was handled
*/
boolean onBackPressed();
}

View File

@@ -0,0 +1,235 @@
package org.schabi.newpipe.fragments;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.annotation.StringRes;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;
import com.jakewharton.rxbinding2.view.RxView;
import org.schabi.newpipe.BaseFragment;
import org.schabi.newpipe.MainActivity;
import org.schabi.newpipe.R;
import org.schabi.newpipe.ReCaptchaActivity;
import org.schabi.newpipe.extractor.exceptions.ReCaptchaException;
import org.schabi.newpipe.report.ErrorActivity;
import org.schabi.newpipe.report.UserAction;
import org.schabi.newpipe.util.ExtractorHelper;
import org.schabi.newpipe.util.InfoCache;
import java.io.IOException;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import icepick.State;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.functions.Consumer;
import static org.schabi.newpipe.util.AnimationUtils.animateView;
public abstract class BaseStateFragment<I> extends BaseFragment implements ViewContract<I> {
@State
protected AtomicBoolean wasLoading = new AtomicBoolean();
protected AtomicBoolean isLoading = new AtomicBoolean();
@Nullable
protected View emptyStateView;
@Nullable
protected ProgressBar loadingProgressBar;
protected View errorPanelRoot;
protected Button errorButtonRetry;
protected TextView errorTextView;
@Override
public void onViewCreated(View rootView, Bundle savedInstanceState) {
super.onViewCreated(rootView, savedInstanceState);
doInitialLoadLogic();
}
@Override
public void onPause() {
super.onPause();
wasLoading.set(isLoading.get());
}
/*//////////////////////////////////////////////////////////////////////////
// Init
//////////////////////////////////////////////////////////////////////////*/
@Override
protected void initViews(View rootView, Bundle savedInstanceState) {
super.initViews(rootView, savedInstanceState);
emptyStateView = rootView.findViewById(R.id.empty_state_view);
loadingProgressBar = rootView.findViewById(R.id.loading_progress_bar);
errorPanelRoot = rootView.findViewById(R.id.error_panel);
errorButtonRetry = rootView.findViewById(R.id.error_button_retry);
errorTextView = rootView.findViewById(R.id.error_message_view);
}
@Override
protected void initListeners() {
super.initListeners();
RxView.clicks(errorButtonRetry)
.debounce(300, TimeUnit.MILLISECONDS)
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<Object>() {
@Override
public void accept(Object o) throws Exception {
onRetryButtonClicked();
}
});
}
protected void onRetryButtonClicked() {
reloadContent();
}
public void reloadContent() {
startLoading(true);
}
/*//////////////////////////////////////////////////////////////////////////
// Load
//////////////////////////////////////////////////////////////////////////*/
protected void doInitialLoadLogic() {
startLoading(true);
}
protected void startLoading(boolean forceLoad) {
if (DEBUG) Log.d(TAG, "startLoading() called with: forceLoad = [" + forceLoad + "]");
showLoading();
isLoading.set(true);
}
/*//////////////////////////////////////////////////////////////////////////
// Contract
//////////////////////////////////////////////////////////////////////////*/
@Override
public void showLoading() {
if (emptyStateView != null) animateView(emptyStateView, false, 150);
if (loadingProgressBar != null) animateView(loadingProgressBar, true, 400);
animateView(errorPanelRoot, false, 150);
}
@Override
public void hideLoading() {
if (emptyStateView != null) animateView(emptyStateView, false, 150);
if (loadingProgressBar != null) animateView(loadingProgressBar, false, 0);
animateView(errorPanelRoot, false, 150);
}
@Override
public void showEmptyState() {
isLoading.set(false);
if (emptyStateView != null) animateView(emptyStateView, true, 200);
if (loadingProgressBar != null) animateView(loadingProgressBar, false, 0);
animateView(errorPanelRoot, false, 150);
}
@Override
public void showError(String message, boolean showRetryButton) {
if (DEBUG) Log.d(TAG, "showError() called with: message = [" + message + "], showRetryButton = [" + showRetryButton + "]");
isLoading.set(false);
InfoCache.getInstance().clearCache();
hideLoading();
errorTextView.setText(message);
if (showRetryButton) animateView(errorButtonRetry, true, 600);
else animateView(errorButtonRetry, false, 0);
animateView(errorPanelRoot, true, 300);
}
@Override
public void handleResult(I result) {
if (DEBUG) Log.d(TAG, "handleResult() called with: result = [" + result + "]");
hideLoading();
}
/*//////////////////////////////////////////////////////////////////////////
// Error handling
//////////////////////////////////////////////////////////////////////////*/
/**
* Default implementation handles some general exceptions
*
* @return if the exception was handled
*/
protected boolean onError(Throwable exception) {
if (DEBUG) Log.d(TAG, "onError() called with: exception = [" + exception + "]");
isLoading.set(false);
if (isDetached() || isRemoving()) {
if (DEBUG) Log.w(TAG, "onError() is detached or removing = [" + exception + "]");
return true;
}
if (ExtractorHelper.isInterruptedCaused(exception)) {
if (DEBUG) Log.w(TAG, "onError() isInterruptedCaused! = [" + exception + "]");
return true;
}
if (exception instanceof ReCaptchaException) {
onReCaptchaException();
return true;
} else if (exception instanceof IOException) {
showError(getString(R.string.network_error), true);
return true;
}
return false;
}
public void onReCaptchaException() {
if (DEBUG) Log.d(TAG, "onReCaptchaException() called");
Toast.makeText(activity, R.string.recaptcha_request_toast, Toast.LENGTH_LONG).show();
// Starting ReCaptcha Challenge Activity
startActivityForResult(new Intent(activity, ReCaptchaActivity.class), ReCaptchaActivity.RECAPTCHA_REQUEST);
showError(getString(R.string.recaptcha_request_toast), false);
}
public void onUnrecoverableError(Throwable exception, UserAction userAction, String serviceName, String request, @StringRes int errorId) {
onUnrecoverableError(Collections.singletonList(exception), userAction, serviceName, request, errorId);
}
public void onUnrecoverableError(List<Throwable> exception, UserAction userAction, String serviceName, String request, @StringRes int errorId) {
if (DEBUG) Log.d(TAG, "onUnrecoverableError() called with: exception = [" + exception + "]");
if (serviceName == null) serviceName = "none";
if (request == null) request = "none";
ErrorActivity.reportError(getContext(), exception, MainActivity.class, null, ErrorActivity.ErrorInfo.make(userAction, serviceName, request, errorId));
}
public void showSnackBarError(Throwable exception, UserAction userAction, String serviceName, String request, @StringRes int errorId) {
showSnackBarError(Collections.singletonList(exception), userAction, serviceName, request, errorId);
}
/**
* Show a SnackBar and only call ErrorActivity#reportError IF we a find a valid view (otherwise the error screen appears)
*/
public void showSnackBarError(List<Throwable> exception, UserAction userAction, String serviceName, String request, @StringRes int errorId) {
if (DEBUG) {
Log.d(TAG, "showSnackBarError() called with: exception = [" + exception + "], userAction = [" + userAction + "], request = [" + request + "], errorId = [" + errorId + "]");
}
View rootView = activity != null ? activity.findViewById(android.R.id.content) : null;
if (rootView == null && getView() != null) rootView = getView();
if (rootView == null) return;
ErrorActivity.reportError(getContext(), exception, MainActivity.class, rootView, ErrorActivity.ErrorInfo.make(userAction, serviceName, request, errorId));
}
}

View File

@@ -0,0 +1,18 @@
package org.schabi.newpipe.fragments;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import org.schabi.newpipe.BaseFragment;
import org.schabi.newpipe.R;
public class BlankFragment extends BaseFragment {
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_blank, container, false);
}
}

View File

@@ -0,0 +1,132 @@
package org.schabi.newpipe.fragments;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.view.ViewPager;
import android.support.v7.app.ActionBar;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import org.schabi.newpipe.BaseFragment;
import org.schabi.newpipe.R;
import org.schabi.newpipe.fragments.subscription.SubscriptionFragment;
import org.schabi.newpipe.util.NavigationHelper;
public class MainFragment extends BaseFragment implements TabLayout.OnTabSelectedListener {
private ViewPager viewPager;
/*//////////////////////////////////////////////////////////////////////////
// Fragment's LifeCycle
//////////////////////////////////////////////////////////////////////////*/
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setHasOptionsMenu(true);
}
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_main, container, false);
}
@Override
protected void initViews(View rootView, Bundle savedInstanceState) {
super.initViews(rootView, savedInstanceState);
TabLayout tabLayout = rootView.findViewById(R.id.main_tab_layout);
viewPager = rootView.findViewById(R.id.pager);
/* Nested fragment, use child fragment here to maintain backstack in view pager. */
PagerAdapter adapter = new PagerAdapter(getChildFragmentManager());
viewPager.setAdapter(adapter);
viewPager.setOffscreenPageLimit(adapter.getCount());
tabLayout.setupWithViewPager(viewPager);
}
/*//////////////////////////////////////////////////////////////////////////
// Menu
//////////////////////////////////////////////////////////////////////////*/
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
super.onCreateOptionsMenu(menu, inflater);
if (DEBUG) Log.d(TAG, "onCreateOptionsMenu() called with: menu = [" + menu + "], inflater = [" + inflater + "]");
inflater.inflate(R.menu.main_fragment_menu, menu);
ActionBar supportActionBar = activity.getSupportActionBar();
if (supportActionBar != null) {
supportActionBar.setDisplayShowTitleEnabled(false);
supportActionBar.setDisplayHomeAsUpEnabled(false);
}
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.action_search:
NavigationHelper.openSearchFragment(getFragmentManager(), 0, "");
return true;
}
return super.onOptionsItemSelected(item);
}
/*//////////////////////////////////////////////////////////////////////////
// Tabs
//////////////////////////////////////////////////////////////////////////*/
@Override
public void onTabSelected(TabLayout.Tab tab) {
viewPager.setCurrentItem(tab.getPosition());
}
@Override
public void onTabUnselected(TabLayout.Tab tab) {
}
@Override
public void onTabReselected(TabLayout.Tab tab) {
}
private class PagerAdapter extends FragmentPagerAdapter {
private int[] tabTitles = new int[]{
R.string.tab_main,
R.string.tab_subscriptions
};
PagerAdapter(FragmentManager fm) {
super(fm);
}
@Override
public Fragment getItem(int position) {
switch (position) {
case 1:
return new SubscriptionFragment();
default:
return new BlankFragment();
}
}
@Override
public CharSequence getPageTitle(int position) {
return getString(this.tabTitles[position]);
}
@Override
public int getCount() {
return this.tabTitles.length;
}
}
}

View File

@@ -0,0 +1,43 @@
package org.schabi.newpipe.fragments;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.StaggeredGridLayoutManager;
/**
* Recycler view scroll listener which calls the method {@link #onScrolledDown(RecyclerView)}
* if the view is scrolled below the last item.
*/
public abstract class OnScrollBelowItemsListener extends RecyclerView.OnScrollListener {
@Override
public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
super.onScrolled(recyclerView, dx, dy);
if (dy > 0) {
int pastVisibleItems = 0, visibleItemCount, totalItemCount;
RecyclerView.LayoutManager layoutManager = recyclerView.getLayoutManager();
visibleItemCount = layoutManager.getChildCount();
totalItemCount = layoutManager.getItemCount();
// Already covers the GridLayoutManager case
if (layoutManager instanceof LinearLayoutManager) {
pastVisibleItems = ((LinearLayoutManager) layoutManager).findFirstVisibleItemPosition();
} else if (layoutManager instanceof StaggeredGridLayoutManager) {
int[] positions = ((StaggeredGridLayoutManager) layoutManager).findFirstVisibleItemPositions(null);
if (positions != null && positions.length > 0) pastVisibleItems = positions[0];
}
if ((visibleItemCount + pastVisibleItems) >= totalItemCount) {
onScrolledDown(recyclerView);
}
}
}
/**
* Called when the recycler view is scrolled below the last item.
*
* @param recyclerView the recycler view
*/
public abstract void onScrolledDown(RecyclerView recyclerView);
}

View File

@@ -0,0 +1,10 @@
package org.schabi.newpipe.fragments;
public interface ViewContract<I> {
void showLoading();
void hideLoading();
void showEmptyState();
void showError(String message, boolean showRetryButton);
void handleResult(I result);
}

View File

@@ -0,0 +1,163 @@
package org.schabi.newpipe.fragments.detail;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.widget.AdapterView;
import android.widget.Spinner;
import org.schabi.newpipe.R;
import org.schabi.newpipe.extractor.stream.VideoStream;
import org.schabi.newpipe.util.ListHelper;
import java.util.List;
/*
* Created by Christian Schabesberger on 18.08.15.
* <p>
* Copyright (C) Christian Schabesberger 2015 <chris.schabesberger@mailbox.org>
* DetailsMenuHandler.java is part of NewPipe.
* <p>
* NewPipe is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* NewPipe is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with NewPipe. If not, see <http://www.gnu.org/licenses/>.
*/
@SuppressWarnings("WeakerAccess")
class ActionBarHandler {
private static final String TAG = "ActionBarHandler";
private AppCompatActivity activity;
private int selectedVideoStream = -1;
private SharedPreferences defaultPreferences;
private Menu menu;
// Only callbacks are listed here, there are more actions which don't need a callback.
// those are edited directly. Typically VideoDetailFragment will implement those callbacks.
private OnActionListener onShareListener;
private OnActionListener onOpenInBrowserListener;
private OnActionListener onDownloadListener;
private OnActionListener onPlayWithKodiListener;
// Triggered when a stream related action is triggered.
public interface OnActionListener {
void onActionSelected(int selectedStreamId);
}
public ActionBarHandler(AppCompatActivity activity) {
this.activity = activity;
}
public void setupStreamList(final List<VideoStream> videoStreams, Spinner toolbarSpinner) {
if (activity == null) return;
selectedVideoStream = ListHelper.getDefaultResolutionIndex(activity, videoStreams);
boolean isExternalPlayerEnabled = PreferenceManager.getDefaultSharedPreferences(activity).getBoolean(activity.getString(R.string.use_external_video_player_key), false);
toolbarSpinner.setAdapter(new SpinnerToolbarAdapter(activity, videoStreams, isExternalPlayerEnabled));
toolbarSpinner.setSelection(selectedVideoStream);
toolbarSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
selectedVideoStream = position;
}
@Override
public void onNothingSelected(AdapterView<?> parent) {
}
});
}
public void setupMenu(Menu menu, MenuInflater inflater) {
this.menu = menu;
// CAUTION set item properties programmatically otherwise it would not be accepted by
// appcompat itemsinflater.inflate(R.menu.videoitem_detail, menu);
defaultPreferences = PreferenceManager.getDefaultSharedPreferences(activity);
inflater.inflate(R.menu.video_detail_menu, menu);
updateItemsVisibility();
}
public void updateItemsVisibility(){
showPlayWithKodiAction(defaultPreferences.getBoolean(activity.getString(R.string.show_play_with_kodi_key), false));
}
public boolean onItemSelected(MenuItem item) {
int id = item.getItemId();
switch (id) {
case R.id.menu_item_share: {
if (onShareListener != null) {
onShareListener.onActionSelected(selectedVideoStream);
}
return true;
}
case R.id.menu_item_openInBrowser: {
if (onOpenInBrowserListener != null) {
onOpenInBrowserListener.onActionSelected(selectedVideoStream);
}
return true;
}
case R.id.menu_item_download:
if (onDownloadListener != null) {
onDownloadListener.onActionSelected(selectedVideoStream);
}
return true;
case R.id.action_play_with_kodi:
if (onPlayWithKodiListener != null) {
onPlayWithKodiListener.onActionSelected(selectedVideoStream);
}
return true;
default:
Log.e(TAG, "Menu Item not known");
}
return false;
}
public int getSelectedVideoStream() {
return selectedVideoStream;
}
public void setOnShareListener(OnActionListener listener) {
onShareListener = listener;
}
public void setOnOpenInBrowserListener(OnActionListener listener) {
onOpenInBrowserListener = listener;
}
public void setOnDownloadListener(OnActionListener listener) {
onDownloadListener = listener;
}
public void setOnPlayWithKodiListener(OnActionListener listener) {
onPlayWithKodiListener = listener;
}
public void showDownloadAction(boolean visible) {
menu.findItem(R.id.menu_item_download).setVisible(visible);
}
public void showPlayWithKodiAction(boolean visible) {
menu.findItem(R.id.action_play_with_kodi).setVisible(visible);
}
}

View File

@@ -0,0 +1,74 @@
package org.schabi.newpipe.fragments.detail;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.Spinner;
import android.widget.TextView;
import org.schabi.newpipe.R;
import org.schabi.newpipe.extractor.MediaFormat;
import org.schabi.newpipe.extractor.stream.VideoStream;
import java.util.List;
public class SpinnerToolbarAdapter extends BaseAdapter {
private final List<VideoStream> videoStreams;
private final boolean showIconNoAudio;
private final Context context;
public SpinnerToolbarAdapter(Context context, List<VideoStream> videoStreams, boolean showIconNoAudio) {
this.context = context;
this.videoStreams = videoStreams;
this.showIconNoAudio = showIconNoAudio;
}
@Override
public int getCount() {
return videoStreams.size();
}
@Override
public Object getItem(int position) {
return videoStreams.get(position);
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getDropDownView(int position, View convertView, ViewGroup parent) {
return getCustomView(position, convertView, parent, true);
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
return getCustomView(((Spinner) parent).getSelectedItemPosition(), convertView, parent, false);
}
private View getCustomView(int position, View convertView, ViewGroup parent, boolean isDropdownItem) {
if (convertView == null) {
convertView = LayoutInflater.from(context).inflate(R.layout.resolutions_spinner_item, parent, false);
}
ImageView woSoundIcon = convertView.findViewById(R.id.wo_sound_icon);
TextView text = convertView.findViewById(android.R.id.text1);
VideoStream item = (VideoStream) getItem(position);
text.setText(MediaFormat.getNameById(item.format) + " " + item.resolution);
int visibility = !showIconNoAudio ? View.GONE
: item.isVideoOnly ? View.VISIBLE
: isDropdownItem ? View.INVISIBLE
: View.GONE;
woSoundIcon.setVisibility(visibility);
return convertView;
}
}

View File

@@ -0,0 +1,35 @@
package org.schabi.newpipe.fragments.detail;
import java.io.Serializable;
class StackItem implements Serializable {
private int serviceId;
private String title, url;
StackItem(int serviceId, String url, String title) {
this.serviceId = serviceId;
this.url = url;
this.title = title;
}
public void setTitle(String title) {
this.title = title;
}
public int getServiceId() {
return serviceId;
}
public String getTitle() {
return title;
}
public String getUrl() {
return url;
}
@Override
public String toString() {
return getServiceId() + ":" + getUrl() + " > " + getTitle();
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,239 @@
package org.schabi.newpipe.fragments.list;
import android.content.Context;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v7.app.ActionBar;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.View;
import org.schabi.newpipe.R;
import org.schabi.newpipe.extractor.InfoItem;
import org.schabi.newpipe.extractor.channel.ChannelInfoItem;
import org.schabi.newpipe.extractor.playlist.PlaylistInfoItem;
import org.schabi.newpipe.extractor.stream.StreamInfoItem;
import org.schabi.newpipe.fragments.BaseStateFragment;
import org.schabi.newpipe.fragments.OnScrollBelowItemsListener;
import org.schabi.newpipe.info_list.InfoItemBuilder;
import org.schabi.newpipe.info_list.InfoListAdapter;
import org.schabi.newpipe.util.NavigationHelper;
import org.schabi.newpipe.util.StateSaver;
import java.util.List;
import java.util.Queue;
import static org.schabi.newpipe.util.AnimationUtils.animateView;
public abstract class BaseListFragment<I, N> extends BaseStateFragment<I> implements ListViewContract<I, N>, StateSaver.WriteRead {
/*//////////////////////////////////////////////////////////////////////////
// Views
//////////////////////////////////////////////////////////////////////////*/
protected InfoListAdapter infoListAdapter;
protected RecyclerView itemsList;
/*//////////////////////////////////////////////////////////////////////////
// LifeCycle
//////////////////////////////////////////////////////////////////////////*/
@Override
public void onAttach(Context context) {
super.onAttach(context);
infoListAdapter = new InfoListAdapter(activity);
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setHasOptionsMenu(true);
}
@Override
public void onDestroy() {
super.onDestroy();
StateSaver.onDestroy(savedState);
}
/*//////////////////////////////////////////////////////////////////////////
// State Saving
//////////////////////////////////////////////////////////////////////////*/
protected StateSaver.SavedState savedState;
@Override
public String generateSuffix() {
// Naive solution, but it's good for now (the items don't change)
return "." + infoListAdapter.getItemsList().size() + ".list";
}
@Override
public void writeTo(Queue<Object> objectsToSave) {
objectsToSave.add(infoListAdapter.getItemsList());
}
@Override
@SuppressWarnings("unchecked")
public void readFrom(@NonNull Queue<Object> savedObjects) throws Exception {
infoListAdapter.getItemsList().clear();
infoListAdapter.getItemsList().addAll((List<InfoItem>) savedObjects.poll());
}
@Override
public void onSaveInstanceState(Bundle bundle) {
super.onSaveInstanceState(bundle);
savedState = StateSaver.tryToSave(activity.isChangingConfigurations(), savedState, bundle, this);
}
@Override
protected void onRestoreInstanceState(@NonNull Bundle bundle) {
super.onRestoreInstanceState(bundle);
savedState = StateSaver.tryToRestore(bundle, this);
}
/*//////////////////////////////////////////////////////////////////////////
// Init
//////////////////////////////////////////////////////////////////////////*/
protected View getListHeader() {
return null;
}
protected View getListFooter() {
return activity.getLayoutInflater().inflate(R.layout.pignate_footer, itemsList, false);
}
protected RecyclerView.LayoutManager getListLayoutManager() {
return new LinearLayoutManager(activity);
}
@Override
protected void initViews(View rootView, Bundle savedInstanceState) {
super.initViews(rootView, savedInstanceState);
itemsList = rootView.findViewById(R.id.items_list);
itemsList.setLayoutManager(getListLayoutManager());
infoListAdapter.setFooter(getListFooter());
infoListAdapter.setHeader(getListHeader());
itemsList.setAdapter(infoListAdapter);
}
protected void onItemSelected(InfoItem selectedItem) {
if (DEBUG) Log.d(TAG, "onItemSelected() called with: selectedItem = [" + selectedItem + "]");
}
@Override
protected void initListeners() {
super.initListeners();
infoListAdapter.setOnStreamSelectedListener(new InfoItemBuilder.OnInfoItemSelectedListener<StreamInfoItem>() {
@Override
public void selected(StreamInfoItem selectedItem) {
onItemSelected(selectedItem);
NavigationHelper.openVideoDetailFragment(getFragmentManager(), selectedItem.service_id, selectedItem.url, selectedItem.name);
}
});
infoListAdapter.setOnChannelSelectedListener(new InfoItemBuilder.OnInfoItemSelectedListener<ChannelInfoItem>() {
@Override
public void selected(ChannelInfoItem selectedItem) {
onItemSelected(selectedItem);
NavigationHelper.openChannelFragment(getFragmentManager(), selectedItem.service_id, selectedItem.url, selectedItem.name);
}
});
infoListAdapter.setOnPlaylistSelectedListener(new InfoItemBuilder.OnInfoItemSelectedListener<PlaylistInfoItem>() {
@Override
public void selected(PlaylistInfoItem selectedItem) {
onItemSelected(selectedItem);
NavigationHelper.openPlaylistFragment(getFragmentManager(), selectedItem.service_id, selectedItem.url, selectedItem.name);
}
});
itemsList.clearOnScrollListeners();
itemsList.addOnScrollListener(new OnScrollBelowItemsListener() {
@Override
public void onScrolledDown(RecyclerView recyclerView) {
onScrollToBottom();
}
});
}
protected void onScrollToBottom() {
if (hasMoreItems() && !isLoading.get()) {
loadMoreItems();
}
}
/*//////////////////////////////////////////////////////////////////////////
// Menu
//////////////////////////////////////////////////////////////////////////*/
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
if (DEBUG) Log.d(TAG, "onCreateOptionsMenu() called with: menu = [" + menu + "], inflater = [" + inflater + "]");
super.onCreateOptionsMenu(menu, inflater);
ActionBar supportActionBar = activity.getSupportActionBar();
if (supportActionBar != null) {
supportActionBar.setDisplayShowTitleEnabled(true);
supportActionBar.setDisplayHomeAsUpEnabled(true);
}
}
/*//////////////////////////////////////////////////////////////////////////
// Load and handle
//////////////////////////////////////////////////////////////////////////*/
protected abstract void loadMoreItems();
protected abstract boolean hasMoreItems();
/*//////////////////////////////////////////////////////////////////////////
// Contract
//////////////////////////////////////////////////////////////////////////*/
@Override
public void showLoading() {
super.showLoading();
// animateView(itemsList, false, 400);
}
@Override
public void hideLoading() {
super.hideLoading();
animateView(itemsList, true, 300);
}
@Override
public void showError(String message, boolean showRetryButton) {
super.showError(message, showRetryButton);
showListFooter(false);
animateView(itemsList, false, 200);
}
@Override
public void showEmptyState() {
super.showEmptyState();
showListFooter(false);
}
@Override
public void showListFooter(final boolean show) {
itemsList.post(new Runnable() {
@Override
public void run() {
infoListAdapter.showFooter(show);
}
});
}
@Override
public void handleNextItems(N result) {
isLoading.set(false);
}
}

View File

@@ -0,0 +1,216 @@
package org.schabi.newpipe.fragments.list;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
import org.schabi.newpipe.extractor.ListExtractor;
import org.schabi.newpipe.extractor.ListInfo;
import java.util.Queue;
import icepick.State;
import io.reactivex.Single;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.Disposable;
import io.reactivex.functions.Consumer;
import io.reactivex.schedulers.Schedulers;
public abstract class BaseListInfoFragment<I extends ListInfo> extends BaseListFragment<I, ListExtractor.NextItemsResult> {
@State
protected int serviceId = -1;
@State
protected String name;
@State
protected String url;
protected I currentInfo;
protected String currentNextItemsUrl;
protected Disposable currentWorker;
@Override
protected void initViews(View rootView, Bundle savedInstanceState) {
super.initViews(rootView, savedInstanceState);
setTitle(name);
showListFooter(hasMoreItems());
}
@Override
public void onPause() {
super.onPause();
if (currentWorker != null) currentWorker.dispose();
}
@Override
public void onResume() {
super.onResume();
// Check if it was loading when the fragment was stopped/paused,
if (wasLoading.getAndSet(false)) {
if (hasMoreItems() && infoListAdapter.getItemsList().size() > 0) {
loadMoreItems();
} else {
doInitialLoadLogic();
}
}
}
@Override
public void onDestroy() {
super.onDestroy();
if (currentWorker != null) currentWorker.dispose();
currentWorker = null;
}
/*//////////////////////////////////////////////////////////////////////////
// State Saving
//////////////////////////////////////////////////////////////////////////*/
@Override
public void writeTo(Queue<Object> objectsToSave) {
super.writeTo(objectsToSave);
objectsToSave.add(currentInfo);
objectsToSave.add(currentNextItemsUrl);
}
@Override
@SuppressWarnings("unchecked")
public void readFrom(@NonNull Queue<Object> savedObjects) throws Exception {
super.readFrom(savedObjects);
currentInfo = (I) savedObjects.poll();
currentNextItemsUrl = (String) savedObjects.poll();
}
/*//////////////////////////////////////////////////////////////////////////
// Utils
//////////////////////////////////////////////////////////////////////////*/
public void setTitle(String title) {
Log.d(TAG, "setTitle() called with: title = [" + title + "]");
if (activity.getSupportActionBar() != null) {
activity.getSupportActionBar().setTitle(title);
}
}
/*//////////////////////////////////////////////////////////////////////////
// Load and handle
//////////////////////////////////////////////////////////////////////////*/
protected void doInitialLoadLogic() {
if (DEBUG) Log.d(TAG, "doInitialLoadLogic() called");
if (currentInfo == null) {
startLoading(false);
} else handleResult(currentInfo);
}
/**
* Implement the logic to load the info from the network.<br/>
* You can use the default implementations from {@link org.schabi.newpipe.util.ExtractorHelper}.
*
* @param forceLoad allow or disallow the result to come from the cache
*/
protected abstract Single<I> loadResult(boolean forceLoad);
@Override
public void startLoading(boolean forceLoad) {
super.startLoading(forceLoad);
showListFooter(false);
currentInfo = null;
if (currentWorker != null) currentWorker.dispose();
currentWorker = loadResult(forceLoad)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<I>() {
@Override
public void accept(@NonNull I result) throws Exception {
isLoading.set(false);
currentInfo = result;
currentNextItemsUrl = result.next_streams_url;
handleResult(result);
}
}, new Consumer<Throwable>() {
@Override
public void accept(@NonNull Throwable throwable) throws Exception {
onError(throwable);
}
});
}
/**
* Implement the logic to load more items<br/>
* You can use the default implementations from {@link org.schabi.newpipe.util.ExtractorHelper}
*/
protected abstract Single<ListExtractor.NextItemsResult> loadMoreItemsLogic();
protected void loadMoreItems() {
isLoading.set(true);
if (currentWorker != null) currentWorker.dispose();
currentWorker = loadMoreItemsLogic()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ListExtractor.NextItemsResult>() {
@Override
public void accept(@io.reactivex.annotations.NonNull ListExtractor.NextItemsResult nextItemsResult) throws Exception {
isLoading.set(false);
handleNextItems(nextItemsResult);
}
}, new Consumer<Throwable>() {
@Override
public void accept(@io.reactivex.annotations.NonNull Throwable throwable) throws Exception {
isLoading.set(false);
onError(throwable);
}
});
}
@Override
public void handleNextItems(ListExtractor.NextItemsResult result) {
super.handleNextItems(result);
currentNextItemsUrl = result.nextItemsUrl;
infoListAdapter.addInfoItemList(result.nextItemsList);
showListFooter(hasMoreItems());
}
@Override
protected boolean hasMoreItems() {
return !TextUtils.isEmpty(currentNextItemsUrl);
}
/*//////////////////////////////////////////////////////////////////////////
// Contract
//////////////////////////////////////////////////////////////////////////*/
@Override
public void handleResult(@NonNull I result) {
super.handleResult(result);
url = result.url;
name = result.name;
setTitle(name);
if (infoListAdapter.getItemsList().size() == 0) {
if (result.related_streams.size() > 0) {
infoListAdapter.addInfoItemList(result.related_streams);
showListFooter(hasMoreItems());
} else {
infoListAdapter.clearStreamItemList();
showEmptyState();
}
}
}
/*//////////////////////////////////////////////////////////////////////////
// Utils
//////////////////////////////////////////////////////////////////////////*/
protected void setInitialData(int serviceId, String url, String name) {
this.serviceId = serviceId;
this.url = url;
this.name = !TextUtils.isEmpty(name) ? name : "";
}
}

View File

@@ -0,0 +1,9 @@
package org.schabi.newpipe.fragments.list;
import org.schabi.newpipe.fragments.ViewContract;
public interface ListViewContract<I, N> extends ViewContract<I> {
void showListFooter(boolean show);
void handleNextItems(N result);
}

View File

@@ -0,0 +1,383 @@
package org.schabi.newpipe.fragments.list.channel;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.content.ContextCompat;
import android.text.TextUtils;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import com.jakewharton.rxbinding2.view.RxView;
import org.schabi.newpipe.R;
import org.schabi.newpipe.database.subscription.SubscriptionEntity;
import org.schabi.newpipe.extractor.ListExtractor;
import org.schabi.newpipe.extractor.NewPipe;
import org.schabi.newpipe.extractor.channel.ChannelInfo;
import org.schabi.newpipe.extractor.exceptions.ExtractionException;
import org.schabi.newpipe.fragments.list.BaseListInfoFragment;
import org.schabi.newpipe.fragments.subscription.SubscriptionService;
import org.schabi.newpipe.report.UserAction;
import org.schabi.newpipe.util.AnimationUtils;
import org.schabi.newpipe.util.ExtractorHelper;
import org.schabi.newpipe.util.Localization;
import java.util.List;
import java.util.concurrent.TimeUnit;
import io.reactivex.Observable;
import io.reactivex.Single;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.CompositeDisposable;
import io.reactivex.disposables.Disposable;
import io.reactivex.functions.Action;
import io.reactivex.functions.Consumer;
import io.reactivex.functions.Function;
import io.reactivex.schedulers.Schedulers;
import static org.schabi.newpipe.util.AnimationUtils.animateBackgroundColor;
import static org.schabi.newpipe.util.AnimationUtils.animateTextColor;
import static org.schabi.newpipe.util.AnimationUtils.animateView;
public class ChannelFragment extends BaseListInfoFragment<ChannelInfo> {
private CompositeDisposable disposables = new CompositeDisposable();
private Disposable subscribeButtonMonitor;
private SubscriptionService subscriptionService;
/*//////////////////////////////////////////////////////////////////////////
// Views
//////////////////////////////////////////////////////////////////////////*/
private View headerRootLayout;
private ImageView headerChannelBanner;
private ImageView headerAvatarView;
private TextView headerTitleView;
private TextView headerSubscribersTextView;
private Button headerSubscribeButton;
private MenuItem menuRssButton;
public static ChannelFragment getInstance(int serviceId, String url, String name) {
ChannelFragment instance = new ChannelFragment();
instance.setInitialData(serviceId, url, name);
return instance;
}
/*//////////////////////////////////////////////////////////////////////////
// LifeCycle
//////////////////////////////////////////////////////////////////////////*/
@Override
public void onAttach(Context context) {
super.onAttach(context);
subscriptionService = SubscriptionService.getInstance();
}
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_channel, container, false);
}
@Override
public void onDestroy() {
super.onDestroy();
if (disposables != null) disposables.clear();
if (subscribeButtonMonitor != null) subscribeButtonMonitor.dispose();
}
/*//////////////////////////////////////////////////////////////////////////
// Init
//////////////////////////////////////////////////////////////////////////*/
protected View getListHeader() {
headerRootLayout = activity.getLayoutInflater().inflate(R.layout.channel_header, itemsList, false);
headerChannelBanner = headerRootLayout.findViewById(R.id.channel_banner_image);
headerAvatarView = headerRootLayout.findViewById(R.id.channel_avatar_view);
headerTitleView = headerRootLayout.findViewById(R.id.channel_title_view);
headerSubscribersTextView = headerRootLayout.findViewById(R.id.channel_subscriber_view);
headerSubscribeButton = headerRootLayout.findViewById(R.id.channel_subscribe_button);
return headerRootLayout;
}
/*//////////////////////////////////////////////////////////////////////////
// Menu
//////////////////////////////////////////////////////////////////////////*/
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
if (DEBUG) Log.d(TAG, "onCreateOptionsMenu() called with: menu = [" + menu + "], inflater = [" + inflater + "]");
super.onCreateOptionsMenu(menu, inflater);
inflater.inflate(R.menu.menu_channel, menu);
menuRssButton = menu.findItem(R.id.menu_item_rss);
if (currentInfo != null) {
menuRssButton.setVisible(!TextUtils.isEmpty(currentInfo.feed_url));
}
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.menu_item_rss: {
Intent intent = new Intent();
intent.setAction(Intent.ACTION_VIEW);
intent.setData(Uri.parse(currentInfo.feed_url));
startActivity(intent);
return true;
}
default:
return super.onOptionsItemSelected(item);
}
}
/*//////////////////////////////////////////////////////////////////////////
// Channel Subscription
//////////////////////////////////////////////////////////////////////////*/
private static final int BUTTON_DEBOUNCE_INTERVAL = 100;
private void monitorSubscription(final ChannelInfo info) {
final Consumer<Throwable> onError = new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
animateView(headerSubscribeButton, false, 100);
showSnackBarError(throwable, UserAction.SUBSCRIPTION, NewPipe.getNameOfService(currentInfo.service_id), "Get subscription status", 0);
}
};
final Observable<List<SubscriptionEntity>> observable = subscriptionService.subscriptionTable()
.getSubscription(info.service_id, info.url)
.toObservable();
disposables.add(observable
.observeOn(AndroidSchedulers.mainThread())
.subscribe(getSubscribeUpdateMonitor(info), onError));
disposables.add(observable
// Some updates are very rapid (when calling the updateSubscription(info), for example)
// so only update the UI for the latest emission ("sync" the subscribe button's state)
.debounce(100, TimeUnit.MILLISECONDS)
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<List<SubscriptionEntity>>() {
@Override
public void accept(List<SubscriptionEntity> subscriptionEntities) throws Exception {
updateSubscribeButton(!subscriptionEntities.isEmpty());
}
}, onError));
}
private Function<Object, Object> mapOnSubscribe(final SubscriptionEntity subscription) {
return new Function<Object, Object>() {
@Override
public Object apply(@NonNull Object o) throws Exception {
subscriptionService.subscriptionTable().insert(subscription);
return o;
}
};
}
private Function<Object, Object> mapOnUnsubscribe(final SubscriptionEntity subscription) {
return new Function<Object, Object>() {
@Override
public Object apply(@NonNull Object o) throws Exception {
subscriptionService.subscriptionTable().delete(subscription);
return o;
}
};
}
private void updateSubscription(final ChannelInfo info) {
if (DEBUG) Log.d(TAG, "updateSubscription() called with: info = [" + info + "]");
final Action onComplete = new Action() {
@Override
public void run() throws Exception {
if (DEBUG) Log.d(TAG, "Updated subscription: " + info.url);
}
};
final Consumer<Throwable> onError = new Consumer<Throwable>() {
@Override
public void accept(@NonNull Throwable throwable) throws Exception {
onUnrecoverableError(throwable, UserAction.SUBSCRIPTION, NewPipe.getNameOfService(info.service_id), "Updating Subscription for " + info.url, R.string.subscription_update_failed);
}
};
disposables.add(subscriptionService.updateChannelInfo(info)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(onComplete, onError));
}
private Disposable monitorSubscribeButton(final Button subscribeButton, final Function<Object, Object> action) {
final Consumer<Object> onNext = new Consumer<Object>() {
@Override
public void accept(@NonNull Object o) throws Exception {
if (DEBUG) Log.d(TAG, "Changed subscription status to this channel!");
}
};
final Consumer<Throwable> onError = new Consumer<Throwable>() {
@Override
public void accept(@NonNull Throwable throwable) throws Exception {
onUnrecoverableError(throwable, UserAction.SUBSCRIPTION, NewPipe.getNameOfService(currentInfo.service_id), "Subscription Change", R.string.subscription_change_failed);
}
};
/* Emit clicks from main thread unto io thread */
return RxView.clicks(subscribeButton)
.subscribeOn(AndroidSchedulers.mainThread())
.observeOn(Schedulers.io())
.debounce(BUTTON_DEBOUNCE_INTERVAL, TimeUnit.MILLISECONDS) // Ignore rapid clicks
.map(action)
.subscribe(onNext, onError);
}
private Consumer<List<SubscriptionEntity>> getSubscribeUpdateMonitor(final ChannelInfo info) {
return new Consumer<List<SubscriptionEntity>>() {
@Override
public void accept(List<SubscriptionEntity> subscriptionEntities) throws Exception {
if (DEBUG)
Log.d(TAG, "subscriptionService.subscriptionTable.doOnNext() called with: subscriptionEntities = [" + subscriptionEntities + "]");
if (subscribeButtonMonitor != null) subscribeButtonMonitor.dispose();
if (subscriptionEntities.isEmpty()) {
if (DEBUG) Log.d(TAG, "No subscription to this channel!");
SubscriptionEntity channel = new SubscriptionEntity();
channel.setServiceId(info.service_id);
channel.setUrl(info.url);
channel.setData(info.name, info.avatar_url, info.description, info.subscriber_count);
subscribeButtonMonitor = monitorSubscribeButton(headerSubscribeButton, mapOnSubscribe(channel));
} else {
if (DEBUG) Log.d(TAG, "Found subscription to this channel!");
final SubscriptionEntity subscription = subscriptionEntities.get(0);
subscribeButtonMonitor = monitorSubscribeButton(headerSubscribeButton, mapOnUnsubscribe(subscription));
}
}
};
}
private void updateSubscribeButton(boolean isSubscribed) {
if (DEBUG) Log.d(TAG, "updateSubscribeButton() called with: isSubscribed = [" + isSubscribed + "]");
boolean isButtonVisible = headerSubscribeButton.getVisibility() == View.VISIBLE;
int backgroundDuration = isButtonVisible ? 300 : 0;
int textDuration = isButtonVisible ? 200 : 0;
int subscribeBackground = ContextCompat.getColor(activity, R.color.subscribe_background_color);
int subscribeText = ContextCompat.getColor(activity, R.color.subscribe_text_color);
int subscribedBackground = ContextCompat.getColor(activity, R.color.subscribed_background_color);
int subscribedText = ContextCompat.getColor(activity, R.color.subscribed_text_color);
if (!isSubscribed) {
headerSubscribeButton.setText(R.string.subscribe_button_title);
animateBackgroundColor(headerSubscribeButton, backgroundDuration, subscribedBackground, subscribeBackground);
animateTextColor(headerSubscribeButton, textDuration, subscribedText, subscribeText);
} else {
headerSubscribeButton.setText(R.string.subscribed_button_title);
animateBackgroundColor(headerSubscribeButton, backgroundDuration, subscribeBackground, subscribedBackground);
animateTextColor(headerSubscribeButton, textDuration, subscribeText, subscribedText);
}
animateView(headerSubscribeButton, AnimationUtils.Type.LIGHT_SCALE_AND_ALPHA, true, 100);
}
/*//////////////////////////////////////////////////////////////////////////
// Load and handle
//////////////////////////////////////////////////////////////////////////*/
@Override
protected Single<ListExtractor.NextItemsResult> loadMoreItemsLogic() {
return ExtractorHelper.getMoreChannelItems(serviceId, url, currentNextItemsUrl);
}
@Override
protected Single<ChannelInfo> loadResult(boolean forceLoad) {
return ExtractorHelper.getChannelInfo(serviceId, url, forceLoad);
}
/*//////////////////////////////////////////////////////////////////////////
// Contract
//////////////////////////////////////////////////////////////////////////*/
@Override
public void showLoading() {
super.showLoading();
imageLoader.cancelDisplayTask(headerChannelBanner);
imageLoader.cancelDisplayTask(headerAvatarView);
animateView(headerSubscribeButton, false, 100);
}
@Override
public void handleResult(@NonNull ChannelInfo result) {
super.handleResult(result);
headerRootLayout.setVisibility(View.VISIBLE);
imageLoader.displayImage(result.banner_url, headerChannelBanner, DISPLAY_BANNER_OPTIONS);
imageLoader.displayImage(result.avatar_url, headerAvatarView, DISPLAY_AVATAR_OPTIONS);
if (result.subscriber_count != -1) {
headerSubscribersTextView.setText(Localization.localizeSubscribersCount(activity, result.subscriber_count));
headerSubscribersTextView.setVisibility(View.VISIBLE);
} else headerSubscribersTextView.setVisibility(View.GONE);
if (menuRssButton != null) menuRssButton.setVisible(!TextUtils.isEmpty(result.feed_url));
if (!result.errors.isEmpty()) {
showSnackBarError(result.errors, UserAction.REQUESTED_CHANNEL, NewPipe.getNameOfService(result.service_id), result.url, 0);
}
if (disposables != null) disposables.clear();
if (subscribeButtonMonitor != null) subscribeButtonMonitor.dispose();
updateSubscription(result);
monitorSubscription(result);
}
@Override
public void handleNextItems(ListExtractor.NextItemsResult result) {
super.handleNextItems(result);
if (!result.errors.isEmpty()) {
showSnackBarError(result.errors, UserAction.REQUESTED_CHANNEL, NewPipe.getNameOfService(serviceId),
"Get next page of: " + url, R.string.general_error);
}
}
/*//////////////////////////////////////////////////////////////////////////
// OnError
//////////////////////////////////////////////////////////////////////////*/
@Override
protected boolean onError(Throwable exception) {
if (super.onError(exception)) return true;
int errorId = exception instanceof ExtractionException ? R.string.parsing_error : R.string.general_error;
onUnrecoverableError(exception, UserAction.REQUESTED_CHANNEL, NewPipe.getNameOfService(serviceId), url, errorId);
return true;
}
/*//////////////////////////////////////////////////////////////////////////
// Utils
//////////////////////////////////////////////////////////////////////////*/
@Override
public void setTitle(String title) {
super.setTitle(title);
headerTitleView.setText(title);
}
}

View File

@@ -0,0 +1,445 @@
package org.schabi.newpipe.fragments.list.feed;
import android.os.Bundle;
import android.os.Handler;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.app.ActionBar;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.View;
import android.view.ViewGroup;
import org.reactivestreams.Subscriber;
import org.reactivestreams.Subscription;
import org.schabi.newpipe.R;
import org.schabi.newpipe.database.subscription.SubscriptionEntity;
import org.schabi.newpipe.extractor.InfoItem;
import org.schabi.newpipe.extractor.NewPipe;
import org.schabi.newpipe.extractor.channel.ChannelInfo;
import org.schabi.newpipe.extractor.exceptions.ExtractionException;
import org.schabi.newpipe.fragments.list.BaseListFragment;
import org.schabi.newpipe.fragments.subscription.SubscriptionService;
import org.schabi.newpipe.report.UserAction;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Queue;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import io.reactivex.Flowable;
import io.reactivex.MaybeObserver;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.CompositeDisposable;
import io.reactivex.disposables.Disposable;
import io.reactivex.functions.Action;
import io.reactivex.functions.Consumer;
import io.reactivex.functions.Predicate;
import io.reactivex.schedulers.Schedulers;
public class FeedFragment extends BaseListFragment<List<SubscriptionEntity>, Void> {
private static final int OFF_SCREEN_ITEMS_COUNT = 3;
private static final int MIN_ITEMS_INITIAL_LOAD = 8;
private int FEED_LOAD_COUNT = MIN_ITEMS_INITIAL_LOAD;
private int subscriptionPoolSize;
private SubscriptionService subscriptionService;
private AtomicBoolean allItemsLoaded = new AtomicBoolean(false);
private HashSet<String> itemsLoaded = new HashSet<>();
private final AtomicInteger requestLoadedAtomic = new AtomicInteger();
private CompositeDisposable compositeDisposable = new CompositeDisposable();
private Disposable subscriptionObserver;
private Subscription feedSubscriber;
/*//////////////////////////////////////////////////////////////////////////
// Fragment LifeCycle
//////////////////////////////////////////////////////////////////////////*/
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
subscriptionService = SubscriptionService.getInstance();
FEED_LOAD_COUNT = howManyItemsToLoad();
}
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_feed, container, false);
}
@Override
public void onPause() {
super.onPause();
disposeEverything();
}
@Override
public void onResume() {
super.onResume();
if (wasLoading.get()) doInitialLoadLogic();
}
@Override
public void onDestroy() {
super.onDestroy();
disposeEverything();
subscriptionService = null;
compositeDisposable = null;
subscriptionObserver = null;
feedSubscriber = null;
}
@Override
public void onDestroyView() {
// Do not monitor for updates when user is not viewing the feed fragment.
// This is a waste of bandwidth.
disposeEverything();
super.onDestroyView();
}
/*@Override
protected RecyclerView.LayoutManager getListLayoutManager() {
boolean isPortrait = getResources().getDisplayMetrics().heightPixels > getResources().getDisplayMetrics().widthPixels;
return new GridLayoutManager(activity, isPortrait ? 1 : 2);
}*/
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
super.onCreateOptionsMenu(menu, inflater);
ActionBar supportActionBar = activity.getSupportActionBar();
if (supportActionBar != null) {
supportActionBar.setTitle(R.string.fragment_whats_new);
}
}
@Override
public void reloadContent() {
resetFragment();
super.reloadContent();
}
/*//////////////////////////////////////////////////////////////////////////
// StateSaving
//////////////////////////////////////////////////////////////////////////*/
@Override
public void writeTo(Queue<Object> objectsToSave) {
super.writeTo(objectsToSave);
objectsToSave.add(allItemsLoaded);
objectsToSave.add(itemsLoaded);
}
@Override
@SuppressWarnings("unchecked")
public void readFrom(@NonNull Queue<Object> savedObjects) throws Exception {
super.readFrom(savedObjects);
allItemsLoaded = (AtomicBoolean) savedObjects.poll();
itemsLoaded = (HashSet<String>) savedObjects.poll();
}
/*//////////////////////////////////////////////////////////////////////////
// Feed Loader
//////////////////////////////////////////////////////////////////////////*/
@Override
public void startLoading(boolean forceLoad) {
if (DEBUG) Log.d(TAG, "startLoading() called with: forceLoad = [" + forceLoad + "]");
if (subscriptionObserver != null) subscriptionObserver.dispose();
if (allItemsLoaded.get()) {
if (infoListAdapter.getItemsList().size() == 0) {
showEmptyState();
} else {
showListFooter(false);
hideLoading();
}
isLoading.set(false);
return;
}
isLoading.set(true);
showLoading();
showListFooter(true);
subscriptionObserver = subscriptionService.getSubscription()
.onErrorReturnItem(Collections.<SubscriptionEntity>emptyList())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<List<SubscriptionEntity>>() {
@Override
public void accept(List<SubscriptionEntity> subscriptionEntities) throws Exception {
handleResult(subscriptionEntities);
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
onError(throwable);
}
});
}
@Override
public void handleResult(@android.support.annotation.NonNull List<SubscriptionEntity> result) {
super.handleResult(result);
if (result.isEmpty()) {
infoListAdapter.clearStreamItemList();
showEmptyState();
return;
}
subscriptionPoolSize = result.size();
Flowable.fromIterable(result)
.observeOn(AndroidSchedulers.mainThread())
.subscribe(getSubscriptionObserver());
}
/**
* Responsible for reacting to user pulling request and starting a request for new feed stream.
* <p>
* On initialization, it automatically requests the amount of feed needed to display
* a minimum amount required (FEED_LOAD_SIZE).
* <p>
* Upon receiving a user pull, it creates a Single Observer to fetch the ChannelInfo
* containing the feed streams.
**/
private Subscriber<SubscriptionEntity> getSubscriptionObserver() {
return new Subscriber<SubscriptionEntity>() {
@Override
public void onSubscribe(Subscription s) {
if (feedSubscriber != null) feedSubscriber.cancel();
feedSubscriber = s;
int requestSize = FEED_LOAD_COUNT - infoListAdapter.getItemsList().size();
if (wasLoading.getAndSet(false)) requestSize = FEED_LOAD_COUNT;
boolean hasToLoad = requestSize > 0;
if (hasToLoad) {
requestLoadedAtomic.set(infoListAdapter.getItemsList().size());
requestFeed(requestSize);
}
isLoading.set(hasToLoad);
}
@Override
public void onNext(SubscriptionEntity subscriptionEntity) {
if (!itemsLoaded.contains(subscriptionEntity.getServiceId() + subscriptionEntity.getUrl())) {
subscriptionService.getChannelInfo(subscriptionEntity)
.observeOn(AndroidSchedulers.mainThread())
.onErrorComplete(new Predicate<Throwable>() {
@Override
public boolean test(@io.reactivex.annotations.NonNull Throwable throwable) throws Exception {
return FeedFragment.super.onError(throwable);
}
})
.subscribe(getChannelInfoObserver(subscriptionEntity.getServiceId(), subscriptionEntity.getUrl()));
} else {
requestFeed(1);
}
}
@Override
public void onError(Throwable exception) {
FeedFragment.this.onError(exception);
}
@Override
public void onComplete() {
if (DEBUG) Log.d(TAG, "getSubscriptionObserver > onComplete() called");
}
};
}
/**
* On each request, a subscription item from the updated table is transformed
* into a ChannelInfo, containing the latest streams from the channel.
* <p>
* Currently, the feed uses the first into from the list of streams.
* <p>
* If chosen feed already displayed, then we request another feed from another
* subscription, until the subscription table runs out of new items.
* <p>
* This Observer is self-contained and will dispose itself when complete. However, this
* does not obey the fragment lifecycle and may continue running in the background
* until it is complete. This is done due to RxJava2 no longer propagate errors once
* an observer is unsubscribed while the thread process is still running.
* <p>
* To solve the above issue, we can either set a global RxJava Error Handler, or
* manage exceptions case by case. This should be done if the current implementation is
* too costly when dealing with larger subscription sets.
*
* @param url + serviceId to put in {@link #allItemsLoaded} to signal that this specific entity has been loaded.
*/
private MaybeObserver<ChannelInfo> getChannelInfoObserver(final int serviceId, final String url) {
return new MaybeObserver<ChannelInfo>() {
private Disposable observer;
@Override
public void onSubscribe(Disposable d) {
observer = d;
compositeDisposable.add(d);
isLoading.set(true);
}
// Called only when response is non-empty
@Override
public void onSuccess(final ChannelInfo channelInfo) {
if (infoListAdapter == null || channelInfo.related_streams.isEmpty()) {
onDone();
return;
}
final InfoItem item = channelInfo.related_streams.get(0);
// Keep requesting new items if the current one already exists
boolean itemExists = doesItemExist(infoListAdapter.getItemsList(), item);
if (!itemExists) {
infoListAdapter.addInfoItem(item);
//updateSubscription(channelInfo);
} else {
requestFeed(1);
}
onDone();
}
@Override
public void onError(Throwable exception) {
showSnackBarError(exception, UserAction.SUBSCRIPTION, NewPipe.getNameOfService(serviceId), url, 0);
requestFeed(1);
onDone();
}
// Called only when response is empty
@Override
public void onComplete() {
onDone();
}
private void onDone() {
if (observer.isDisposed()) {
return;
}
itemsLoaded.add(serviceId + url);
compositeDisposable.remove(observer);
int loaded = requestLoadedAtomic.incrementAndGet();
if (loaded >= Math.min(FEED_LOAD_COUNT, subscriptionPoolSize)) {
requestLoadedAtomic.set(0);
isLoading.set(false);
}
if (itemsLoaded.size() == subscriptionPoolSize) {
if (DEBUG) Log.d(TAG, "getChannelInfoObserver > All Items Loaded");
allItemsLoaded.set(true);
showListFooter(false);
isLoading.set(false);
hideLoading();
if (infoListAdapter.getItemsList().size() == 0) {
showEmptyState();
}
}
}
};
}
@Override
protected void loadMoreItems() {
isLoading.set(true);
delayHandler.removeCallbacksAndMessages(null);
// Add a little of a delay when requesting more items because the cache is so fast,
// that the view seems stuck to the user when he scroll to the bottom
delayHandler.postDelayed(new Runnable() {
@Override
public void run() {
requestFeed(FEED_LOAD_COUNT);
}
}, 300);
}
@Override
protected boolean hasMoreItems() {
return !allItemsLoaded.get();
}
private final Handler delayHandler = new Handler();
private void requestFeed(final int count) {
if (DEBUG) Log.d(TAG, "requestFeed() called with: count = [" + count + "], feedSubscriber = [" + feedSubscriber + "]");
if (feedSubscriber == null) return;
isLoading.set(true);
delayHandler.removeCallbacksAndMessages(null);
feedSubscriber.request(count);
}
/*//////////////////////////////////////////////////////////////////////////
// Utils
//////////////////////////////////////////////////////////////////////////*/
private void resetFragment() {
if (DEBUG) Log.d(TAG, "resetFragment() called");
if (subscriptionObserver != null) subscriptionObserver.dispose();
if (compositeDisposable != null) compositeDisposable.clear();
if (infoListAdapter != null) infoListAdapter.clearStreamItemList();
delayHandler.removeCallbacksAndMessages(null);
requestLoadedAtomic.set(0);
allItemsLoaded.set(false);
showListFooter(false);
itemsLoaded.clear();
}
private void disposeEverything() {
if (subscriptionObserver != null) subscriptionObserver.dispose();
if (compositeDisposable != null) compositeDisposable.clear();
if (feedSubscriber != null) feedSubscriber.cancel();
delayHandler.removeCallbacksAndMessages(null);
}
private boolean doesItemExist(final List<InfoItem> items, final InfoItem item) {
for (final InfoItem existingItem : items) {
if (existingItem.info_type == item.info_type &&
existingItem.service_id == item.service_id &&
existingItem.name.equals(item.name) &&
existingItem.url.equals(item.url)) return true;
}
return false;
}
private int howManyItemsToLoad() {
int heightPixels = getResources().getDisplayMetrics().heightPixels;
int itemHeightPixels = activity.getResources().getDimensionPixelSize(R.dimen.video_item_search_height);
int items = itemHeightPixels > 0 ? heightPixels / itemHeightPixels + OFF_SCREEN_ITEMS_COUNT : MIN_ITEMS_INITIAL_LOAD;
return Math.max(MIN_ITEMS_INITIAL_LOAD, items);
}
/*//////////////////////////////////////////////////////////////////////////
// Fragment Error Handling
//////////////////////////////////////////////////////////////////////////*/
@Override
public void showError(String message, boolean showRetryButton) {
resetFragment();
super.showError(message, showRetryButton);
}
@Override
protected boolean onError(Throwable exception) {
if (super.onError(exception)) return true;
int errorId = exception instanceof ExtractionException ? R.string.parsing_error : R.string.general_error;
onUnrecoverableError(exception, UserAction.SOMETHING_ELSE, "none", "Requesting feed", errorId);
return true;
}
}

View File

@@ -0,0 +1,174 @@
package org.schabi.newpipe.fragments.list.playlist;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.text.TextUtils;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import org.schabi.newpipe.R;
import org.schabi.newpipe.extractor.ListExtractor;
import org.schabi.newpipe.extractor.NewPipe;
import org.schabi.newpipe.extractor.exceptions.ExtractionException;
import org.schabi.newpipe.extractor.playlist.PlaylistInfo;
import org.schabi.newpipe.fragments.list.BaseListInfoFragment;
import org.schabi.newpipe.report.UserAction;
import org.schabi.newpipe.util.ExtractorHelper;
import org.schabi.newpipe.util.NavigationHelper;
import io.reactivex.Single;
import static org.schabi.newpipe.util.AnimationUtils.animateView;
public class PlaylistFragment extends BaseListInfoFragment<PlaylistInfo> {
/*//////////////////////////////////////////////////////////////////////////
// Views
//////////////////////////////////////////////////////////////////////////*/
private View headerRootLayout;
private TextView headerTitleView;
private View headerUploaderLayout;
private TextView headerUploaderName;
private ImageView headerUploaderAvatar;
private TextView headerStreamCount;
public static PlaylistFragment getInstance(int serviceId, String url, String name) {
PlaylistFragment instance = new PlaylistFragment();
instance.setInitialData(serviceId, url, name);
return instance;
}
/*//////////////////////////////////////////////////////////////////////////
// LifeCycle
//////////////////////////////////////////////////////////////////////////*/
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_playlist, container, false);
}
/*//////////////////////////////////////////////////////////////////////////
// Init
//////////////////////////////////////////////////////////////////////////*/
protected View getListHeader() {
headerRootLayout = activity.getLayoutInflater().inflate(R.layout.playlist_header, itemsList, false);
headerTitleView = headerRootLayout.findViewById(R.id.playlist_title_view);
headerUploaderLayout = headerRootLayout.findViewById(R.id.uploader_layout);
headerUploaderName = headerRootLayout.findViewById(R.id.uploader_name);
headerUploaderAvatar = headerRootLayout.findViewById(R.id.uploader_avatar_view);
headerStreamCount = headerRootLayout.findViewById(R.id.playlist_stream_count);
return headerRootLayout;
}
@Override
protected void initViews(View rootView, Bundle savedInstanceState) {
super.initViews(rootView, savedInstanceState);
infoListAdapter.useMiniItemVariants(true);
}
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
if (DEBUG) Log.d(TAG, "onCreateOptionsMenu() called with: menu = [" + menu + "], inflater = [" + inflater + "]");
super.onCreateOptionsMenu(menu, inflater);
inflater.inflate(R.menu.menu_playlist, menu);
}
/*//////////////////////////////////////////////////////////////////////////
// Load and handle
//////////////////////////////////////////////////////////////////////////*/
@Override
protected Single<ListExtractor.NextItemsResult> loadMoreItemsLogic() {
return ExtractorHelper.getMorePlaylistItems(serviceId, url, currentNextItemsUrl);
}
@Override
protected Single<PlaylistInfo> loadResult(boolean forceLoad) {
return ExtractorHelper.getPlaylistInfo(serviceId, url, forceLoad);
}
/*//////////////////////////////////////////////////////////////////////////
// Contract
//////////////////////////////////////////////////////////////////////////*/
@Override
public void showLoading() {
super.showLoading();
animateView(headerRootLayout, false, 200);
animateView(itemsList, false, 100);
imageLoader.cancelDisplayTask(headerUploaderAvatar);
animateView(headerUploaderLayout, false, 200);
}
@Override
public void handleResult(@NonNull final PlaylistInfo result) {
super.handleResult(result);
animateView(headerRootLayout, true, 100);
animateView(headerUploaderLayout, true, 300);
headerUploaderLayout.setOnClickListener(null);
if (!TextUtils.isEmpty(result.uploader_name)) {
headerUploaderName.setText(result.uploader_name);
if (!TextUtils.isEmpty(result.uploader_url)) {
headerUploaderLayout.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
NavigationHelper.openChannelFragment(getFragmentManager(), result.service_id, result.uploader_url, result.uploader_name);
}
});
}
}
imageLoader.displayImage(result.uploader_avatar_url, headerUploaderAvatar, DISPLAY_AVATAR_OPTIONS);
headerStreamCount.setText(result.stream_count + " videos");
if (!result.errors.isEmpty()) {
showSnackBarError(result.errors, UserAction.REQUESTED_PLAYLIST, NewPipe.getNameOfService(result.service_id), result.url, 0);
}
}
@Override
public void handleNextItems(ListExtractor.NextItemsResult result) {
super.handleNextItems(result);
if (!result.errors.isEmpty()) {
showSnackBarError(result.errors, UserAction.REQUESTED_PLAYLIST, NewPipe.getNameOfService(serviceId)
, "Get next page of: " + url, 0);
}
}
/*//////////////////////////////////////////////////////////////////////////
// OnError
//////////////////////////////////////////////////////////////////////////*/
@Override
protected boolean onError(Throwable exception) {
if (super.onError(exception)) return true;
int errorId = exception instanceof ExtractionException ? R.string.parsing_error : R.string.general_error;
onUnrecoverableError(exception, UserAction.REQUESTED_PLAYLIST, NewPipe.getNameOfService(serviceId), url, errorId);
return true;
}
/*//////////////////////////////////////////////////////////////////////////
// Utils
//////////////////////////////////////////////////////////////////////////*/
@Override
public void setTitle(String title) {
super.setTitle(title);
headerTitleView.setText(title);
}
}

View File

@@ -0,0 +1,695 @@
package org.schabi.newpipe.fragments.list.search;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Build;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.app.ActionBar;
import android.support.v7.widget.TooltipCompat;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.util.Log;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.DecelerateInterpolator;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputMethodManager;
import android.widget.AdapterView;
import android.widget.AutoCompleteTextView;
import android.widget.TextView;
import org.schabi.newpipe.R;
import org.schabi.newpipe.ReCaptchaActivity;
import org.schabi.newpipe.extractor.InfoItem;
import org.schabi.newpipe.extractor.ListExtractor;
import org.schabi.newpipe.extractor.NewPipe;
import org.schabi.newpipe.extractor.exceptions.ParsingException;
import org.schabi.newpipe.extractor.search.SearchEngine;
import org.schabi.newpipe.extractor.search.SearchResult;
import org.schabi.newpipe.fragments.list.BaseListFragment;
import org.schabi.newpipe.history.HistoryListener;
import org.schabi.newpipe.report.UserAction;
import org.schabi.newpipe.util.ExtractorHelper;
import org.schabi.newpipe.util.NavigationHelper;
import org.schabi.newpipe.util.StateSaver;
import java.util.ArrayList;
import java.util.List;
import java.util.Queue;
import java.util.concurrent.TimeUnit;
import icepick.State;
import io.reactivex.Notification;
import io.reactivex.Observable;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.Disposable;
import io.reactivex.functions.Consumer;
import io.reactivex.functions.Function;
import io.reactivex.functions.Predicate;
import io.reactivex.schedulers.Schedulers;
import io.reactivex.subjects.PublishSubject;
import static org.schabi.newpipe.util.AnimationUtils.animateView;
public class SearchFragment extends BaseListFragment<SearchResult, ListExtractor.NextItemsResult> {
/*//////////////////////////////////////////////////////////////////////////
// Search
//////////////////////////////////////////////////////////////////////////*/
/**
* The suggestions will appear only if the query meet this threshold (>=).
*/
private static final int THRESHOLD_SUGGESTION = 3;
/**
* How much time have to pass without emitting a item (i.e. the user stop typing) to fetch/show the suggestions, in milliseconds.
*/
private static final int SUGGESTIONS_DEBOUNCE = 150; //ms
@State
protected int filterItemCheckedId = -1;
private SearchEngine.Filter filter = SearchEngine.Filter.ANY;
@State
protected int serviceId = -1;
@State
protected String searchQuery = "";
@State
protected boolean wasSearchFocused = false;
private int currentPage = 0;
private int currentNextPage = 0;
private String searchLanguage;
private boolean showSuggestions = true;
private PublishSubject<String> suggestionPublisher = PublishSubject.create();
private Disposable searchDisposable;
private Disposable suggestionWorkerDisposable;
private SuggestionListAdapter suggestionListAdapter;
/*//////////////////////////////////////////////////////////////////////////
// Views
//////////////////////////////////////////////////////////////////////////*/
private View searchToolbarContainer;
private AutoCompleteTextView searchEditText;
private View searchClear;
/*////////////////////////////////////////////////////////////////////////*/
public static SearchFragment getInstance(int serviceId, String query) {
SearchFragment searchFragment = new SearchFragment();
searchFragment.setQuery(serviceId, query);
searchFragment.searchOnResume();
return searchFragment;
}
/**
* Set wasLoading to true so when the fragment onResume is called, the initial search is done.
* (it will only start searching if the query is not null or empty)
*/
private void searchOnResume() {
if (!TextUtils.isEmpty(searchQuery)) {
wasLoading.set(true);
}
}
/*//////////////////////////////////////////////////////////////////////////
// Fragment's LifeCycle
//////////////////////////////////////////////////////////////////////////*/
@Override
public void onAttach(Context context) {
super.onAttach(context);
suggestionListAdapter = new SuggestionListAdapter(activity);
}
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_search, container, false);
}
@Override
public void onPause() {
super.onPause();
wasSearchFocused = searchEditText.hasFocus();
if (searchDisposable != null) searchDisposable.dispose();
if (suggestionWorkerDisposable != null) suggestionWorkerDisposable.dispose();
hideSoftKeyboard(searchEditText);
}
@Override
public void onResume() {
if (DEBUG) Log.d(TAG, "onResume() called");
super.onResume();
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(activity);
showSuggestions = preferences.getBoolean(getString(R.string.show_search_suggestions_key), true);
searchLanguage = preferences.getString(getString(R.string.search_language_key), getString(R.string.default_language_value));
if (!TextUtils.isEmpty(searchQuery)) {
if (wasLoading.getAndSet(false)) {
if (currentNextPage > currentPage) loadMoreItems();
else search(searchQuery);
} else if (infoListAdapter.getItemsList().size() == 0) {
if (savedState == null) {
search(searchQuery);
} else if (!isLoading.get() && !wasSearchFocused) {
infoListAdapter.clearStreamItemList();
showEmptyState();
}
}
}
if (suggestionWorkerDisposable == null || suggestionWorkerDisposable.isDisposed()) initSuggestionObserver();
}
@Override
public void onDestroyView() {
if (DEBUG) Log.d(TAG, "onDestroyView() called");
unsetSearchListeners();
super.onDestroyView();
}
@Override
public void onDestroy() {
super.onDestroy();
if (!activity.isChangingConfigurations()) StateSaver.onDestroy(savedState);
if (searchDisposable != null) searchDisposable.dispose();
if (suggestionWorkerDisposable != null) suggestionWorkerDisposable.dispose();
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
switch (requestCode) {
case ReCaptchaActivity.RECAPTCHA_REQUEST:
if (resultCode == Activity.RESULT_OK && searchQuery.length() != 0) {
search(searchQuery);
} else Log.e(TAG, "ReCaptcha failed");
break;
default:
Log.e(TAG, "Request code from activity not supported [" + requestCode + "]");
break;
}
}
/*//////////////////////////////////////////////////////////////////////////
// State Saving
//////////////////////////////////////////////////////////////////////////*/
@Override
public void writeTo(Queue<Object> objectsToSave) {
super.writeTo(objectsToSave);
objectsToSave.add(currentPage);
objectsToSave.add(currentNextPage);
}
@Override
public void readFrom(@NonNull Queue<Object> savedObjects) throws Exception {
super.readFrom(savedObjects);
currentPage = (int) savedObjects.poll();
currentNextPage = (int) savedObjects.poll();
}
@Override
public void onSaveInstanceState(Bundle bundle) {
searchQuery = searchEditText != null && !TextUtils.isEmpty(searchEditText.getText().toString())
? searchEditText.getText().toString() : searchQuery;
super.onSaveInstanceState(bundle);
}
/*//////////////////////////////////////////////////////////////////////////
// Init's
//////////////////////////////////////////////////////////////////////////*/
@Override
public void reloadContent() {
if (!TextUtils.isEmpty(searchQuery) || (searchEditText != null && !TextUtils.isEmpty(searchEditText.getText()))) {
search(!TextUtils.isEmpty(searchQuery) ? searchQuery : searchEditText.getText().toString());
} else {
if (searchEditText != null) {
searchEditText.setText("");
showSoftKeyboard(searchEditText);
}
animateView(errorPanelRoot, false, 200);
}
}
/*//////////////////////////////////////////////////////////////////////////
// Menu
//////////////////////////////////////////////////////////////////////////*/
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
super.onCreateOptionsMenu(menu, inflater);
ActionBar supportActionBar = activity.getSupportActionBar();
if (supportActionBar != null) {
supportActionBar.setDisplayShowTitleEnabled(false);
supportActionBar.setDisplayHomeAsUpEnabled(true);
}
inflater.inflate(R.menu.menu_search, menu);
searchToolbarContainer = activity.findViewById(R.id.toolbar_search_container);
searchEditText = searchToolbarContainer.findViewById(R.id.toolbar_search_edit_text);
searchClear = searchToolbarContainer.findViewById(R.id.toolbar_search_clear);
setupSearchView();
restoreFilterChecked(menu, filterItemCheckedId);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.menu_filter_all:
case R.id.menu_filter_video:
case R.id.menu_filter_channel:
case R.id.menu_filter_playlist:
changeFilter(item, getFilterFromMenuId(item.getItemId()));
return true;
default:
return super.onOptionsItemSelected(item);
}
}
private void restoreFilterChecked(Menu menu, int itemId) {
if (itemId != -1) {
MenuItem item = menu.findItem(itemId);
if (item == null) return;
item.setChecked(true);
filter = getFilterFromMenuId(itemId);
}
}
private SearchEngine.Filter getFilterFromMenuId(int itemId) {
switch (itemId) {
case R.id.menu_filter_all:
return SearchEngine.Filter.ANY;
case R.id.menu_filter_video:
return SearchEngine.Filter.STREAM;
case R.id.menu_filter_channel:
return SearchEngine.Filter.CHANNEL;
case R.id.menu_filter_playlist:
return SearchEngine.Filter.PLAYLIST;
default:
return SearchEngine.Filter.ANY;
}
}
/*//////////////////////////////////////////////////////////////////////////
// Search
//////////////////////////////////////////////////////////////////////////*/
private TextWatcher textWatcher;
private void setupSearchView() {
searchEditText.setText(searchQuery != null ? searchQuery : "");
searchEditText.setAdapter(suggestionListAdapter);
if (TextUtils.isEmpty(searchQuery) || TextUtils.isEmpty(searchEditText.getText())) {
searchToolbarContainer.setTranslationX(100);
searchToolbarContainer.setAlpha(0f);
searchToolbarContainer.setVisibility(View.VISIBLE);
searchToolbarContainer.animate().translationX(0).alpha(1f).setDuration(200).setInterpolator(new DecelerateInterpolator()).start();
} else {
searchToolbarContainer.setTranslationX(0);
searchToolbarContainer.setAlpha(1f);
searchToolbarContainer.setVisibility(View.VISIBLE);
}
initSearchListeners();
if (TextUtils.isEmpty(searchQuery) || wasSearchFocused) showSoftKeyboard(searchEditText);
else hideSoftKeyboard(searchEditText);
wasSearchFocused = false;
}
private void initSearchListeners() {
searchClear.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (DEBUG) Log.d(TAG, "onClick() called with: v = [" + v + "]");
if (TextUtils.isEmpty(searchEditText.getText())) {
NavigationHelper.gotoMainFragment(getFragmentManager());
return;
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
searchEditText.setText("", false);
} else searchEditText.setText("");
suggestionListAdapter.updateAdapter(new ArrayList<String>());
showSoftKeyboard(searchEditText);
}
});
TooltipCompat.setTooltipText(searchClear, getString(R.string.clear));
searchEditText.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (DEBUG) Log.d(TAG, "onClick() called with: v = [" + v + "]");
searchEditText.showDropDown();
}
});
searchEditText.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (DEBUG) Log.d(TAG, "onFocusChange() called with: v = [" + v + "], hasFocus = [" + hasFocus + "]");
if (hasFocus) searchEditText.showDropDown();
}
});
searchEditText.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
if (DEBUG) {
Log.d(TAG, "onItemClick() called with: parent = [" + parent + "], view = [" + view + "], position = [" + position + "], id = [" + id + "]");
}
String s = suggestionListAdapter.getSuggestion(position);
if (DEBUG) Log.d(TAG, "onItemClick text = " + s);
submitQuery(s);
}
});
searchEditText.setThreshold(THRESHOLD_SUGGESTION);
if (textWatcher != null) searchEditText.removeTextChangedListener(textWatcher);
textWatcher = new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
}
@Override
public void afterTextChanged(Editable s) {
String newText = searchEditText.getText().toString();
if (!TextUtils.isEmpty(newText)) suggestionPublisher.onNext(newText);
}
};
searchEditText.addTextChangedListener(textWatcher);
searchEditText.setOnEditorActionListener(new TextView.OnEditorActionListener() {
@Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
if (DEBUG)
Log.d(TAG, "onEditorAction() called with: v = [" + v + "], actionId = [" + actionId + "], event = [" + event + "]");
if (event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER || event.getAction() == EditorInfo.IME_ACTION_SEARCH)) {
submitQuery(searchEditText.getText().toString());
return true;
}
return false;
}
});
if (suggestionWorkerDisposable == null || suggestionWorkerDisposable.isDisposed()) initSuggestionObserver();
}
private void unsetSearchListeners() {
searchClear.setOnClickListener(null);
searchClear.setOnLongClickListener(null);
searchEditText.setOnClickListener(null);
searchEditText.setOnItemClickListener(null);
searchEditText.setOnFocusChangeListener(null);
searchEditText.setOnEditorActionListener(null);
if (textWatcher != null) searchEditText.removeTextChangedListener(textWatcher);
textWatcher = null;
}
private void showSoftKeyboard(View view) {
if (DEBUG) Log.d(TAG, "showSoftKeyboard() called with: view = [" + view + "]");
if (view == null) return;
if (view.requestFocus()) {
InputMethodManager imm = (InputMethodManager) activity.getSystemService(Context.INPUT_METHOD_SERVICE);
imm.showSoftInput(view, InputMethodManager.SHOW_IMPLICIT);
}
}
private void hideSoftKeyboard(View view) {
if (DEBUG) Log.d(TAG, "hideSoftKeyboard() called with: view = [" + view + "]");
if (view == null) return;
InputMethodManager imm = (InputMethodManager) activity.getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(view.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
view.clearFocus();
}
public void giveSearchEditTextFocus() {
showSoftKeyboard(searchEditText);
}
private void initSuggestionObserver() {
if (suggestionWorkerDisposable != null) suggestionWorkerDisposable.dispose();
final Predicate<String> checkEnabledAndLength = new Predicate<String>() {
@Override
public boolean test(@io.reactivex.annotations.NonNull String s) throws Exception {
boolean lengthCheck = s.length() >= THRESHOLD_SUGGESTION;
// Clear the suggestions adapter if the length check fails
if (!lengthCheck && !suggestionListAdapter.isEmpty()) {
suggestionListAdapter.updateAdapter(new ArrayList<String>());
}
// Only pass through if suggestions is enabled and the query length is equal or greater than THRESHOLD_SUGGESTION
return showSuggestions && lengthCheck;
}
};
suggestionWorkerDisposable = suggestionPublisher
.debounce(SUGGESTIONS_DEBOUNCE, TimeUnit.MILLISECONDS)
.startWith(!TextUtils.isEmpty(searchQuery) ? searchQuery : "")
.filter(checkEnabledAndLength)
.switchMap(new Function<String, Observable<Notification<List<String>>>>() {
@Override
public Observable<Notification<List<String>>> apply(@io.reactivex.annotations.NonNull String query) throws Exception {
return ExtractorHelper.suggestionsFor(serviceId, query, searchLanguage).toObservable().materialize();
}
})
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<Notification<List<String>>>() {
@Override
public void accept(@io.reactivex.annotations.NonNull Notification<List<String>> listNotification) throws Exception {
if (listNotification.isOnNext()) {
handleSuggestions(listNotification.getValue());
if (errorPanelRoot.getVisibility() == View.VISIBLE) {
hideLoading();
}
} else if (listNotification.isOnError()) {
Throwable error = listNotification.getError();
if (!ExtractorHelper.isInterruptedCaused(error)) {
onSuggestionError(error);
}
}
}
});
}
@Override
protected void doInitialLoadLogic() {
// no-op
}
private void search(final String query) {
if (DEBUG) Log.d(TAG, "search() called with: query = [" + query + "]");
hideSoftKeyboard(searchEditText);
this.searchQuery = query;
this.currentPage = 0;
infoListAdapter.clearStreamItemList();
if (activity instanceof HistoryListener) {
((HistoryListener) activity).onSearch(serviceId, query);
}
final SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getContext());
final String searchLanguageKey = getContext().getString(R.string.search_language_key);
searchLanguage = sharedPreferences.getString(searchLanguageKey, getContext().getString(R.string.default_language_value));
startLoading(false);
}
@Override
public void startLoading(boolean forceLoad) {
super.startLoading(forceLoad);
if (searchDisposable != null) searchDisposable.dispose();
searchDisposable = ExtractorHelper.searchFor(serviceId, searchQuery, currentPage, searchLanguage, filter)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<SearchResult>() {
@Override
public void accept(@NonNull SearchResult result) throws Exception {
isLoading.set(false);
handleResult(result);
}
}, new Consumer<Throwable>() {
@Override
public void accept(@NonNull Throwable throwable) throws Exception {
isLoading.set(false);
onError(throwable);
}
});
}
@Override
protected void loadMoreItems() {
isLoading.set(true);
showListFooter(true);
if (searchDisposable != null) searchDisposable.dispose();
currentNextPage = currentPage + 1;
searchDisposable = ExtractorHelper.getMoreSearchItems(serviceId, searchQuery, currentNextPage, searchLanguage, filter)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ListExtractor.NextItemsResult>() {
@Override
public void accept(@NonNull ListExtractor.NextItemsResult result) throws Exception {
isLoading.set(false);
handleNextItems(result);
}
}, new Consumer<Throwable>() {
@Override
public void accept(@NonNull Throwable throwable) throws Exception {
isLoading.set(false);
onError(throwable);
}
});
}
@Override
protected boolean hasMoreItems() {
// TODO: No way to tell if search has more items in the moment
return true;
}
@Override
protected void onItemSelected(InfoItem selectedItem) {
super.onItemSelected(selectedItem);
hideSoftKeyboard(searchEditText);
}
/*//////////////////////////////////////////////////////////////////////////
// Utils
//////////////////////////////////////////////////////////////////////////*/
private void changeFilter(MenuItem item, SearchEngine.Filter filter) {
this.filter = filter;
this.filterItemCheckedId = item.getItemId();
item.setChecked(true);
if (searchQuery != null && !searchQuery.isEmpty()) search(searchQuery);
}
private void submitQuery(String query) {
if (DEBUG) Log.d(TAG, "submitQuery() called with: query = [" + query + "]");
if (query.isEmpty()) return;
search(query);
}
private void setQuery(int serviceId, String searchQuery) {
this.serviceId = serviceId;
this.searchQuery = searchQuery;
}
@Override
public void showError(String message, boolean showRetryButton) {
super.showError(message, showRetryButton);
hideSoftKeyboard(searchEditText);
}
/*//////////////////////////////////////////////////////////////////////////
// Suggestion Results
//////////////////////////////////////////////////////////////////////////*/
public void handleSuggestions(@NonNull List<String> suggestions) {
if (DEBUG) Log.d(TAG, "handleSuggestions() called with: suggestions = [" + suggestions + "]");
suggestionListAdapter.updateAdapter(suggestions);
}
public void onSuggestionError(Throwable exception) {
if (DEBUG) Log.d(TAG, "onSuggestionError() called with: exception = [" + exception + "]");
if (super.onError(exception)) return;
int errorId = exception instanceof ParsingException ? R.string.parsing_error : R.string.general_error;
onUnrecoverableError(exception, UserAction.GET_SUGGESTIONS, NewPipe.getNameOfService(serviceId), searchQuery, errorId);
}
/*//////////////////////////////////////////////////////////////////////////
// Contract
//////////////////////////////////////////////////////////////////////////*/
@Override
public void hideLoading() {
super.hideLoading();
showListFooter(false);
}
/*//////////////////////////////////////////////////////////////////////////
// Search Results
//////////////////////////////////////////////////////////////////////////*/
@Override
public void handleResult(@NonNull SearchResult result) {
if (!result.errors.isEmpty()) {
showSnackBarError(result.errors, UserAction.SEARCHED, NewPipe.getNameOfService(serviceId), searchQuery, 0);
}
if (infoListAdapter.getItemsList().size() == 0) {
if (result.resultList.size() > 0) {
infoListAdapter.addInfoItemList(result.resultList);
} else {
infoListAdapter.clearStreamItemList();
showEmptyState();
return;
}
}
super.handleResult(result);
}
@Override
public void handleNextItems(ListExtractor.NextItemsResult result) {
showListFooter(false);
currentPage = Integer.parseInt(result.nextItemsUrl);
infoListAdapter.addInfoItemList(result.nextItemsList);
if (!result.errors.isEmpty()) {
showSnackBarError(result.errors, UserAction.SEARCHED, NewPipe.getNameOfService(serviceId)
, "\"" + searchQuery + "\" → page " + currentPage, 0);
}
super.handleNextItems(result);
}
@Override
protected boolean onError(Throwable exception) {
if (super.onError(exception)) return true;
if (exception instanceof SearchEngine.NothingFoundException) {
infoListAdapter.clearStreamItemList();
showEmptyState();
} else {
int errorId = exception instanceof ParsingException ? R.string.parsing_error : R.string.general_error;
onUnrecoverableError(exception, UserAction.SEARCHED, NewPipe.getNameOfService(serviceId), searchQuery, errorId);
}
return true;
}
}

View File

@@ -0,0 +1,89 @@
package org.schabi.newpipe.fragments.list.search;
import android.content.Context;
import android.database.Cursor;
import android.database.MatrixCursor;
import android.support.v4.widget.ResourceCursorAdapter;
import android.view.View;
import android.widget.TextView;
import java.util.List;
/*
* Created by Christian Schabesberger on 02.08.16.
*
* Copyright (C) Christian Schabesberger 2016 <chris.schabesberger@mailbox.org>
* SuggestionListAdapter.java is part of NewPipe.
*
* NewPipe is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NewPipe is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NewPipe. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* {@link ResourceCursorAdapter} to display suggestions.
*/
public class SuggestionListAdapter extends ResourceCursorAdapter {
private static final String[] columns = new String[]{"_id", "title"};
private static final int INDEX_ID = 0;
private static final int INDEX_TITLE = 1;
public SuggestionListAdapter(Context context) {
super(context, android.R.layout.simple_list_item_1, null, 0);
}
@Override
public void bindView(View view, Context context, Cursor cursor) {
ViewHolder viewHolder = new ViewHolder(view);
viewHolder.suggestionTitle.setText(cursor.getString(INDEX_TITLE));
}
/**
* Update the suggestion list
* @param suggestions the list of suggestions
*/
public void updateAdapter(List<String> suggestions) {
MatrixCursor cursor = new MatrixCursor(columns, suggestions.size());
int i = 0;
for (String suggestion : suggestions) {
String[] columnValues = new String[columns.length];
columnValues[INDEX_TITLE] = suggestion;
columnValues[INDEX_ID] = Integer.toString(i);
cursor.addRow(columnValues);
i++;
}
changeCursor(cursor);
}
/**
* Get the suggestion for a position
* @param position the position of the suggestion
* @return the suggestion
*/
public String getSuggestion(int position) {
return ((Cursor) getItem(position)).getString(INDEX_TITLE);
}
@Override
public CharSequence convertToString(Cursor cursor) {
return cursor.getString(INDEX_TITLE);
}
private class ViewHolder {
private final TextView suggestionTitle;
private ViewHolder(View view) {
this.suggestionTitle = view.findViewById(android.R.id.text1);
}
}
}

View File

@@ -0,0 +1,240 @@
package org.schabi.newpipe.fragments.subscription;
import android.content.Context;
import android.os.Bundle;
import android.os.Parcelable;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import org.schabi.newpipe.R;
import org.schabi.newpipe.database.subscription.SubscriptionEntity;
import org.schabi.newpipe.extractor.InfoItem;
import org.schabi.newpipe.extractor.channel.ChannelInfoItem;
import org.schabi.newpipe.fragments.BaseStateFragment;
import org.schabi.newpipe.info_list.InfoItemBuilder;
import org.schabi.newpipe.info_list.InfoListAdapter;
import org.schabi.newpipe.report.UserAction;
import org.schabi.newpipe.util.NavigationHelper;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import icepick.State;
import io.reactivex.Observer;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.CompositeDisposable;
import io.reactivex.disposables.Disposable;
import io.reactivex.schedulers.Schedulers;
import static org.schabi.newpipe.util.AnimationUtils.animateView;
public class SubscriptionFragment extends BaseStateFragment<List<SubscriptionEntity>> {
private View headerRootLayout;
private InfoListAdapter infoListAdapter;
private RecyclerView itemsList;
@State
protected Parcelable itemsListState;
/* Used for independent events */
private CompositeDisposable disposables = new CompositeDisposable();
private SubscriptionService subscriptionService;
///////////////////////////////////////////////////////////////////////////
// Fragment LifeCycle
///////////////////////////////////////////////////////////////////////////
@Override
public void onAttach(Context context) {
super.onAttach(context);
infoListAdapter = new InfoListAdapter(activity);
subscriptionService = SubscriptionService.getInstance();
}
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_subscription, container, false);
}
@Override
public void onPause() {
super.onPause();
itemsListState = itemsList.getLayoutManager().onSaveInstanceState();
}
@Override
public void onDestroyView() {
if (disposables != null) disposables.clear();
super.onDestroyView();
}
@Override
public void onDestroy() {
if (disposables != null) disposables.dispose();
disposables = null;
subscriptionService = null;
super.onDestroy();
}
///////////////////////////////////////////////////////////////////////////
// Fragment Views
///////////////////////////////////////////////////////////////////////////
@Override
protected void initViews(View rootView, Bundle savedInstanceState) {
super.initViews(rootView, savedInstanceState);
infoListAdapter = new InfoListAdapter(getActivity());
itemsList = rootView.findViewById(R.id.items_list);
itemsList.setLayoutManager(new LinearLayoutManager(activity));
infoListAdapter.setHeader(headerRootLayout = activity.getLayoutInflater().inflate(R.layout.subscription_header, itemsList, false));
infoListAdapter.useMiniItemVariants(true);
itemsList.setAdapter(infoListAdapter);
}
@Override
protected void initListeners() {
super.initListeners();
infoListAdapter.setOnChannelSelectedListener(new InfoItemBuilder.OnInfoItemSelectedListener<ChannelInfoItem>() {
@Override
public void selected(ChannelInfoItem selectedItem) {
// Requires the parent fragment to find holder for fragment replacement
NavigationHelper.openChannelFragment(getParentFragment().getFragmentManager(), selectedItem.service_id, selectedItem.url, selectedItem.name);
}
});
headerRootLayout.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
NavigationHelper.openWhatsNewFragment(getParentFragment().getFragmentManager());
}
});
}
private void resetFragment() {
if (disposables != null) disposables.clear();
if (infoListAdapter != null) infoListAdapter.clearStreamItemList();
}
///////////////////////////////////////////////////////////////////////////
// Subscriptions Loader
///////////////////////////////////////////////////////////////////////////
@Override
public void startLoading(boolean forceLoad) {
super.startLoading(forceLoad);
resetFragment();
subscriptionService.getSubscription().toObservable()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(getSubscriptionObserver());
}
private Observer<List<SubscriptionEntity>> getSubscriptionObserver() {
return new Observer<List<SubscriptionEntity>>() {
@Override
public void onSubscribe(Disposable d) {
showLoading();
disposables.add(d);
}
@Override
public void onNext(List<SubscriptionEntity> subscriptions) {
handleResult(subscriptions);
}
@Override
public void onError(Throwable exception) {
SubscriptionFragment.this.onError(exception);
}
@Override
public void onComplete() {
}
};
}
@Override
public void handleResult(@NonNull List<SubscriptionEntity> result) {
super.handleResult(result);
infoListAdapter.clearStreamItemList();
if (result.isEmpty()) {
showEmptyState();
} else {
infoListAdapter.addInfoItemList(getSubscriptionItems(result));
if (itemsListState != null) {
itemsList.getLayoutManager().onRestoreInstanceState(itemsListState);
itemsListState = null;
}
hideLoading();
}
}
private List<InfoItem> getSubscriptionItems(List<SubscriptionEntity> subscriptions) {
List<InfoItem> items = new ArrayList<>();
for (final SubscriptionEntity subscription : subscriptions) items.add(subscription.toChannelInfoItem());
Collections.sort(items, new Comparator<InfoItem>() {
@Override
public int compare(InfoItem o1, InfoItem o2) {
return o1.name.compareToIgnoreCase(o2.name);
}
});
return items;
}
/*//////////////////////////////////////////////////////////////////////////
// Contract
//////////////////////////////////////////////////////////////////////////*/
@Override
public void showLoading() {
super.showLoading();
animateView(itemsList, false, 100);
}
@Override
public void hideLoading() {
super.hideLoading();
animateView(itemsList, true, 200);
}
@Override
public void showEmptyState() {
super.showEmptyState();
animateView(itemsList, false, 200);
}
///////////////////////////////////////////////////////////////////////////
// Fragment Error Handling
///////////////////////////////////////////////////////////////////////////
@Override
protected boolean onError(Throwable exception) {
resetFragment();
if (super.onError(exception)) return true;
onUnrecoverableError(exception, UserAction.SOMETHING_ELSE, "none", "Subscriptions", R.string.general_error);
return true;
}
}

View File

@@ -0,0 +1,147 @@
package org.schabi.newpipe.fragments.subscription;
import android.util.Log;
import org.schabi.newpipe.MainActivity;
import org.schabi.newpipe.NewPipeDatabase;
import org.schabi.newpipe.database.AppDatabase;
import org.schabi.newpipe.database.subscription.SubscriptionDAO;
import org.schabi.newpipe.database.subscription.SubscriptionEntity;
import org.schabi.newpipe.extractor.channel.ChannelInfo;
import org.schabi.newpipe.util.ExtractorHelper;
import java.util.List;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import io.reactivex.Completable;
import io.reactivex.CompletableSource;
import io.reactivex.Flowable;
import io.reactivex.Maybe;
import io.reactivex.Scheduler;
import io.reactivex.annotations.NonNull;
import io.reactivex.functions.Function;
import io.reactivex.schedulers.Schedulers;
/**
* Subscription Service singleton:
* Provides a basis for channel Subscriptions.
* Provides access to subscription table in database as well as
* up-to-date observations on the subscribed channels
*/
public class SubscriptionService {
private static final SubscriptionService sInstance = new SubscriptionService();
public static SubscriptionService getInstance() {
return sInstance;
}
protected final String TAG = "SubscriptionService@" + Integer.toHexString(hashCode());
protected static final boolean DEBUG = MainActivity.DEBUG;
private static final int SUBSCRIPTION_DEBOUNCE_INTERVAL = 500;
private static final int SUBSCRIPTION_THREAD_POOL_SIZE = 4;
private AppDatabase db;
private Flowable<List<SubscriptionEntity>> subscription;
private Scheduler subscriptionScheduler;
private SubscriptionService() {
db = NewPipeDatabase.getInstance();
subscription = getSubscriptionInfos();
final Executor subscriptionExecutor = Executors.newFixedThreadPool(SUBSCRIPTION_THREAD_POOL_SIZE);
subscriptionScheduler = Schedulers.from(subscriptionExecutor);
}
/**
* Part of subscription observation pipeline
*
* @see SubscriptionService#getSubscription()
*/
private Flowable<List<SubscriptionEntity>> getSubscriptionInfos() {
return subscriptionTable().getAll()
// Wait for a period of infrequent updates and return the latest update
.debounce(SUBSCRIPTION_DEBOUNCE_INTERVAL, TimeUnit.MILLISECONDS)
.share() // Share allows multiple subscribers on the same observable
.replay(1) // Replay synchronizes subscribers to the last emitted result
.autoConnect();
}
/**
* Provides an observer to the latest update to the subscription table.
* <p>
* This observer may be subscribed multiple times, where each subscriber obtains
* the latest synchronized changes available, effectively share the same data
* across all subscribers.
* <p>
* This observer has a debounce cooldown, meaning if multiple updates are observed
* in the cooldown interval, only the latest changes are emitted to the subscribers.
* This reduces the amount of observations caused by frequent updates to the database.
*/
@android.support.annotation.NonNull
public Flowable<List<SubscriptionEntity>> getSubscription() {
return subscription;
}
public Maybe<ChannelInfo> getChannelInfo(final SubscriptionEntity subscriptionEntity) {
if (DEBUG) Log.d(TAG, "getChannelInfo() called with: subscriptionEntity = [" + subscriptionEntity + "]");
return Maybe.fromSingle(ExtractorHelper
.getChannelInfo(subscriptionEntity.getServiceId(), subscriptionEntity.getUrl(), false))
.subscribeOn(subscriptionScheduler);
}
/**
* Returns the database access interface for subscription table.
*/
public SubscriptionDAO subscriptionTable() {
return db.subscriptionDAO();
}
public Completable updateChannelInfo(final ChannelInfo info) {
final Function<List<SubscriptionEntity>, CompletableSource> update = new Function<List<SubscriptionEntity>, CompletableSource>() {
@Override
public CompletableSource apply(@NonNull List<SubscriptionEntity> subscriptionEntities) throws Exception {
if (DEBUG) Log.d(TAG, "updateChannelInfo() called with: subscriptionEntities = [" + subscriptionEntities + "]");
if (subscriptionEntities.size() == 1) {
SubscriptionEntity subscription = subscriptionEntities.get(0);
// Subscriber count changes very often, making this check almost unnecessary.
// Consider removing it later.
if (!isSubscriptionUpToDate(info, subscription)) {
subscription.setData(info.name, info.avatar_url, info.description, info.subscriber_count);
return update(subscription);
}
}
return Completable.complete();
}
};
return subscriptionTable().getSubscription(info.service_id, info.url)
.firstOrError()
.flatMapCompletable(update);
}
private Completable update(final SubscriptionEntity updatedSubscription) {
return Completable.fromRunnable(new Runnable() {
@Override
public void run() {
subscriptionTable().update(updatedSubscription);
}
});
}
private boolean isSubscriptionUpToDate(final ChannelInfo info, final SubscriptionEntity entity) {
return info.url.equals(entity.getUrl()) &&
info.service_id == entity.getServiceId() &&
info.name.equals(entity.getName()) &&
info.avatar_url.equals(entity.getAvatarUrl()) &&
info.description.equals(entity.getDescription()) &&
info.subscriber_count == entity.getSubscriberCount();
}
}

View File

@@ -0,0 +1,147 @@
package org.schabi.newpipe.history;
import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.app.FragmentStatePagerAdapter;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import com.jakewharton.rxbinding2.view.RxView;
import org.schabi.newpipe.R;
import org.schabi.newpipe.settings.SettingsActivity;
import org.schabi.newpipe.util.ThemeHelper;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.functions.Consumer;
public class HistoryActivity extends AppCompatActivity {
private static final String TAG = "HistoryActivity";
/**
* The {@link android.support.v4.view.PagerAdapter} that will provide
* fragments for each of the sections. We use a
* {@link FragmentPagerAdapter} derivative, which will keep every
* loaded fragment in memory. If this becomes too memory intensive, it
* may be best to switch to a
* {@link android.support.v4.app.FragmentStatePagerAdapter}.
*/
private SectionsPagerAdapter mSectionsPagerAdapter;
/**
* The {@link ViewPager} that will host the section contents.
*/
private ViewPager mViewPager;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ThemeHelper.setTheme(this);
setContentView(R.layout.activity_history);
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setTitle(R.string.title_activity_history);
// Create the adapter that will return a fragment for each of the three
// primary sections of the activity.
mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager());
// Set up the ViewPager with the sections adapter.
mViewPager = findViewById(R.id.container);
mViewPager.setAdapter(mSectionsPagerAdapter);
TabLayout tabLayout = findViewById(R.id.tabs);
tabLayout.setupWithViewPager(mViewPager);
final FloatingActionButton fab = findViewById(R.id.fab);
RxView.clicks(fab)
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<Object>() {
@Override
public void accept(Object o) {
int currentItem = mViewPager.getCurrentItem();
HistoryFragment fragment = (HistoryFragment) mSectionsPagerAdapter.instantiateItem(mViewPager, currentItem);
if(fragment != null) {
fragment.onHistoryCleared();
} else {
Log.w(TAG, "Couldn't find current fragment");
}
}
});
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.menu_history, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
finish();
return true;
case R.id.action_settings:
Intent intent = new Intent(this, SettingsActivity.class);
startActivity(intent);
return true;
}
return super.onOptionsItemSelected(item);
}
/**
* A {@link FragmentPagerAdapter} that returns a fragment corresponding to
* one of the sections/tabs/pages.
*/
public class SectionsPagerAdapter extends FragmentStatePagerAdapter {
public SectionsPagerAdapter(FragmentManager fm) {
super(fm);
}
@Override
public Fragment getItem(int position) {
Fragment fragment;
switch (position) {
case 0:
fragment = SearchHistoryFragment.newInstance();
break;
case 1:
fragment = WatchedHistoryFragment.newInstance();
break;
default:
throw new IllegalArgumentException("position: " + position);
}
return fragment;
}
@Override
public CharSequence getPageTitle(int position) {
switch (position) {
case 0:
return getString(R.string.title_history_search);
case 1:
return getString(R.string.title_history_view);
}
throw new IllegalArgumentException("position: " + position);
}
@Override
public int getCount() {
// Show 3 total pages.
return 2;
}
}
}

View File

@@ -0,0 +1,106 @@
package org.schabi.newpipe.history;
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import org.schabi.newpipe.database.history.model.HistoryEntry;
import java.text.DateFormat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
/**
* Adapter for history entries
* @param <E> the type of the entries
* @param <VH> the type of the view holder
*/
public abstract class HistoryEntryAdapter<E extends HistoryEntry, VH extends RecyclerView.ViewHolder> extends RecyclerView.Adapter<VH> {
private final ArrayList<E> mEntries;
private final DateFormat mDateFormat;
private OnHistoryItemClickListener<E> onHistoryItemClickListener = null;
public HistoryEntryAdapter(Context context) {
super();
mEntries = new ArrayList<>();
mDateFormat = android.text.format.DateFormat.getDateFormat(context.getApplicationContext());
setHasStableIds(true);
}
public void setEntries(@NonNull Collection<E> historyEntries) {
mEntries.clear();
mEntries.addAll(historyEntries);
notifyDataSetChanged();
}
public Collection<E> getItems() {
return mEntries;
}
public void clear() {
mEntries.clear();
notifyDataSetChanged();
}
protected String getFormattedDate(Date date) {
return mDateFormat.format(date);
}
@Override
public long getItemId(int position) {
return mEntries.get(position).getId();
}
@Override
public int getItemCount() {
return mEntries.size();
}
@Override
public void onBindViewHolder(VH holder, int position) {
final E entry = mEntries.get(position);
holder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
final OnHistoryItemClickListener<E> historyItemClickListener = onHistoryItemClickListener;
if(historyItemClickListener != null) {
historyItemClickListener.onHistoryItemClick(entry);
}
}
});
onBindViewHolder(holder, entry, position);
}
@Override
public void onViewRecycled(VH holder) {
super.onViewRecycled(holder);
holder.itemView.setOnClickListener(null);
}
abstract void onBindViewHolder(VH holder, E entry, int position);
public void setOnHistoryItemClickListener(@Nullable OnHistoryItemClickListener<E> onHistoryItemClickListener) {
this.onHistoryItemClickListener = onHistoryItemClickListener;
}
public boolean isEmpty() {
return mEntries.isEmpty();
}
public E removeItemAt(int position) {
E entry = mEntries.remove(position);
notifyItemRemoved(position);
return entry;
}
public interface OnHistoryItemClickListener<E extends HistoryEntry> {
void onHistoryItemClick(E historyItem);
}
}

View File

@@ -0,0 +1,311 @@
package org.schabi.newpipe.history;
import android.content.SharedPreferences;
import android.graphics.Color;
import android.os.Bundle;
import android.os.Parcelable;
import android.preference.PreferenceManager;
import android.support.annotation.CallSuper;
import android.support.annotation.MainThread;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.annotation.StringRes;
import android.support.design.widget.Snackbar;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.helper.ItemTouchHelper;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import org.schabi.newpipe.BaseFragment;
import org.schabi.newpipe.R;
import org.schabi.newpipe.database.history.dao.HistoryDAO;
import org.schabi.newpipe.database.history.model.HistoryEntry;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import icepick.State;
import io.reactivex.Observer;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.Disposable;
import io.reactivex.functions.Consumer;
import io.reactivex.schedulers.Schedulers;
import io.reactivex.subjects.PublishSubject;
import static org.schabi.newpipe.util.AnimationUtils.animateView;
public abstract class HistoryFragment<E extends HistoryEntry> extends BaseFragment
implements HistoryEntryAdapter.OnHistoryItemClickListener<E> {
private SharedPreferences mSharedPreferences;
private String mHistoryIsEnabledKey;
private boolean mHistoryIsEnabled;
private HistoryIsEnabledChangeListener mHistoryIsEnabledChangeListener;
private View mDisabledView;
private View mEmptyHistoryView;
@State
Parcelable mRecyclerViewState;
private RecyclerView mRecyclerView;
private HistoryEntryAdapter<E, ? extends RecyclerView.ViewHolder> mHistoryAdapter;
private ItemTouchHelper.SimpleCallback mHistoryItemSwipeCallback;
private int allowedSwipeToDeleteDirections = ItemTouchHelper.LEFT | ItemTouchHelper.RIGHT;
private HistoryDAO<E> mHistoryDataSource;
private PublishSubject<Collection<E>> mHistoryEntryDeleteSubject;
private PublishSubject<Collection<E>> mHistoryEntryInsertSubject;
@StringRes
abstract int getEnabledConfigKey();
@CallSuper
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mHistoryIsEnabledKey = getString(getEnabledConfigKey());
mSharedPreferences = PreferenceManager.getDefaultSharedPreferences(getContext());
// Read history enabled from preferences
mHistoryIsEnabled = isHistoryEnabled();
// Register history enabled listener
mSharedPreferences.registerOnSharedPreferenceChangeListener(mHistoryIsEnabledChangeListener);
mHistoryDataSource = createHistoryDAO();
mHistoryEntryDeleteSubject = PublishSubject.create();
mHistoryEntryDeleteSubject
.observeOn(Schedulers.io())
.subscribe(new Consumer<Collection<E>>() {
@Override
public void accept(Collection<E> historyEntries) throws Exception {
mHistoryDataSource.delete(historyEntries);
}
});
mHistoryEntryInsertSubject = PublishSubject.create();
mHistoryEntryInsertSubject
.observeOn(Schedulers.io())
.subscribe(new Consumer<Collection<E>>() {
@Override
public void accept(Collection<E> historyEntries) throws Exception {
mHistoryDataSource.insertAll(historyEntries);
}
});
mHistoryItemSwipeCallback = new ItemTouchHelper.SimpleCallback(0, allowedSwipeToDeleteDirections) {
@Override
public boolean onMove(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, RecyclerView.ViewHolder target) {
return false;
}
@Override
public void onSwiped(RecyclerView.ViewHolder viewHolder, int swipeDir) {
if (mHistoryAdapter != null) {
final E historyEntry = mHistoryAdapter.removeItemAt(viewHolder.getAdapterPosition());
mHistoryEntryDeleteSubject.onNext(Collections.singletonList(historyEntry));
View view = getActivity().findViewById(R.id.main_content);
if (view == null) view = mRecyclerView.getRootView();
Snackbar.make(view, R.string.item_deleted, 5 * 1000)
.setActionTextColor(Color.WHITE)
.setAction(R.string.undo, new View.OnClickListener() {
@Override
public void onClick(View v) {
mHistoryEntryInsertSubject.onNext(Collections.singletonList(historyEntry));
}
}).show();
}
}
};
}
@NonNull
protected abstract HistoryEntryAdapter<E, ? extends RecyclerView.ViewHolder> createAdapter();
@Override
public void onResume() {
super.onResume();
mHistoryDataSource.getAll()
.toObservable()
.observeOn(AndroidSchedulers.mainThread())
.subscribe(getHistoryListConsumer());
boolean newEnabled = isHistoryEnabled();
if (newEnabled != mHistoryIsEnabled) {
onHistoryIsEnabledChanged(newEnabled);
}
}
@NonNull
private Observer<List<E>> getHistoryListConsumer() {
return new Observer<List<E>>() {
@Override
public void onSubscribe(@NonNull Disposable d) {
}
@Override
public void onNext(@NonNull List<E> historyEntries) {
if (!historyEntries.isEmpty()) {
mHistoryAdapter.setEntries(historyEntries);
animateView(mEmptyHistoryView, false, 200);
if (mRecyclerViewState != null) {
mRecyclerView.getLayoutManager().onRestoreInstanceState(mRecyclerViewState);
mRecyclerViewState = null;
}
} else {
mHistoryAdapter.clear();
showEmptyHistory();
}
}
@Override
public void onError(@NonNull Throwable e) {
// TODO: error handling like in (see e.g. subscription fragment)
}
@Override
public void onComplete() {
}
};
}
private boolean isHistoryEnabled() {
return mSharedPreferences.getBoolean(mHistoryIsEnabledKey, false);
}
/**
* Called when the history is cleared to update the views
*/
@MainThread
public void onHistoryCleared() {
final Parcelable stateBeforeClear = mRecyclerView.getLayoutManager().onSaveInstanceState();
final Collection<E> itemsToDelete = new ArrayList<>(mHistoryAdapter.getItems());
mHistoryEntryDeleteSubject.onNext(itemsToDelete);
View view = getActivity().findViewById(R.id.main_content);
if (view == null) view = mRecyclerView.getRootView();
if (!itemsToDelete.isEmpty()) {
Snackbar.make(view, R.string.history_cleared, 5 * 1000)
.setActionTextColor(Color.WHITE)
.setAction(R.string.undo, new View.OnClickListener() {
@Override
public void onClick(View v) {
mRecyclerViewState = stateBeforeClear;
mHistoryEntryInsertSubject.onNext(itemsToDelete);
}
}).show();
} else {
Snackbar.make(view, R.string.history_cleared, Snackbar.LENGTH_LONG).show();
}
mHistoryAdapter.clear();
showEmptyHistory();
}
private void showEmptyHistory() {
if (mHistoryIsEnabled) {
animateView(mEmptyHistoryView, true, 200);
}
}
@Nullable
@CallSuper
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_history, container, false);
mRecyclerView = rootView.findViewById(R.id.history_view);
RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false);
mRecyclerView.setLayoutManager(layoutManager);
mHistoryAdapter = createAdapter();
mHistoryAdapter.setOnHistoryItemClickListener(this);
mRecyclerView.setAdapter(mHistoryAdapter);
ItemTouchHelper itemTouchHelper = new ItemTouchHelper(mHistoryItemSwipeCallback);
itemTouchHelper.attachToRecyclerView(mRecyclerView);
mDisabledView = rootView.findViewById(R.id.history_disabled_view);
mEmptyHistoryView = rootView.findViewById(R.id.history_empty);
if (mHistoryIsEnabled) {
mRecyclerView.setVisibility(View.VISIBLE);
} else {
mDisabledView.setVisibility(View.VISIBLE);
}
return rootView;
}
@CallSuper
@Override
public void onDestroy() {
super.onDestroy();
mSharedPreferences.unregisterOnSharedPreferenceChangeListener(mHistoryIsEnabledChangeListener);
mSharedPreferences = null;
mHistoryIsEnabledChangeListener = null;
mHistoryIsEnabledKey = null;
mHistoryDataSource = null;
}
@Override
public void onPause() {
super.onPause();
mRecyclerViewState = mRecyclerView.getLayoutManager().onSaveInstanceState();
}
public void setAllowedSwipeToDeleteDirections(int allowedSwipeToDeleteDirections) {
this.allowedSwipeToDeleteDirections = allowedSwipeToDeleteDirections;
}
/**
* Called when history enabled flag is changed.
*
* @param historyIsEnabled the new value
*/
@CallSuper
public void onHistoryIsEnabledChanged(boolean historyIsEnabled) {
mHistoryIsEnabled = historyIsEnabled;
if (historyIsEnabled) {
animateView(mRecyclerView, true, 300);
animateView(mDisabledView, false, 300);
if (mHistoryAdapter.isEmpty()) {
animateView(mEmptyHistoryView, true, 300);
}
} else {
animateView(mRecyclerView, false, 300);
animateView(mDisabledView, true, 300);
animateView(mEmptyHistoryView, false, 300);
}
}
/**
* Creates a new history DAO
*
* @return the history DAO
*/
@NonNull
protected abstract HistoryDAO<E> createHistoryDAO();
private class HistoryIsEnabledChangeListener implements SharedPreferences.OnSharedPreferenceChangeListener {
@Override
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
if (key.equals(mHistoryIsEnabledKey)) {
boolean enabled = sharedPreferences.getBoolean(key, false);
if (mHistoryIsEnabled != enabled) {
onHistoryIsEnabledChanged(enabled);
}
}
}
}
}

View File

@@ -0,0 +1,31 @@
package org.schabi.newpipe.history;
import org.schabi.newpipe.extractor.stream.AudioStream;
import org.schabi.newpipe.extractor.stream.StreamInfo;
import org.schabi.newpipe.extractor.stream.VideoStream;
public interface HistoryListener {
/**
* Called when a video is played
*
* @param streamInfo the stream info
* @param videoStream the video stream that is played
*/
void onVideoPlayed(StreamInfo streamInfo, VideoStream videoStream);
/**
* Called when the audio is played in the background
*
* @param streamInfo the stream info
* @param audioStream the audio stream that is played
*/
void onAudioPlayed(StreamInfo streamInfo, AudioStream audioStream);
/**
* Called when the user searched for something
*
* @param serviceId which service the search was done
* @param query what the user searched for
*/
void onSearch(int serviceId, String query);
}

View File

@@ -0,0 +1,79 @@
package org.schabi.newpipe.history;
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.StringRes;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import org.schabi.newpipe.NewPipeDatabase;
import org.schabi.newpipe.R;
import org.schabi.newpipe.database.history.dao.HistoryDAO;
import org.schabi.newpipe.database.history.model.SearchHistoryEntry;
import org.schabi.newpipe.util.NavigationHelper;
public class SearchHistoryFragment extends HistoryFragment<SearchHistoryEntry> {
@NonNull
public static SearchHistoryFragment newInstance() {
return new SearchHistoryFragment();
}
@NonNull
@Override
protected SearchHistoryAdapter createAdapter() {
return new SearchHistoryAdapter(getContext());
}
@StringRes
@Override
int getEnabledConfigKey() {
return R.string.enable_search_history_key;
}
@NonNull
@Override
protected HistoryDAO<SearchHistoryEntry> createHistoryDAO() {
return NewPipeDatabase.getInstance().searchHistoryDAO();
}
@Override
public void onHistoryItemClick(SearchHistoryEntry historyItem) {
NavigationHelper.openSearch(getContext(), historyItem.getServiceId(), historyItem.getSearch());
}
private static class ViewHolder extends RecyclerView.ViewHolder {
private final TextView search;
private final TextView time;
public ViewHolder(View itemView) {
super(itemView);
search = itemView.findViewById(R.id.search);
time = itemView.findViewById(R.id.time);
}
}
protected class SearchHistoryAdapter extends HistoryEntryAdapter<SearchHistoryEntry, ViewHolder> {
public SearchHistoryAdapter(Context context) {
super(context);
}
@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
LayoutInflater inflater = LayoutInflater.from(parent.getContext());
View rootView = inflater.inflate(R.layout.item_search_history, parent, false);
return new ViewHolder(rootView);
}
@Override
void onBindViewHolder(ViewHolder holder, SearchHistoryEntry entry, int position) {
holder.search.setText(entry.getSearch());
holder.time.setText(getFormattedDate(entry.getCreationDate()));
}
}
}

View File

@@ -0,0 +1,113 @@
package org.schabi.newpipe.history;
import android.content.Context;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.annotation.StringRes;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.nostra13.universalimageloader.core.ImageLoader;
import org.schabi.newpipe.NewPipeDatabase;
import org.schabi.newpipe.R;
import org.schabi.newpipe.database.history.dao.HistoryDAO;
import org.schabi.newpipe.database.history.model.WatchHistoryEntry;
import org.schabi.newpipe.info_list.holder.StreamInfoItemHolder;
import org.schabi.newpipe.util.Localization;
import org.schabi.newpipe.util.NavigationHelper;
public class WatchedHistoryFragment extends HistoryFragment<WatchHistoryEntry> {
@NonNull
public static WatchedHistoryFragment newInstance() {
return new WatchedHistoryFragment();
}
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
@StringRes
@Override
int getEnabledConfigKey() {
return R.string.enable_watch_history_key;
}
@NonNull
@Override
protected WatchedHistoryAdapter createAdapter() {
return new WatchedHistoryAdapter(getContext());
}
@NonNull
@Override
protected HistoryDAO<WatchHistoryEntry> createHistoryDAO() {
return NewPipeDatabase.getInstance().watchHistoryDAO();
}
@Override
public void onHistoryItemClick(WatchHistoryEntry historyItem) {
NavigationHelper.openVideoDetail(getContext(),
historyItem.getServiceId(),
historyItem.getUrl(),
historyItem.getTitle());
}
private static class WatchedHistoryAdapter extends HistoryEntryAdapter<WatchHistoryEntry, ViewHolder> {
public WatchedHistoryAdapter(Context context) {
super(context);
}
@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
LayoutInflater inflater = LayoutInflater.from(parent.getContext());
View itemView = inflater.inflate(R.layout.list_stream_item, parent, false);
return new ViewHolder(itemView);
}
@Override
public void onViewRecycled(ViewHolder holder) {
holder.itemView.setOnClickListener(null);
ImageLoader.getInstance()
.cancelDisplayTask(holder.thumbnailView);
}
@Override
void onBindViewHolder(ViewHolder holder, WatchHistoryEntry entry, int position) {
holder.date.setText(getFormattedDate(entry.getCreationDate()));
holder.streamTitle.setText(entry.getTitle());
holder.uploader.setText(entry.getUploader());
holder.duration.setText(Localization.getDurationString(entry.getDuration()));
ImageLoader.getInstance()
.displayImage(entry.getThumbnailURL(), holder.thumbnailView, StreamInfoItemHolder.DISPLAY_THUMBNAIL_OPTIONS);
}
}
private static class ViewHolder extends RecyclerView.ViewHolder {
private final TextView date;
private final TextView streamTitle;
private final ImageView thumbnailView;
private final TextView uploader;
private final TextView duration;
public ViewHolder(View itemView) {
super(itemView);
thumbnailView = itemView.findViewById(R.id.itemThumbnailView);
date = itemView.findViewById(R.id.itemAdditionalDetails);
streamTitle = itemView.findViewById(R.id.itemVideoTitleView);
uploader = itemView.findViewById(R.id.itemUploaderView);
duration = itemView.findViewById(R.id.itemDurationView);
}
}
}

View File

@@ -0,0 +1,116 @@
package org.schabi.newpipe.info_list;
import android.content.Context;
import android.support.annotation.NonNull;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import com.nostra13.universalimageloader.core.ImageLoader;
import org.schabi.newpipe.extractor.InfoItem;
import org.schabi.newpipe.extractor.channel.ChannelInfoItem;
import org.schabi.newpipe.extractor.playlist.PlaylistInfoItem;
import org.schabi.newpipe.extractor.stream.StreamInfoItem;
import org.schabi.newpipe.info_list.holder.ChannelInfoItemHolder;
import org.schabi.newpipe.info_list.holder.ChannelMiniInfoItemHolder;
import org.schabi.newpipe.info_list.holder.InfoItemHolder;
import org.schabi.newpipe.info_list.holder.PlaylistInfoItemHolder;
import org.schabi.newpipe.info_list.holder.StreamInfoItemHolder;
import org.schabi.newpipe.info_list.holder.StreamMiniInfoItemHolder;
/*
* Created by Christian Schabesberger on 26.09.16.
* <p>
* Copyright (C) Christian Schabesberger 2016 <chris.schabesberger@mailbox.org>
* InfoItemBuilder.java is part of NewPipe.
* <p>
* NewPipe is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* NewPipe is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with NewPipe. If not, see <http://www.gnu.org/licenses/>.
*/
public class InfoItemBuilder {
private static final String TAG = InfoItemBuilder.class.toString();
public interface OnInfoItemSelectedListener<T extends InfoItem> {
void selected(T selectedItem);
}
private final Context context;
private ImageLoader imageLoader = ImageLoader.getInstance();
private OnInfoItemSelectedListener<StreamInfoItem> onStreamSelectedListener;
private OnInfoItemSelectedListener<ChannelInfoItem> onChannelSelectedListener;
private OnInfoItemSelectedListener<PlaylistInfoItem> onPlaylistSelectedListener;
public InfoItemBuilder(Context context) {
this.context = context;
}
public View buildView(@NonNull ViewGroup parent, @NonNull final InfoItem infoItem) {
return buildView(parent, infoItem, false);
}
public View buildView(@NonNull ViewGroup parent, @NonNull final InfoItem infoItem, boolean useMiniVariant) {
InfoItemHolder holder = holderFromInfoType(parent, infoItem.info_type, useMiniVariant);
holder.updateFromItem(infoItem);
return holder.itemView;
}
private InfoItemHolder holderFromInfoType(@NonNull ViewGroup parent, @NonNull InfoItem.InfoType infoType, boolean useMiniVariant) {
switch (infoType) {
case STREAM:
return useMiniVariant ? new StreamMiniInfoItemHolder(this, parent) : new StreamInfoItemHolder(this, parent);
case CHANNEL:
return useMiniVariant ? new ChannelMiniInfoItemHolder(this, parent) : new ChannelInfoItemHolder(this, parent);
case PLAYLIST:
return new PlaylistInfoItemHolder(this, parent);
default:
Log.e(TAG, "Trollolo");
throw new RuntimeException("InfoType not expected = " + infoType.name());
}
}
public Context getContext() {
return context;
}
public ImageLoader getImageLoader() {
return imageLoader;
}
public OnInfoItemSelectedListener<StreamInfoItem> getOnStreamSelectedListener() {
return onStreamSelectedListener;
}
public void setOnStreamSelectedListener(OnInfoItemSelectedListener<StreamInfoItem> listener) {
this.onStreamSelectedListener = listener;
}
public OnInfoItemSelectedListener<ChannelInfoItem> getOnChannelSelectedListener() {
return onChannelSelectedListener;
}
public void setOnChannelSelectedListener(OnInfoItemSelectedListener<ChannelInfoItem> listener) {
this.onChannelSelectedListener = listener;
}
public OnInfoItemSelectedListener<PlaylistInfoItem> getOnPlaylistSelectedListener() {
return onPlaylistSelectedListener;
}
public void setOnPlaylistSelectedListener(OnInfoItemSelectedListener<PlaylistInfoItem> listener) {
this.onPlaylistSelectedListener = listener;
}
}

View File

@@ -0,0 +1,255 @@
package org.schabi.newpipe.info_list;
import android.app.Activity;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import org.schabi.newpipe.extractor.InfoItem;
import org.schabi.newpipe.extractor.channel.ChannelInfoItem;
import org.schabi.newpipe.extractor.playlist.PlaylistInfoItem;
import org.schabi.newpipe.extractor.stream.StreamInfoItem;
import org.schabi.newpipe.info_list.InfoItemBuilder.OnInfoItemSelectedListener;
import org.schabi.newpipe.info_list.holder.ChannelInfoItemHolder;
import org.schabi.newpipe.info_list.holder.ChannelMiniInfoItemHolder;
import org.schabi.newpipe.info_list.holder.InfoItemHolder;
import org.schabi.newpipe.info_list.holder.PlaylistInfoItemHolder;
import org.schabi.newpipe.info_list.holder.StreamInfoItemHolder;
import org.schabi.newpipe.info_list.holder.StreamMiniInfoItemHolder;
import java.util.ArrayList;
import java.util.List;
/*
* Created by Christian Schabesberger on 01.08.16.
*
* Copyright (C) Christian Schabesberger 2016 <chris.schabesberger@mailbox.org>
* InfoListAdapter.java is part of NewPipe.
*
* NewPipe is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NewPipe is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NewPipe. If not, see <http://www.gnu.org/licenses/>.
*/
public class InfoListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
private static final String TAG = InfoListAdapter.class.getSimpleName();
private static final boolean DEBUG = false;
private static final int HEADER_TYPE = 0;
private static final int FOOTER_TYPE = 1;
private static final int MINI_STREAM_HOLDER_TYPE = 0x100;
private static final int STREAM_HOLDER_TYPE = 0x101;
private static final int MINI_CHANNEL_HOLDER_TYPE = 0x200;
private static final int CHANNEL_HOLDER_TYPE = 0x201;
private static final int PLAYLIST_HOLDER_TYPE = 0x301;
private final InfoItemBuilder infoItemBuilder;
private final ArrayList<InfoItem> infoItemList;
private boolean useMiniVariant = false;
private boolean showFooter = false;
private View header = null;
private View footer = null;
public class HFHolder extends RecyclerView.ViewHolder {
public View view;
public HFHolder(View v) {
super(v);
view = v;
}
}
public InfoListAdapter(Activity a) {
infoItemBuilder = new InfoItemBuilder(a);
infoItemList = new ArrayList<>();
}
public void setOnStreamSelectedListener(OnInfoItemSelectedListener<StreamInfoItem> listener) {
infoItemBuilder.setOnStreamSelectedListener(listener);
}
public void setOnChannelSelectedListener(OnInfoItemSelectedListener<ChannelInfoItem> listener) {
infoItemBuilder.setOnChannelSelectedListener(listener);
}
public void setOnPlaylistSelectedListener(OnInfoItemSelectedListener<PlaylistInfoItem> listener) {
infoItemBuilder.setOnPlaylistSelectedListener(listener);
}
public void useMiniItemVariants(boolean useMiniVariant) {
this.useMiniVariant = useMiniVariant;
}
public void addInfoItemList(List<InfoItem> data) {
if (data != null) {
if (DEBUG) {
Log.d(TAG, "addInfoItemList() before > infoItemList.size() = " + infoItemList.size() + ", data.size() = " + data.size());
}
int offsetStart = sizeConsideringHeaderOffset();
infoItemList.addAll(data);
if (DEBUG) {
Log.d(TAG, "addInfoItemList() after > offsetStart = " + offsetStart + ", infoItemList.size() = " + infoItemList.size() + ", header = " + header + ", footer = " + footer + ", showFooter = " + showFooter);
}
notifyItemRangeInserted(offsetStart, data.size());
if (footer != null && showFooter) {
int footerNow = sizeConsideringHeaderOffset();
notifyItemMoved(offsetStart, footerNow);
if (DEBUG) Log.d(TAG, "addInfoItemList() footer from " + offsetStart + " to " + footerNow);
}
}
}
public void addInfoItem(InfoItem data) {
if (data != null) {
if (DEBUG) {
Log.d(TAG, "addInfoItem() before > infoItemList.size() = " + infoItemList.size() + ", thread = " + Thread.currentThread());
}
int positionInserted = sizeConsideringHeaderOffset();
infoItemList.add(data);
if (DEBUG) {
Log.d(TAG, "addInfoItem() after > position = " + positionInserted + ", infoItemList.size() = " + infoItemList.size() + ", header = " + header + ", footer = " + footer + ", showFooter = " + showFooter);
}
notifyItemInserted(positionInserted);
if (footer != null && showFooter) {
int footerNow = sizeConsideringHeaderOffset();
notifyItemMoved(positionInserted, footerNow);
if (DEBUG) Log.d(TAG, "addInfoItem() footer from " + positionInserted + " to " + footerNow);
}
}
}
public void clearStreamItemList() {
if (infoItemList.isEmpty()) {
return;
}
infoItemList.clear();
notifyDataSetChanged();
}
public void setHeader(View header) {
boolean changed = header != this.header;
this.header = header;
if (changed) notifyDataSetChanged();
}
public void setFooter(View view) {
this.footer = view;
}
public void showFooter(boolean show) {
if (DEBUG) Log.d(TAG, "showFooter() called with: show = [" + show + "]");
if (show == showFooter) return;
showFooter = show;
if (show) notifyItemInserted(sizeConsideringHeaderOffset());
else notifyItemRemoved(sizeConsideringHeaderOffset());
}
private int sizeConsideringHeaderOffset() {
int i = infoItemList.size() + (header != null ? 1 : 0);
if (DEBUG) Log.d(TAG, "sizeConsideringHeaderOffset() called → " + i);
return i;
}
public ArrayList<InfoItem> getItemsList() {
return infoItemList;
}
@Override
public int getItemCount() {
int count = infoItemList.size();
if (header != null) count++;
if (footer != null && showFooter) count++;
if (DEBUG) {
Log.d(TAG, "getItemCount() called, count = " + count + ", infoItemList.size() = " + infoItemList.size() + ", header = " + header + ", footer = " + footer + ", showFooter = " + showFooter);
}
return count;
}
@Override
public int getItemViewType(int position) {
if (DEBUG) Log.d(TAG, "getItemViewType() called with: position = [" + position + "]");
if (header != null && position == 0) {
return HEADER_TYPE;
} else if (header != null) {
position--;
}
if (footer != null && position == infoItemList.size() && showFooter) {
return FOOTER_TYPE;
}
InfoItem item = infoItemList.get(position);
switch (item.info_type) {
case STREAM:
return useMiniVariant ? MINI_STREAM_HOLDER_TYPE : STREAM_HOLDER_TYPE;
case CHANNEL:
return useMiniVariant ? MINI_CHANNEL_HOLDER_TYPE : CHANNEL_HOLDER_TYPE;
case PLAYLIST:
return PLAYLIST_HOLDER_TYPE;
default:
Log.e(TAG, "Trollolo");
return -1;
}
}
@Override
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int type) {
if (DEBUG) Log.d(TAG, "onCreateViewHolder() called with: parent = [" + parent + "], type = [" + type + "]");
switch (type) {
case HEADER_TYPE:
return new HFHolder(header);
case FOOTER_TYPE:
return new HFHolder(footer);
case MINI_STREAM_HOLDER_TYPE:
return new StreamMiniInfoItemHolder(infoItemBuilder, parent);
case STREAM_HOLDER_TYPE:
return new StreamInfoItemHolder(infoItemBuilder, parent);
case MINI_CHANNEL_HOLDER_TYPE:
return new ChannelMiniInfoItemHolder(infoItemBuilder, parent);
case CHANNEL_HOLDER_TYPE:
return new ChannelInfoItemHolder(infoItemBuilder, parent);
case PLAYLIST_HOLDER_TYPE:
return new PlaylistInfoItemHolder(infoItemBuilder, parent);
default:
Log.e(TAG, "Trollolo");
return null;
}
}
@Override
public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
if (DEBUG) Log.d(TAG, "onBindViewHolder() called with: holder = [" + holder.getClass().getSimpleName() + "], position = [" + position + "]");
if (holder instanceof InfoItemHolder) {
// If header isn't null, offset the items by -1
if (header != null) position--;
((InfoItemHolder) holder).updateFromItem(infoItemList.get(position));
} else if (holder instanceof HFHolder && position == 0 && header != null) {
((HFHolder) holder).view = header;
} else if (holder instanceof HFHolder && position == sizeConsideringHeaderOffset() && footer != null && showFooter) {
((HFHolder) holder).view = footer;
}
}
}

Some files were not shown because too many files have changed in this diff Show More