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.
This commit is contained in:
Vincent Nagel 2020-03-15 16:53:29 -05:00
parent 5f66ad2955
commit b1c310ce22
7 changed files with 92 additions and 11 deletions

View file

@ -244,6 +244,7 @@ public class MainActivity extends AppCompatActivity {
ServiceHelper.setSelectedServiceId(this, item.getItemId());
drawerItems.getMenu().getItem(ServiceHelper.getSelectedServiceId(this))
.setChecked(true);
DownloaderImpl.getInstance().updateAgeRestrictedContentCookies(getApplicationContext());
}
private void tabSelected(final MenuItem item) throws ExtractionException {