Add migration step for model URLs, which contain spaces
This commit is contained in:
parent
2f1ef7854a
commit
26071d59eb
|
@ -1,6 +1,8 @@
|
|||
5.2.3
|
||||
========================
|
||||
* Fix one directory per group
|
||||
* Add Stripchat tags thx to @winkru
|
||||
* Fix: Loading the config failed with model URLs, which contained spaces
|
||||
|
||||
5.2.2
|
||||
========================
|
||||
|
|
|
@ -8,8 +8,12 @@ public class MigrateModel5_1_2 {
|
|||
|
||||
private static final String MARKED_FOR_LATER = "markedForLater";
|
||||
private static final String ADDED_TIMESTAMP = "addedTimestamp";
|
||||
private static final String URL = "url";
|
||||
|
||||
public static void migrate(JSONObject model) {
|
||||
if (model.has(URL)) {
|
||||
model.put(URL, model.getString(URL).replace(" ", "%20"));
|
||||
}
|
||||
if (model.has(MARKED_FOR_LATER)) {
|
||||
model.put("bookmarked", model.getBoolean(MARKED_FOR_LATER));
|
||||
model.remove(MARKED_FOR_LATER);
|
||||
|
|
Loading…
Reference in New Issue