X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;ds=sidebyside;f=src%2Fbe%2Fnikiroo%2Ffanfix%2Fsupported%2FSupportType.java;h=0df30f268a7c09b8656d4e3b5c78d628e565be39;hb=413bcc29038d9c46c785142332839d41fd3c10e6;hp=7ded3926625ccf1382989a627b39734cfa8fda9e;hpb=af1f506fb4bb7265645e34cd03c6c7178d6a4da7;p=nikiroo-utils.git diff --git a/src/be/nikiroo/fanfix/supported/SupportType.java b/src/be/nikiroo/fanfix/supported/SupportType.java index 7ded392..0df30f2 100644 --- a/src/be/nikiroo/fanfix/supported/SupportType.java +++ b/src/be/nikiroo/fanfix/supported/SupportType.java @@ -20,7 +20,7 @@ public enum SupportType { /** Fanfictions from a lot of different universes */ FANFICTION, /** Website with lots of Mangas */ - MANGAFOX, + MANGAHUB, /** Furry website with comics support */ E621, /** Furry website with stories */ @@ -35,8 +35,44 @@ public enum SupportType { HTML; /** - * A description of this support type (more information than the - * {@link BasicSupport#getSourceName()}). + * The name of this support type (a short version). + * + * @return the name + */ + public String getSourceName() { + switch (this) { + case CBZ: + return "cbz"; + case E621: + return "e621.net"; + case E_HENTAI: + return "e-hentai.org"; + case EPUB: + return "epub"; + case FANFICTION: + return "Fanfiction.net"; + case FIMFICTION: + return "FimFiction.net"; + case HTML: + return "html"; + case INFO_TEXT: + return "info-text"; + case MANGA_LEL: + return "MangaLEL"; + case MANGAHUB: + return "MangaHub.io"; + case TEXT: + return "text"; + case YIFFSTAR: + return "YiffStar"; + } + + return ""; + } + + /** + * A description of this support type (more information than + * {@link SupportType#getSourceName()}). * * @return the description */ @@ -51,20 +87,6 @@ public enum SupportType { return desc; } - /** - * The name of this support type (a short version). - * - * @return the name - */ - public String getSourceName() { - BasicSupport support = BasicSupport.getSupport(this, null); - if (support != null) { - return support.getSourceName(); - } - - return null; - } - @Override public String toString() { return super.toString().toLowerCase();