Commit Graph

61 Commits

Author SHA1 Message Date
Stypox f0ca916432
Update most dependencies 2020-11-22 14:03:10 +01:00
Isira Seneviratne 340b92e32b Convert ErrorInfo to Kotlin and use the Parcelize annotation. 2020-11-21 12:47:35 +05:30
TacoTheDank 31cffa68c5 Push conditionals inside branch expressions 2020-10-31 15:57:26 -04:00
TacoTheDank ba6c7de35a
Use AndroidX preference 2020-09-06 12:52:42 +02:00
vmazoyer 99442b6e04
Remember last selected media type for downloads. 2020-09-03 19:47:34 +02:00
wb9688 87228673b4 Use final where possible 2020-08-16 10:25:09 +02:00
Stypox 9e57195e14
Fix checkstyle issues
Also replace all tabs with 4 spaces
2020-05-21 15:39:36 +02:00
Stypox ea43b28f74
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 63bcc04eff Move things back to its original place 2020-04-02 15:57:50 +02:00
wb9688 fda5405e48 Improve code style to be more consistent 2020-04-02 15:57:50 +02:00
bopol 6be23a0a6f 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
kapodamy 42ec6f0810 ttml to srt conversion
rewrite SubtitleConverter (use JSoup library instead, remove unused methods)
2020-01-14 00:04:16 -03:00
kapodamy 8d53b07167 fixup
* [DownloadDialog.java] use *.opus extension instead of *.webm (bad change from 844f80a5f1)
* [StreamItemAdapter.java] show "opus" in format label instead of "WebM Opus"
2020-01-08 12:42:34 -03:00
Nico-late 6fb16bad85 Update app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java
Space added for more clarity

Co-Authored-By: Tobias Groza <TobiGr@users.noreply.github.com>
2019-12-31 00:52:01 +01:00
Nico-late 694813ac90 Fixed issue #2838 2019-12-31 00:52:01 +01:00
kapodamy 84ec320df4 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 763995d4c9 update DownloadDialog.java
keep *.opus extension
2019-11-26 10:46:29 -03:00
kapodamy 86dafdd92b 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 773aa1eff0 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 71f1bbdcc1
Use new Localization and Downloader implementations from extractor 2019-11-17 23:58:52 -03:00
Robin bf2a3ca043 Migrate to AndroidX 2019-10-04 14:59:08 +02:00
Christian Schabesberger 003170e6d8 add tab description and download dialog bag button 2019-09-22 13:26:53 +02:00
kapodamy 10dfcbf0b9 add manual switch in download setting fragment
switch for:
* Java I/O Api
* Storage Access Framework
2019-08-17 13:38:33 -03:00
kapodamy dee3a18ea8 misc changes
* restore permission request popup previously removed in #2486
* use legacy file picker in cases where saf file picker is not available
* fix missing file check logic in prepareSelectedDownload method (DownloadDialog.java)
2019-08-15 01:09:36 -03:00
kapodamy 950cf714d9 use legacy file picker in those cases where saf is not available 2019-08-14 22:15:42 -03:00
kapodamy 652184506b check for Storage Access Framework features
* creating files though saf
* picking folder though saf
2019-08-14 21:54:26 -03:00
kapodamy 2f66913813 drop unused popup storage permission request 2019-08-02 01:07:37 -03:00
kapodamy d9b042d9e3 socket leak fix
* fix socket leak in "DownloadRunnable"
* in "DownloadInitializer" close the HTTP body after doing range-request checks
* in "DownloadRunnableFallback" fix typo in comment
* in "DownloadDialog" fix regression, using one thread for audios instead of subtitles
2019-08-01 22:41:09 -03:00
kapodamy ac5e2e0532 bugs fixes
* fix storage warning dialogs created on invalid contexts
* implement mkdirs in StoredDirectoryHelper
2019-06-14 12:19:50 -03:00
kapodamy 7b948f83c3 Space reserving tweaks for huge video resolutions
* improve space reserving, allows write better 4K/8K video data
* do not use cache dirs in the muxers, Android can force close NewPipe if the device is running out of storage. Is a aggressive cache cleaning >:/
* (for devs) webm & mkv are the same thing
* calculate the final file size inside of the mission, instead getting from the UI
* simplify ps algorithms constructors
* [missing old commit message] simplify the loading of pending downloads
2019-06-03 18:26:26 -03:00
kapodamy 34b2b96158 Simplify the storage APIs use
* use Java I/O (classic way) on older android versions
* use Storage Access Framework on newer android versions (Android Lollipop or later)
* both changes have the external SD Card write permission
* add option to ask the save path on each download
* warn the user if the save paths are not defined, this only happens on the first NewPipe run (Android Lollipop or later)
2019-06-03 18:26:24 -03:00
kapodamy d00dc798f4 more SAF implementation
* full support for Directory API (Android Lollipop or later)
* best effort to handle any kind errors (missing file, revoked permissions, etc) and recover the download
* implemented directory choosing
* fix download database version upgrading
* misc. cleanup
* do not release permission on the old save path (if the user change the download directory) under SAF api
2019-06-03 18:18:20 -03:00
kapodamy f6b32823ba Implement Storage Access Framework
* re-work finished mission database
* re-work DownloadMission and bump it Serializable version
* keep the classic Java IO API
* SAF Tree API support on Android Lollipop or higher
* add wrapper for SAF stream opening
* implement Closeable in SharpStream to replace the dispose() method

* do required changes for this API:
** remove any file creation logic from DownloadInitializer
** make PostProcessing Serializable and reduce the number of iterations
** update all strings.xml files
** storage helpers: StoredDirectoryHelper & StoredFileHelper
** best effort to handle any kind of SAF errors/exceptions
2019-06-03 18:16:41 -03:00
kapodamy 9e34fee58c New MP4 muxer + Queue changes + Storage fixes
Main changes:
* correctly check the available space (CircularFile.java)
* misc cleanup (CircularFile.java)
* use the "Error Reporter" for non-http errors
* rewrite network state checking and add better support for API 21 (Lollipop) or higher
* implement "metered networks"
* add buttons in "Downloads" activity to start/pause all pending downloads, ignoring the queue flag or if the network is "metered"
* add workaround for VPN connections and/or network switching. Example: switching WiFi to 3G
* rewrite DataReader ¡Webm muxer is now 57% more faster!
* rewrite CircularFile, use file buffers instead of memory buffers. Less troubles in low-end devices
* fix missing offset for KaxCluster (WebMWriter.java), manifested as no thumbnails on file explorers

Download queue:
* remember queue status, unless the user pause the download (un-queue)
* semi-automatic downloads, between networks. Effective if the user create a new download or the downloads activity is starts
* allow enqueue failed downloads
* new option, queue limit, enabled by default. Used to allow one or multiple downloads at same time

Miscellaneous:
* fix crash while selecting details/error menu (mistake on MissionFragment.java)
* misc serialize changes (DownloadMission.java)
* minor UI tweaks
* allow overwrite paused downloads
* fix wrong icons for grid/list button in downloads
* add share option
* implement #2006
* correct misspelled word in strings.xml (es) (cmn)
* fix MissionAdapter crash during device shutdown

New Mp4Muxer + required changes:
* new mp4 muxer (from dash only) with this, muxing on Android 7 is possible now!!!
* re-work in SharpStream
* drop mp4 dash muxer
* misc changes: add warning in SecondaryStreamHelper.java,
* strip m4a DASH files to normal m4a format (youtube only)

Fix storage issues:
* warn to the user if is choosing a "read only" download directory (for external SD Cards), useless is rooted :)
* "write proof" allow post-processing resuming only if the device ran out of space
* implement "insufficient storage" error for downloads
2019-06-03 18:09:43 -03:00
kapodamy f2285c0b19 MP4 muxer +misc modifications
* allow retry downloads with "post-processing failed" error in the new muxer
* MPEG-4 muxer  ¡¡ no DASH output!!
* keep the progress if download fails
* remove TODO in SecondaryStreamHelper.java
* misc clean-up
* delete TestAlgo.java
* delete ExtSDDownloadFailedActivity.java and remove it from AndroidManifest.xml
* use hardcored version for changing icon colors
2019-01-22 18:53:31 -03:00
kapodamy eba3b32708 misc improvements
* don't show notifications while download activity
* proper icon in failed download notifications
* re-write list auto-refresh (MissionAdapter.java)
* improve I/O performance (CircularFile.java)
* fix implementation of "save thread position" on multi-thread downloads
2018-11-28 22:24:52 -03:00
kapodamy f3d4d4747a and more fixes
* fix content length reading
* use float overflow. Expensive, double is used instead
* fix invalid cast after click the mission body
* use a list for maximum attemps (downloads)
* minor clean up (DownloadManager.java)
* dont pass SharedPreferences instace to DownloadManager
* use a switch instead of checkbox for cross_network_downloads
* notify media scanner after deleting a finished download
2018-11-24 20:13:18 -03:00
kapodamy d647555e3a more fixes
* use bold style in status (mission_item_linear.xml)
* fix download attemps not begin updated
* dont stop the queue if a download fails
* implement partial wake-lock & wifi-lock
* show notifications for failed downloads
* ¿proper bitmap dispose? (DownloadManagerService.java)
* improve buffer filling (CircularFile.java)
* [Mp4Dash] increment reserved space from 2MiB to 15MiB. This is expensive but useful for devices with low ram
* [WebM] use 2MiB of reserved space
* fix debug warning if one thread is used
* fix wrong download speed when the activity is suspended
* Fix "Queue" menu item that appears in post-processing errors
* fix mission length dont being updated (missing commit)
2018-11-22 23:33:34 -03:00
kapodamy fef9d541ed misc fixes
* use getPreferredLocalization() instead of getLocalization()
* use lastest commit in build.gradle
* fix missing cast in MissionAdapter.java
2018-11-19 15:50:15 -03:00
kapodamy eb1f56488f resbase (08/11/2018) 2018-11-08 22:00:13 -03:00
kapodamy 5825843f68 main commit
Post-processing infrastructure
* remove interfaces with one implementation
* fix download resources with unknow length
* marquee style for ProgressDrawable
* "view details" option in mission context menu
* notification for finished downloads
* postprocessing infrastructure: sub-missions, circular file, layers for layers of abstractions for Java IO streams
* Mp4 muxing (only DASH brand)
* WebM muxing
* Captions downloading
* alert dialog for overwrite existing downloads finished or not.

Misc changes
* delete SQLiteDownloadDataSource.java
* delete DownloadMissionSQLiteHelper.java
* implement Localization from #114

Misc fixes (this branch)
* restore old mission listeners variables. Prevents registered listeners get de-referenced on low-end devices
* DownloadManagerService.checkForRunningMission() now return false if the mission has a error.
* use Intent.FLAG_ACTIVITY_NEW_TASK when launching an activity from gigaget threads (apparently it is required in old versions of android)

More changes
* proper error handling "infrastructure"
* queue instead of multiple downloads
* move serialized pending downloads (.giga files) to app data
* stop downloads when swicthing to mobile network (never works, see 2nd point)
* save the thread count for next downloads
* a lot of incoherences fixed
* delete DownloadManagerTest.java (too many changes to keep this file updated)
2018-11-08 19:00:44 -03:00
BO41 0ab86937d2 data flow issue + declaration redundancy
make final
unused methods
make final

BUILD SUCCESSFUL in 0s
39 actionable tasks: 39 up-to-date
2018-09-11 19:18:41 +02:00
Christian Schabesberger 665b9087b1 fix conflict 2018-04-08 18:49:27 +02:00
Mauricio Colli 35b3bf2edb
Show download size preview 2018-04-08 08:45:15 -03:00
Aris Poloway 676d64a24a Open download dialog if video download is clicked instead 2018-04-07 13:32:31 -04:00
Christian Schabesberger 96a327af17 made frontend combatible to latest extractor refactorings 2018-03-18 16:37:49 +01:00
Coffeemakr bb2af96deb
Use getters for extractor items 2017-12-10 11:07:51 +01:00
Mauricio Colli 146d4a8365 Update extractor and refactored NewPipe 2017-09-03 13:57:12 -03:00
Coffeemakr b0479d0bd9 Add renaming filename patterns 2017-07-24 13:01:24 +02: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