Don't store sources domain in database

This commit is contained in:
inorichi
2015-11-30 13:07:57 +01:00
parent a05cc934d0
commit 8bda39ee26
9 changed files with 140 additions and 112 deletions
@@ -4,6 +4,7 @@ import com.pushtorefresh.storio.sqlite.annotations.StorIOSQLiteColumn;
import com.pushtorefresh.storio.sqlite.annotations.StorIOSQLiteType;
import eu.kanade.mangafeed.data.database.tables.ChapterTable;
import eu.kanade.mangafeed.util.UrlUtil;
@StorIOSQLiteType(table = ChapterTable.TABLE)
public class Chapter {
@@ -44,6 +45,10 @@ public class Chapter {
public Chapter() {}
public void setUrl(String url) {
this.url = UrlUtil.getPath(url);
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
@@ -4,6 +4,7 @@ import com.pushtorefresh.storio.sqlite.annotations.StorIOSQLiteColumn;
import com.pushtorefresh.storio.sqlite.annotations.StorIOSQLiteType;
import eu.kanade.mangafeed.data.database.tables.MangaTable;
import eu.kanade.mangafeed.util.UrlUtil;
@StorIOSQLiteType(table = MangaTable.TABLE)
public class Manga {
@@ -57,6 +58,10 @@ public class Manga {
public Manga() {}
public void setUrl(String url) {
this.url = UrlUtil.getPath(url);
}
public static void copyFromNetwork(Manga local, Manga network) {
if (network.title != null)
local.title = network.title;