I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Unverified Commit d5a49959 authored by zzz's avatar zzz
Browse files

Update: Make backup news URL configurable (see gitlab MR !33)

parent 41c8f6d0
No related branches found
No related tags found
No related merge requests found
......@@ -25,7 +25,7 @@ class NewsHandler extends UpdateHandler implements Checker {
* NOTE: If you change, also change in Android:
* app/src/main/java/net/i2p/android/apps/NewsFetcher.java
*
* @since 0.7.14 not configurable
* @since 0.7.14, configurable since 0.9.51
*/
// psi.i2p
//private static final String BACKUP_NEWS_URL = "http://avviiexdngd32ccoy4kuckvc3mkf53ycvzbz6vz75vzhv4tbpk5a.b32.i2p/news.xml";
......@@ -35,7 +35,8 @@ class NewsHandler extends UpdateHandler implements Checker {
//private static final String BACKUP_NEWS_URL_SU3 = "http://ivk5a6wfjar6hjucjmnbcea5inwmwg5b3hsv72x77xwyhbeaajja.b32.i2p/news/news.su3";
// idk
private static final String BACKUP_NEWS_URL = "http://dn3tvalnjz432qkqsvpfdqrwpqkw3ye4n4i2uyfr4jexvo3sp5ka.b32.i2p/news/news.atom.xml";
private static final String BACKUP_NEWS_URL_SU3 = "http://dn3tvalnjz432qkqsvpfdqrwpqkw3ye4n4i2uyfr4jexvo3sp5ka.b32.i2p/news/news.su3";
private static final String DEFAULT_BACKUP_NEWS_URL_SU3 = "http://dn3tvalnjz432qkqsvpfdqrwpqkw3ye4n4i2uyfr4jexvo3sp5ka.b32.i2p/news/news.su3";
private static final String PROP_BACKUP_NEWS_URL_SU3 = "router.backupNewsURL";
public NewsHandler(RouterContext ctx, ConsoleUpdateManager mgr) {
super(ctx, mgr);
......@@ -58,7 +59,7 @@ class NewsHandler extends UpdateHandler implements Checker {
} catch (URISyntaxException use) {}
try {
//updateSources.add(new URI(BACKUP_NEWS_URL));
updateSources.add(new URI(BACKUP_NEWS_URL_SU3));
updateSources.add(new URI(_context.getProperty(PROP_BACKUP_NEWS_URL_SU3, DEFAULT_BACKUP_NEWS_URL_SU3)));
} catch (URISyntaxException use) {}
UpdateRunner update = new NewsFetcher(_context, _mgr, updateSources);
return update;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment