Commit Graph

90 Commits

Author SHA1 Message Date
Stypox cfdcb92fa3
Always use our strings, not android ones 2021-08-30 16:37:01 +02:00
Stypox 039bd5d413
Rename string finish to ok, as its content was "OK" 2021-08-30 16:36:57 +02:00
Tobi 0787d62254
Merge pull request #6820 from Stypox/picker-mime-type
Provide mime type to file picker to gray out unselectable files
2021-08-26 21:39:35 +02:00
Stypox 1d33e7ab49
Allow choosing which types of search suggestions to show
local, remote, both, none
Replacing the old on-off setting
2021-08-24 18:16:16 +02:00
Stypox fcef783bbb
Replace UniversalImageLoader with Picasso 2021-08-24 10:56:25 +02:00
Stypox 32dffb577c
Provide mime type to file picker to gray out unselectable files 2021-08-01 13:52:32 +02:00
XiangRongLin 785c0376f8 Remove variable ContentSettingsFragment.lastImportExportDataUri
Instead pass the value through the methods as parameter
2021-06-20 09:30:59 +02:00
XiangRongLin 0bdf8de38e Resolve sonar issues in ContentSettingsFragment
https://sonarcloud.io/organizations/teamnewpipe/rules?open=java%3AS2885&rule_key=java%3AS2885

https://sonarcloud.io/organizations/teamnewpipe/rules?open=java%3AS112&rule_key=java%3AS112
2021-06-20 09:30:59 +02:00
XiangRongLin 9767e98e50 Remove option to immediately commit pref changes on import
System is now not restarted with `System.exit(0)`.
Instead it is done properly by finishing the activity and restarting the activity. This allows preference changes which are queued up asynchronously through `apply` to be applied.
2021-06-20 09:17:55 +02:00
Stypox 74ad488f4a
Merge pull request #6394 from TacoTheDank/androidx-fragment-134
Update AndroidX Fragment to 1.3.4
2021-06-18 13:14:30 +02:00
danielmbutler 90de75968d Replaced System.Exit calls with FinishAffinity and Start Activity calls
Implemented "RestartApp" method defined in NavigationHelper.java.
 This method is used in ExitActivity.java and ContentSettingsFragment.java
2021-06-17 17:18:15 +01:00
TacoTheDank aa4e5da146 Fix onActivityResult deprecation in ContentSettingsFragment 2021-06-15 22:08:55 -04:00
Stypox 2a99e0e435
Reimplement storing backup import/export path
#6319 and #6402 were reverted before adding SAF changes, and have been readded at the end of SAF changes
2021-06-08 10:41:24 +02:00
Stypox 114dc8ffa0
Pass mime type so that SAF treats file extension correctly 2021-06-08 10:40:45 +02:00
wb9688 febb21a01d
Fix non-SAF actions 2021-06-08 10:40:44 +02:00
wb9688 cb4e6159c4
Use file picker for export DB 2021-06-08 10:40:44 +02:00
wb9688 1164ea52f9
Move Stored(File|Directory)Helper into NewPipe 2021-06-08 10:40:44 +02:00
wb9688 0f75024e03
Support SAF properly 2021-06-08 10:40:44 +02:00
Stypox 1e09a1768e
Revert all commits related to ContentSettingsFragment
Revert "Annotate methode parameters as NonNull"
This reverts commit 004907d306.

Revert "Commit path immediately when import backup"
This reverts commit 05eb0d0fbe.

Revert "Set ImportExportDataPath only on successful import"
This reverts commit f13a1b04e6.

Revert "Set ImportExportDataPath only on successful export"
This reverts commit fd4408e572.

Revert "Invert if condition in ContentSettingsFragment.setImportExportDataPath for better readability"
This reverts commit 92ab9cae27.

Revert "Move ContentSettingsFragment.isValidPath to helpers and add unit test for it."
This reverts commit fa2b11b768.

Revert "Save backup import/export location for feature import/exports"
This reverts commit 82f43ac6a6.

Remove FilePathHelperTest file
2021-06-08 10:40:44 +02:00
XiangRongLin 004907d306 Annotate methode parameters as NonNull 2021-05-31 15:09:57 +02:00
XiangRongLin 05eb0d0fbe Commit path immediately when import backup 2021-05-31 12:40:14 +02:00
XiangRongLin f13a1b04e6 Set ImportExportDataPath only on successful import
Also set the folder instead of the file itself as path
2021-05-31 12:38:21 +02:00
XiangRongLin fd4408e572 Set ImportExportDataPath only on successful export 2021-05-31 12:36:21 +02:00
Alireza Tofighi 92ab9cae27 Invert if condition in ContentSettingsFragment.setImportExportDataPath for better readability 2021-05-21 20:24:57 +04:30
Alireza Tofighi fa2b11b768 Move ContentSettingsFragment.isValidPath to helpers and add unit test for it. 2021-05-21 20:21:58 +04:30
Alireza Tofighi 82f43ac6a6 Save backup import/export location for feature import/exports 2021-05-17 21:57:27 +04:30
TacoTheDank e75d0de135 Migrate rest of AlertDialogs to AppCompat 2021-04-04 10:26:38 -04:00
TacoTheDank a83106f717 Clean up unnecessary onCreate in settings fragments 2021-03-22 16:38:36 -04:00
Stypox 463dd8ea74
Completely remove return activity, now outdated 2021-03-12 23:21:54 +01:00
Stypox c43bca6007
Add report/solve-recaptcha button in error panel
It will be shown even when nothing could be loaded not due to a network error, and the user can choose to ignore or report it.

Also improve error reporting arguments
Also completely refactor error activity
Also improve some code here and there
2021-03-12 23:21:49 +01:00
Stypox 553b80164b
Move all error-related classes into error package 2021-03-07 17:49:28 +01:00
XiangRongLin af119db1d7 Extract settings file deletion 2021-01-03 20:32:16 +01:00
XiangRongLin 122e80fae9 Remove subclasses from ContentSettingsManagerTest
ExportTest provides no value.
ImportTest creates temporary files even if not needed.
2021-01-03 20:32:16 +01:00
XiangRongLin 19cd3a17df Move isValidZipFile to ZipHelper 2021-01-03 20:32:16 +01:00
XiangRongLin cef791ba1b Introduce NewPipeFileLocator class
It handles locating specific NewPipe files based on the home directory of the app.
2021-01-03 20:32:16 +01:00
XiangRongLin f78a7fa630 Extract import database logic in ContentSettingsManager 2021-01-03 20:32:16 +01:00
Stypox d46c7eb8fe
Merge pull request #5059 from XiangRongLin/content_settings_manager
Extract export database logic into own class
2020-12-15 10:34:32 +01:00
Isira Seneviratne 30613b7064 Use ContextCompat.getDataDir(). 2020-12-15 08:02:25 +05:30
XiangRongLin f7f00293cc Extract export database logic into own class
- Separate it from the UI.
- Add happy path unit test.
2020-12-04 18:30:29 +01:00
Isira Seneviratne 95333d37c8 Use try-with-resources. 2020-11-21 13:47:13 +05:30
Isira Seneviratne 340b92e32b Convert ErrorInfo to Kotlin and use the Parcelize annotation. 2020-11-21 12:47:35 +05:30
TacoTheDank 2669ba944d Correct some other small lints 2020-11-19 18:54:27 -05:00
wb9688 2c23678fb9 Add button in settings to clear reCAPTCHA cookies 2020-10-14 14:39:08 +02:00
TacoTheDank ba6c7de35a
Use AndroidX preference 2020-09-06 12:52:42 +02:00
wb9688 87228673b4 Use final where possible 2020-08-16 10:25:09 +02:00
Vincent Nagel f60cce54ea rename setting to "YouTube restricted mode" 2020-04-20 21:47:32 -05:00
Vincent Nagel 63087a4311 renamed to "restricted mode" 2020-04-20 21:46:40 -05:00
Vincent Nagel e33cdca1ef added logging when context null in onPrefTreeClick 2020-04-20 21:45:32 -05:00
Vincent Nagel 430d4e1ccd ageRestrictedContent cookie only sent for youtube
Now the age restricted content cookie is only sent when sending a
request to youtube. There's no need to remove the cookie when the
service changes because whether to add the cookie is determined by
looking at the url the request is being sent to.
2020-04-20 21:45:32 -05:00
Vincent Nagel de4d6037d3 ageRestrictedContent first draft
Cookie updated whenever ageRestrictedContent setting is changed or
service is changed. Right now there is only a cookie for youtube, but
cookies for other services could be added in the future.

Problems with this approach: Even when the service is set to youtube,
the downloader doesn't only request youtube urls e.g. it also sends
reqeusts to i.ytimg.com, suggestqueries.google.com, and yt3.ggpht.com.
The ageRestrictedContent cookie is not normally sent when sending
requests to these other urls, so doing so might have unknown effects.
2020-04-20 21:45:32 -05:00