Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Release v0.17.0 #2482

Merged
merged 118 commits into from
Aug 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
58e562f
added default kiosk
yausername Mar 10, 2019
e242ade
updated extractor
yausername Mar 10, 2019
369fd95
skip tests, fix later
yausername Mar 11, 2019
fdf0d8e
fixed memory leak
yausername Mar 12, 2019
76f7165
Merge remote-tracking branch 'upstream/dev' into defaultTrending
yausername Mar 12, 2019
9bcccc8
Update README
Mar 26, 2019
4e1423d
Implement playback state management
Koitharu Apr 13, 2019
002a141
Fix scrolling details
Koitharu Apr 15, 2019
73be8cf
Base implementation of showing playback positions in lists
Koitharu Apr 15, 2019
a48cbc6
Show streams states for local lists
Koitharu Apr 15, 2019
f47c5e5
Merge branch 'playback_resume_v2' into playback_state_list
Koitharu Apr 15, 2019
1edfa78
removed the gena strings.
Apr 17, 2019
03b1a8b
Merge branch 'dev' into playback_state_list
Koitharu Apr 27, 2019
41fb6f5
Update states in lists
Koitharu Apr 27, 2019
c7cd9e8
Option to disable states indicators
Koitharu Apr 27, 2019
273f731
Refactor adapter
Koitharu Apr 27, 2019
93f2518
Animate states changed
Koitharu Apr 27, 2019
312e137
Fix tablet ui
Koitharu May 6, 2019
d1bd7f6
Update strings.xml
sherlockbeard May 7, 2019
43b859f
Merge branch 'dev' into removeextra
sherlockbeard May 7, 2019
8b584f3
Make long-press menu consistent across views: fix #2354
Stypox May 29, 2019
30eeef4
Removed unused showStreamDialog from VideoDetailFragment
Stypox May 29, 2019
93edb33
Translated using Weblate (Czech)
May 29, 2019
9395df4
Translated using Weblate (Czech)
May 29, 2019
bdb1be9
Remove useless overrides of showStreamDialog
Stypox May 29, 2019
8695466
Make subscription long-press menu consistant in local sub list
Stypox May 29, 2019
6f028ec
Remove unused imports from modified files
Stypox May 29, 2019
b6cfb8a
Remove dupliacte direct_on_background string
Stypox May 30, 2019
359a9a9
Translated using Weblate (Czech)
May 30, 2019
e1ead9d
Translated using Weblate (Persian)
mohammadmdp May 31, 2019
281cae7
Merge branch 'master' into dev
TobiGr May 31, 2019
2809ee7
Merge branch 'dev' into readme-services
TobiGr Jun 2, 2019
6213623
Merge pull request #2235 from TeamNewPipe/readme-services
TobiGr Jun 2, 2019
1a9922d
Translated using Weblate (German)
SantosSi Jun 1, 2019
f766f38
Translated using Weblate (English)
conconfx Jun 1, 2019
bd42f41
Translated using Weblate (Japanese)
conconfx Jun 1, 2019
d8e6ad4
Translated using Weblate (Portuguese)
SantosSi Jun 1, 2019
407c61e
Translated using Weblate (Hebrew)
Babobu1 Jun 2, 2019
fb18ea7
Translated using Weblate (Hebrew)
ArtikBanana Jun 2, 2019
aefc51d
Translated using Weblate (Ukrainian)
Jun 2, 2019
d8cb950
Translated using Weblate (Korean)
Jun 2, 2019
a9f3939
Translated using Weblate (Hebrew)
ArtikBanana Jun 2, 2019
4a8baae
Translated using Weblate (Hebrew)
Babobu1 Jun 2, 2019
f8ccc31
Translated using Weblate (Hebrew)
yarons Jun 2, 2019
c7cb652
Translated using Weblate (Hebrew)
yarons Jun 2, 2019
ce204eb
Translated using Weblate (Hebrew)
yarons Jun 2, 2019
5e00e34
Merge remote-tracking branch 'Weblate/dev' into dev
TobiGr Jun 3, 2019
1684a21
Update Extractor
TobiGr Jun 3, 2019
9e34fee
New MP4 muxer + Queue changes + Storage fixes
kapodamy Mar 23, 2019
f6b3282
Implement Storage Access Framework
kapodamy Apr 5, 2019
d00dc79
more SAF implementation
kapodamy Apr 9, 2019
1089de6
Add confirm dialog before clear the finished download list
kapodamy Apr 15, 2019
4b3eb2e
Forget the download save path if the storage API is changed
kapodamy Apr 16, 2019
16d6bda
Webm muxer fixes and strings.xml changes
kapodamy Apr 17, 2019
d1573a0
misc changes
kapodamy Apr 17, 2019
34b2b96
Simplify the storage APIs use
kapodamy Apr 19, 2019
7b948f8
Space reserving tweaks for huge video resolutions
kapodamy Apr 25, 2019
cdc8fe8
amend rebase
kapodamy Jun 3, 2019
af971b6
Fixed selected subtitle stream not being shown
Redirion Jun 12, 2019
171b258
Merge pull request #2394 from Redirion/patch-1
TobiGr Jun 12, 2019
f0ba6af
Merge branch 'dev' into menu-consistency
Stypox Jun 14, 2019
ac5e2e0
bugs fixes
kapodamy Jun 14, 2019
162df5e
Merge branch 'dev' into ps-branch
kapodamy Jun 14, 2019
38b0b79
Merge pull request #2149 from kapodamy/ps-branch
TobiGr Jun 17, 2019
2a41802
Merge branch 'dev' into playback_state_list
Koitharu Jun 23, 2019
61472a9
Merge pull request #2288 from nv95/playback_state_list
TobiGr Jun 23, 2019
e599de0
Silence CheckForNewAppVersionTask
Redirion Jun 25, 2019
0007451
Update CheckForNewAppVersionTask.java
Redirion Jun 25, 2019
05ef926
Update CheckForNewAppVersionTask.java
Redirion Jun 25, 2019
6a4bb6e
Update CheckForNewAppVersionTask.java
Redirion Jun 25, 2019
c4ef40f
Removed tabs
Redirion Jun 25, 2019
80b4975
Update CheckForNewAppVersionTask.java
Redirion Jun 25, 2019
37a9e98
Update CheckForNewAppVersionTask.java
Redirion Jun 25, 2019
e11df5b
Merge branch 'dev' into removeextra
theScrabi Jun 26, 2019
fc8746e
Update CheckForNewAppVersionTask.java
Redirion Jun 26, 2019
806896e
Merge pull request #2295 from sherlockbeard/removeextra
theScrabi Jun 27, 2019
60f5f07
commit (3 changes)
kapodamy Jul 3, 2019
8059ac8
Handle (auto)rotation changes during activity lifecycle
moneytoo Jul 4, 2019
d862a59
Merge branch 'dev' into patch-2
TobiGr Jul 7, 2019
ad79a71
Merge pull request #2423 from Redirion/patch-2
TobiGr Jul 7, 2019
224a607
Fix Bluetooth AVRCP duration metadata
m0n1ker Jul 10, 2019
ccdd450
Add current and total track numbers to metadata
m0n1ker Jul 10, 2019
ee9052a
Add title to additional metadata object
m0n1ker Jul 11, 2019
064f0e4
Merge branch 'dev' into menu-consistency
Stypox Jul 21, 2019
3a6c22d
update to latest dev extractor
theScrabi Jul 21, 2019
5d4bb42
Merge branch 'dev' into dl-bux-fix
theScrabi Jul 21, 2019
7a44061
Merge branch 'dev' into rotate
theScrabi Jul 21, 2019
4d8f66f
Merge pull request #2444 from moneytoo/rotate
theScrabi Jul 21, 2019
db55484
Merge branch 'dev' into dl-bux-fix
theScrabi Jul 21, 2019
f879f54
Merge pull request #2440 from kapodamy/dl-bux-fix
theScrabi Jul 21, 2019
8a43e24
Merge branch 'dev' into issue-2240
theScrabi Jul 21, 2019
6787d02
Merge pull request #2453 from m0n1ker/issue-2240
theScrabi Jul 21, 2019
ef070a4
Merge branch 'dev' into menu-consistency
Stypox Jul 22, 2019
bb50283
Complete merge after #2288: add resumePlayback to player calls.
Stypox Jul 22, 2019
8edc332
Fix showing popup options with audio-only streams
Stypox Jul 22, 2019
bd48593
Merge branch 'dev' into defaultTrending
theScrabi Jul 22, 2019
e7b068e
Merge pull request #2203 from yausername/defaultTrending
theScrabi Jul 22, 2019
3aeba7c
Merge branch 'dev' into menu-consistency
Stypox Jul 24, 2019
759e984
Remove ugly if-else-cascade in
Stypox Jul 24, 2019
9df27f4
Ensure default actions cannot be overwritten permanently in StreamDia…
Stypox Jul 24, 2019
25fbbfa
Rename action to defaultAction in StreamDialogEntry
Stypox Jul 24, 2019
d076fe7
Optimize imports in edited files
Stypox Jul 25, 2019
7c9ef58
Fix crash when closing a not-yet-loaded popup.
Stypox Jul 25, 2019
4e5a20e
Merge pull request #2368 from Stypox/menu-consistency
TobiGr Jul 31, 2019
ffe8d4b
Update extractor version to fix video duration parsing failure
Jul 31, 2019
e529b16
Merge branch 'weblate' into release_v0.17.0
Jul 31, 2019
d9b042d
socket leak fix
kapodamy Aug 2, 2019
2f66913
drop unused popup storage permission request
kapodamy Aug 2, 2019
21a90bb
Merge pull request #2486 from kapodamy/32k-issue-fix
TobiGr Aug 2, 2019
31f3757
Move on to version 0.17.0 (750)
Jul 31, 2019
c8f475b
Add changelog for 0.17.0
Aug 1, 2019
fabb07b
fix import settings not working
theScrabi Aug 4, 2019
3cd4850
Fix playback position not being deleted on clearing watch history
TobiGr Aug 7, 2019
5aced46
remove controls animation/flicker
yausername Aug 7, 2019
a64f520
fix item addition to list
yausername Aug 7, 2019
5191907
Fix player resume
Stypox Aug 11, 2019
9fbb61a
make fastlane description better suted for fdroid
theScrabi Aug 11, 2019
f98e5cc
Merge pull request #2502 from Stypox/fix-player-resume
theScrabi Aug 12, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,22 @@ NewPipe does not use any Google framework libraries, nor the YouTube API. Websit
* Enqueue videos
* Local playlists
* Subtitles
* Multi-service support (e.g. SoundCloud \[beta\])
* Livestream support
* Show comments

### Coming Features

* Cast to UPnP and Cast
* Show comments
* … and many more

### Supported Services

NewPipe supports multiple services. Our [docs](https://teamnewpipe.github.io/documentation/) provide more info on how a new service can be added to the app and the extractor. Please get in touch with us if you intend to add a new one. Currently supported services are:

* YouTube
* SoundCloud \[beta\]
* media.ccc.de \[beta\]

## Updates
When a change to the NewPipe code occurs (due to either adding features or bug fixing), eventually a release will occur. These are in the format x.xx.x . In order to get this new version, you can:
* Build a debug APK yourself. This is the fastest way to get new features on your device, but is much more complicated, so we recommend using one of the other methods.
Expand Down
6 changes: 3 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
applicationId "org.schabi.newpipe"
minSdkVersion 19
targetSdkVersion 28
versionCode 740
versionName "0.16.2"
versionCode 750
versionName "0.17.0"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
Expand Down Expand Up @@ -57,7 +57,7 @@ dependencies {
exclude module: 'support-annotations'
})

implementation 'com.github.TeamNewPipe:NewPipeExtractor:2ac713e'
implementation 'com.github.TeamNewPipe:NewPipeExtractor:5f65788a2f89e'

testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:2.23.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import android.preference.PreferenceManager;
import android.support.v4.app.NotificationCompat;
import android.support.v4.app.NotificationManagerCompat;
import android.util.Log;

import org.json.JSONException;
import org.json.JSONObject;
Expand Down Expand Up @@ -47,6 +48,8 @@
*/
public class CheckForNewAppVersionTask extends AsyncTask<Void, Void, String> {

private static final boolean DEBUG = MainActivity.DEBUG;
private static final String TAG = CheckForNewAppVersionTask.class.getSimpleName();
private static final Application app = App.getApp();
private static final String GITHUB_APK_SHA1 = "B0:2E:90:7C:1C:D6:FC:57:C3:35:F0:88:D0:8F:50:5F:94:E4:D2:15";
private static final String newPipeApiUrl = "https://newpipe.schabi.org/api/data.json";
Expand Down Expand Up @@ -90,9 +93,8 @@ protected String doInBackground(Void... voids) {
Response response = client.newCall(request).execute();
return response.body().string();
} catch (IOException ex) {
ErrorActivity.reportError(app, ex, null, null,
ErrorActivity.ErrorInfo.make(UserAction.SOMETHING_ELSE, "none",
"app update API fail", R.string.app_ui_crash));
// connectivity problems, do not alarm user and fail silently
if (DEBUG) Log.w(TAG, Log.getStackTraceString(ex));
}

return null;
Expand All @@ -117,9 +119,8 @@ protected void onPostExecute(String response) {
compareAppVersionAndShowNotification(versionName, apkLocationUrl, versionCode);

} catch (JSONException ex) {
ErrorActivity.reportError(app, ex, null, null,
ErrorActivity.ErrorInfo.make(UserAction.SOMETHING_ELSE, "none",
"could not parse app update JSON data", R.string.app_ui_crash));
// connectivity problems, do not alarm user and fail silently
if (DEBUG) Log.w(TAG, Log.getStackTraceString(ex));
}
}
}
Expand Down
12 changes: 0 additions & 12 deletions app/src/main/java/org/schabi/newpipe/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
import org.schabi.newpipe.util.Constants;
import org.schabi.newpipe.util.KioskTranslator;
import org.schabi.newpipe.util.NavigationHelper;
import org.schabi.newpipe.util.PermissionHelper;
import org.schabi.newpipe.util.ServiceHelper;
import org.schabi.newpipe.util.StateSaver;
import org.schabi.newpipe.util.ThemeHelper;
Expand Down Expand Up @@ -422,17 +421,6 @@ public void onRequestPermissionsResult(int requestCode, @NonNull String[] permis
return;
}
}
switch (requestCode) {
case PermissionHelper.DOWNLOADS_REQUEST_CODE:
NavigationHelper.openDownloads(this);
break;
case PermissionHelper.DOWNLOAD_DIALOG_REQUEST_CODE:
Fragment fragment = getSupportFragmentManager().findFragmentById(R.id.fragment_holder);
if (fragment instanceof VideoDetailFragment) {
((VideoDetailFragment) fragment).openDownloadDialog();
}
break;
}
}

/**
Expand Down
17 changes: 6 additions & 11 deletions app/src/main/java/org/schabi/newpipe/RouterActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -382,10 +382,8 @@ private void handleChoice(final String selectedChoiceKey) {
}

if (selectedChoiceKey.equals(getString(R.string.download_key))) {
if (PermissionHelper.checkStoragePermissions(this, PermissionHelper.DOWNLOAD_DIALOG_REQUEST_CODE)) {
selectionIsDownload = true;
openDownloadDialog();
}
selectionIsDownload = true;
openDownloadDialog();
return;
}

Expand Down Expand Up @@ -453,9 +451,6 @@ public void onRequestPermissionsResult(int requestCode, @NonNull String[] permis
return;
}
}
if (requestCode == PermissionHelper.DOWNLOAD_DIALOG_REQUEST_CODE) {
openDownloadDialog();
}
}

private static class AdapterChoiceItem {
Expand Down Expand Up @@ -574,7 +569,7 @@ public Consumer<Info> getResultHandler(Choice choice) {
playQueue = new SinglePlayQueue((StreamInfo) info);

if (playerChoice.equals(videoPlayerKey)) {
NavigationHelper.playOnMainPlayer(this, playQueue);
NavigationHelper.playOnMainPlayer(this, playQueue, true);
} else if (playerChoice.equals(backgroundPlayerKey)) {
NavigationHelper.enqueueOnBackgroundPlayer(this, playQueue, true);
} else if (playerChoice.equals(popupPlayerKey)) {
Expand All @@ -587,11 +582,11 @@ public Consumer<Info> getResultHandler(Choice choice) {
playQueue = info instanceof ChannelInfo ? new ChannelPlayQueue((ChannelInfo) info) : new PlaylistPlayQueue((PlaylistInfo) info);

if (playerChoice.equals(videoPlayerKey)) {
NavigationHelper.playOnMainPlayer(this, playQueue);
NavigationHelper.playOnMainPlayer(this, playQueue, true);
} else if (playerChoice.equals(backgroundPlayerKey)) {
NavigationHelper.playOnBackgroundPlayer(this, playQueue);
NavigationHelper.playOnBackgroundPlayer(this, playQueue, true);
} else if (playerChoice.equals(popupPlayerKey)) {
NavigationHelper.playOnPopupPlayer(this, playQueue);
NavigationHelper.playOnPopupPlayer(this, playQueue, true);
}
}
};
Expand Down
13 changes: 13 additions & 0 deletions app/src/main/java/org/schabi/newpipe/database/Migrations.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,24 @@
import android.arch.persistence.db.SupportSQLiteDatabase;
import android.arch.persistence.room.migration.Migration;
import android.support.annotation.NonNull;
import android.util.Log;

import org.schabi.newpipe.BuildConfig;

public class Migrations {

public static final int DB_VER_11_0 = 1;
public static final int DB_VER_12_0 = 2;

public static final boolean DEBUG = !BuildConfig.BUILD_TYPE.equals("release");
private static final String TAG = Migrations.class.getName();

public static final Migration MIGRATION_11_12 = new Migration(DB_VER_11_0, DB_VER_12_0) {
@Override
public void migrate(@NonNull SupportSQLiteDatabase database) {
if(DEBUG) {
Log.d(TAG, "Start migrating database");
}
/*
* Unfortunately these queries must be hardcoded due to the possibility of
* schema and names changing at a later date, thus invalidating the older migration
Expand Down Expand Up @@ -56,6 +65,10 @@ public void migrate(@NonNull SupportSQLiteDatabase database) {
"ORDER BY creation_date DESC");

database.execSQL("DROP TABLE IF EXISTS watch_history");

if(DEBUG) {
Log.d(TAG, "Stop migrating database");
}
}
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ public Flowable<List<StreamHistoryEntity>> listByService(int serviceId) {
" ORDER BY " + STREAM_ACCESS_DATE + " DESC")
public abstract Flowable<List<StreamHistoryEntry>> getHistory();

@Query("SELECT * FROM " + STREAM_HISTORY_TABLE + " WHERE " + JOIN_STREAM_ID +
" = :streamId ORDER BY " + STREAM_ACCESS_DATE + " DESC LIMIT 1")
@Nullable
public abstract StreamHistoryEntity getLatestEntry(final long streamId);

@Query("DELETE FROM " + STREAM_HISTORY_TABLE + " WHERE " + JOIN_STREAM_ID + " = :streamId")
public abstract int deleteStreamHistory(final long streamId);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
import android.arch.persistence.room.ColumnInfo;
import android.arch.persistence.room.Entity;
import android.arch.persistence.room.ForeignKey;
import android.support.annotation.Nullable;

import java.util.concurrent.TimeUnit;

import static android.arch.persistence.room.ForeignKey.CASCADE;
import static org.schabi.newpipe.database.stream.model.StreamStateEntity.JOIN_STREAM_ID;
Expand All @@ -22,6 +25,12 @@ public class StreamStateEntity {
final public static String JOIN_STREAM_ID = "stream_id";
final public static String STREAM_PROGRESS_TIME = "progress_time";


/** Playback state will not be saved, if playback time less than this threshold */
private static final int PLAYBACK_SAVE_THRESHOLD_START_SECONDS = 5;
/** Playback state will not be saved, if time left less than this threshold */
private static final int PLAYBACK_SAVE_THRESHOLD_END_SECONDS = 10;

@ColumnInfo(name = JOIN_STREAM_ID)
private long streamUid;

Expand All @@ -48,4 +57,18 @@ public long getProgressTime() {
public void setProgressTime(long progressTime) {
this.progressTime = progressTime;
}

public boolean isValid(int durationInSeconds) {
final int seconds = (int) TimeUnit.MILLISECONDS.toSeconds(progressTime);
return seconds > PLAYBACK_SAVE_THRESHOLD_START_SECONDS
&& seconds < durationInSeconds - PLAYBACK_SAVE_THRESHOLD_END_SECONDS;
}

@Override
public boolean equals(@Nullable Object obj) {
if (obj instanceof StreamStateEntity) {
return ((StreamStateEntity) obj).streamUid == streamUid
&& ((StreamStateEntity) obj).progressTime == progressTime;
} else return false;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public void onGlobalLayout() {
private void updateFragments() {
MissionsFragment fragment = new MissionsFragment();

getFragmentManager().beginTransaction()
getSupportFragmentManager().beginTransaction()
.replace(R.id.frame, fragment, MISSIONS_FRAGMENT_TAG)
.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE)
.commit();
Expand Down
Loading