Commit graph

135 commits

Author SHA1 Message Date
TacoTheDank
04f9272706 Lint: Inner class may be static 2020-11-18 18:02:33 -05:00
TacoTheDank
c1aca23fa4 Lint: Redundant 'new' expression in constant array creation 2020-11-18 17:52:30 -05:00
TacoTheDank
497e145c70 Lint: Make a bunch of stuff final 2020-11-18 17:50:00 -05:00
Stypox
129ca6c2e2 Merge pull request #4784 from bd0n4lds/Dont-Use-Float-Type-For-Loop-Indices
Change loop index from float to int
2020-11-09 13:04:17 +01:00
Bri@n
8f8429d575 Change loop index from float to int 2020-11-09 12:55:59 +01:00
Isira Seneviratne
1f4469f1dc Use RxJava instead of AsyncTask in MissionAdapter. 2020-11-05 11:06:51 +05:30
Isira Seneviratne
9a367f4d46 Use Collection.removeIf() instead of using Iterator.remove() to remove elements conditionally. 2020-11-01 14:44:07 +05:30
Isira Seneviratne
bda8caa510 Use Comparator's comparing(), nullsLast() and reversed() methods. 2020-11-01 14:44:04 +05:30
TacoTheDank
166cdd50f4 Push conditionals inside branch expressions 2020-10-31 15:57:26 -04:00
TacoTheDank
b8ab82d148 Replace a ContextCompat with LayoutInflater.from 2020-10-31 15:54:19 -04:00
Isira Seneviratne
3da55d9f40 Use ContextCompat.getSystemService() and the Context.getSystemService() extension function. 2020-10-09 08:52:05 +05:30
Stypox
b08501d0f3 Merge pull request #3794 from budde25/download-same-file-crash
Fixes crash when a file is deleted then redownloaded
2020-09-09 15:41:06 +02:00
TacoTheDank
7db90c0561 Clean up SDK version checks 2020-09-06 12:55:30 +02:00
TacoTheDank
0ef2e07cf4 Some general-purpose lint cleanup 2020-09-06 12:55:26 +02:00
TacoTheDank
61c10ad427 Use AndroidX preference 2020-09-06 12:52:42 +02:00
mhmdanas
308eac4e13 Use SubtitlesStream#getUrl instead of getURL 2020-08-26 23:04:18 +03:00
Avently
aef78ace88 Merged the latest changes 2020-07-13 04:17:21 +03:00
Avently
60fd42dfa3 Changes for review 2020-06-27 06:25:50 +03:00
Ethan Budd
d020258294 Fixes crash when a file is deleted then redownloaded 2020-06-18 22:43:06 -05:00
Stypox
c80aba9a88 Use vector drawables instead of PNGs for material icons
For all manually-created images PNG have been kept.
- rename all icon attrs to have a `ic_` prefix
- always use `_24dp` icons, because there is no real difference, since they are vector drawables
- always use the original name found on material.io for icon drawables, as to not create confusion and possibly duplicates. Icon names can still be different from real drawable names, though I have made some of them compliant to this or maybe more meaningul.
- remove duplicate `getIconByAttr()` in ThemeHelper (use `resolveResourceIdFromAttr()`
- use standard icons for `expand_more` and `expand_less` instead of triangles
- use `play_button_outline` instead of custom PNG as play button in VideoDetailFragment (questionable, as there is no shadow anymore)
2020-05-21 15:39:35 +02:00
wb9688
205c5ff2ca Optimize imports 2020-05-01 20:13:01 +02:00
kapodamy
43a95447f8 fix integer overflows
* available() method in ChunkFileInputStream.java
* free "ahead space" calculation in CircularFileWriter.java
2020-04-01 15:30:33 -03:00
kapodamy
c19447b559 fix integer overflow 2020-03-25 16:13:36 -03:00
Xiang Rong Lin
02bb6494dc Fix bug causing crashes when sharing a downloaded file. 2020-02-03 10:43:08 +01:00
bopol
649e188b67 Merge remote-tracking branch 'upstream/dev' into dev
merging dev
2020-02-01 15:11:01 +01:00
bopol
a74f0873a3 fix wrong language shown many popup dialogs
Changed android.R.string.ok, which is "OK", into R.string.finish, which is also OK, but from our strings
Then for a small amount of languages that don't have Android translation, it will show the good string.
2020-02-01 09:44:49 +01:00
Markus Richter
b6108a45bd fixes #3021, see also https://github.com/TeamNewPipe/NewPipe-legacy/pull/21 2020-01-29 13:48:02 +01:00
Tobias Groza
8322c7c496 Merge pull request #2958 from kapodamy/android5-temp-dir-issue
fix #2889
2020-01-26 11:04:45 +01:00
kapodamy
3ed183a7a6 android 5 (lollipop) fixup
this commit attempts to fix the pickAvailableTemporalDir() method in ROMS that not are CTS compliant.
2020-01-14 00:05:34 -03:00
kapodamy
3877cec0ff ttml to srt conversion
rewrite SubtitleConverter (use JSoup library instead, remove unused methods)
2020-01-14 00:04:16 -03:00
TobiGr
30c9d97d1a Use Integer value directly for formatted string
a
2020-01-13 20:25:32 +01:00
Kamil Szczęk
4b8d5fbc26 Style corrected 2020-01-11 15:19:24 +01:00
Kamil Szczęk
0a95c7cec3 Add a snackbar to allow user to undo file deletion 2020-01-11 15:09:01 +01:00
Kamil Szczęk
ac10e09acb Reorder buttons in clear downloads dialog 2020-01-11 15:09:01 +01:00
Kamil Szczęk
9f05049e03 Use a dialog option instead of a checkbox 2020-01-11 15:09:01 +01:00
Kamil Szczęk
2bff989a68 Fix inconsistent style 2020-01-11 15:09:01 +01:00
Kamil Szczęk
328339f3a4 Put call to forget finished downloads in an else statement to prevent potential bugs 2020-01-11 15:09:01 +01:00
Kamil Szczęk
578395a351 Remove unnecessary import 2020-01-11 15:09:01 +01:00
Kamil Szczęk
7bd3f1bec4 Add option to remove downloaded files when clearing finished downloads 2020-01-11 15:09:01 +01:00
kapodamy
67d8dc051f remove unused imports 2019-12-05 14:04:48 -03:00
kapodamy
4cc71a9c01 commit
* rebase fixup, add null check
* better ETA string
* drop connection read timeout, for HSDPA networks
* bump NPE version
2019-11-26 13:41:16 -03:00
kapodamy
1283148c86 Merge branch 'dev' into dl-last-features 2019-11-26 10:46:32 -03:00
kapodamy
fc4a892f45 code cleanup
* migrate few annotations to androidx
* mission recovery: better error handling (except StreamExtractor.getErrorMessage() method always returns an error)
* post-processing: more detailed progress

[file specific changes]

DownloadMission.java
* remove redundant/boilerplate code (again)
* make few variables volatile
* better file "length" approximation
* use "done" variable to count the amount of bytes downloaded (simplify percent calc in UI code)

Postprocessing.java
* if case of error use "ERROR_POSTPROCESSING" instead of "ERROR_UNKNOWN_EXCEPTION"
* simplify source stream init

DownloadManager.java
* move all "service message sending" code to DownloadMission
* remove not implemented method "notifyUserPendingDownloads()" also his unused strings

DownloadManagerService.java
* use START_STICKY instead of START_NOT_STICKY
* simplify addMissionEventListener()/removeMissionEventListener() methods (always are called from the main thread)

Deleter.java
* better method definition

MissionAdapter.java
* better method definition
* code cleanup
* the UI is now refreshed every 750ms
* simplify download progress calculation
* indicates if the download is actually recovering
* smooth download speed measure
* show estimated remain time

MainFragment.java:
* check if viewPager is null (issued by "Apply changes" feature of Android Studio)
2019-11-26 10:46:31 -03:00
kapodamy
ceef1d63a5 update DownloadManager.java
* check if the directory pending_downloads was created
2019-11-26 10:46:29 -03:00
kapodamy
8f32cda70a fallback for pending downloads directory 2019-11-26 10:46:29 -03:00
kapodamy
fc04ddb5b4 misc changes
* OggFromWebMWriter: rewrite (again), reduce iterations over the input. Works as-is (video streams are not supported)
* WebMReader: use int for SimpleBlock.dataSize instead of long
* Download Recovery: allow recovering uninitialized downloads
* check range-requests using HEAD method instead of GET
* DownloadRunnableFallback: add workaround for 32kB/s issue, unknown issue origin, wont fix
* reporting downloads errors now include the source url with the selected quality and format
2019-11-26 10:46:28 -03:00
kapodamy
2484698e8b long-term downloads resume
* recovery infrastructure
* bump serialVersionUID of DownloadMission
* misc cleanup in DownloadMission.java
* remove unused/redundant from strings.xml
2019-11-26 10:46:26 -03:00
kapodamy
1380a53a05 rewrite OggFromWebMWriter
* reduce the number of iterations over the output file (less seeking)
* fix audio samples with size of 255 do not handled correctly in the segment table (allows writing audio streams with 70kbps and 160kbps bitrate)
* add support for VORBIS codec metadata
* write packets based on the timestamp
2019-11-26 10:46:26 -03:00
kapodamy
511b859c38 implement webm to ogg demuxer
* used for opus audio stream
* update WebMReader and WebMWriter
* new post-processing algorithm
2019-11-26 10:46:26 -03:00
Mauricio Colli
cb2f0625b1 Use new Localization and Downloader implementations from extractor 2019-11-17 23:58:52 -03:00