Instance: use getInstance()
[nikiroo-utils.git] / src / be / nikiroo / fanfix / supported / SupportType.java
index 7ded3926625ccf1382989a627b39734cfa8fda9e..7ace7269397ca5f679b0ee85cff8a6e094fb4a67 100644 (file)
@@ -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,34 +35,55 @@ 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 description
+        * @return the name
         */
-       public String getDesc() {
-               String desc = Instance.getTrans().getStringX(StringId.INPUT_DESC,
-                               this.name());
-
-               if (desc == null) {
-                       desc = Instance.getTrans().getString(StringId.INPUT_DESC, this);
+       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 desc;
+               return "";
        }
 
        /**
-        * The name of this support type (a short version).
+        * A description of this support type (more information than
+        * {@link SupportType#getSourceName()}).
         * 
-        * @return the name
+        * @return the description
         */
-       public String getSourceName() {
-               BasicSupport support = BasicSupport.getSupport(this, null);
-               if (support != null) {
-                       return support.getSourceName();
+       public String getDesc() {
+               String desc = Instance.getInstance().getTrans().getStringX(StringId.INPUT_DESC, this.name());
+
+               if (desc == null) {
+                       desc = Instance.getInstance().getTrans().getString(StringId.INPUT_DESC, this);
                }
 
-               return null;
+               return desc;
        }
 
        @Override