Commit Graph

113 Commits

Author SHA1 Message Date
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
Robin 4d80bdcc9f Update ExoPlayer to 2.9.6, including httook dependency and deprecations 2019-03-05 18:05:44 +01: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 98c65fb9b7 add more debug statements to BasePlayer 2018-08-27 16:37:21 +02:00
Christian Schabesberger 44a71d8565 add reset extSD card folder dialog 2018-08-27 16:37:21 +02:00
Andrei.Rosca 8b8652d44c undo delete - code format 2018-06-15 16:15:55 +02:00
Andrei.Rosca 09dd044f3d undo delete 2018-06-13 09:07:57 +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 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
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 8b67f1358d Implement no-audio icon 2017-05-15 00:57:57 -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
Christian Schabesberger 4cdf20ab8c fix differences 2017-02-27 19:21:41 +01:00
59436419 d17496f720 Improved code for changing theme 2017-02-27 17:25:15 +05:30
Christian Schabesberger c28fddc4dd did some finetuning 2017-02-19 16:07:45 +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 5d81358c15 rename Themer to ThemableActivity 2017-01-22 13:48:50 +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
59436419 60dc19d2bc Added Dark Theme 2017-01-17 16:13:14 +05:30
59436419 68e80e6054 Added dark theme 2017-01-17 16:13:01 +05:30
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
Christian Schabesberger 6e523d37ba add copyright notice to DownloadListener 2016-12-25 15:24:37 +01:00
fr3ts0n 5bba8e02a6 add media scanner notification after successful download 2016-11-06 21:08:57 +01:00
Christian Schabesberger f9ac199c1f fixed .webm download locatiion issue 2016-09-27 21:33:26 +02:00
Christian Schabesberger 2b89e24a4b make download dialog use radio button 2016-09-26 20:18:32 +02:00
Christian Schabesberger efd2ac353e fix WORLD_MODE_READABLE bug
blub
2016-09-14 11:29:40 +02:00
Christian Schabesberger a2a3b0575d gather all bug shit things 2016-09-13 23:39:32 +02:00
Christian Schabesberger 6944f4a68a add copyright headers and update sdk 2016-09-12 00:33:11 +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 6beb36f92f get channel banner 2016-08-01 01:56:19 +02:00
Faisal Hameed 404017cba3 Fixing squid:S1192 - String literals should not be duplicated. 2016-06-24 14:54:18 +05: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 239ef1c238 add action for downloads menu item 2016-05-25 22:34:36 +02:00
Christian Schabesberger 6f6c1704d4 add downloads menu item 2016-05-24 14:06:49 +02:00
David affce74b84 Added menu to download activity 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
Christian Schabesberger c05d9303a9 fixed download location 2016-03-25 19:01:22 +01:00