X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2Fsupported%2FSupportType.java;h=37c03bffbd3f8b15c2ba837583185187b09f923e;hb=727108fef9dcc661d45fa69ebf8b76f5128a2b6f;hp=2c92562993b45d8b07e501baf94b3da1b7f167d3;hpb=0ffa47548f474c1330d8d723300d9aa7a4894736;p=fanfix.git diff --git a/src/be/nikiroo/fanfix/supported/SupportType.java b/src/be/nikiroo/fanfix/supported/SupportType.java index 2c92562..37c03bf 100644 --- a/src/be/nikiroo/fanfix/supported/SupportType.java +++ b/src/be/nikiroo/fanfix/supported/SupportType.java @@ -27,14 +27,52 @@ public enum SupportType { YIFFSTAR, /** Comics and images groups, mostly but not only NSFW */ E_HENTAI, + /** Website with lots of Mangas, in French */ + MANGA_LEL, /** CBZ files */ CBZ, /** HTML files */ 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.com"; + case MANGAFOX: + return "MangaFox.me"; + case TEXT: + return "text"; + case YIFFSTAR: + return "YiffStar"; + } + + return ""; + } + + /** + * A description of this support type (more information than + * {@link SupportType#getSourceName()}). * * @return the description */ @@ -49,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();