-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0c129bb
commit a6acbf7
Showing
13 changed files
with
40 additions
and
51 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
...escrapsources/animesources/AnimeSource.kt → ...t/animescrap_common/source/AnimeSource.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
animeSources/src/main/java/com/talent/animescrapsources/SourceSelector.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.talent.animescrapsources | ||
|
||
import android.content.Context | ||
import com.talent.animescrap_common.source.AnimeSource | ||
import com.talent.animescrapsources.animesources.* | ||
|
||
class SourceSelector(context: Context) { | ||
private val sourceMap: Map<String, AnimeSource> = hashMapOf( | ||
"yugen" to YugenSource(), | ||
"allanime" to AllAnimeSource(), | ||
"enime" to EnimeSource(), | ||
"kiss_kh" to KissKhSource(), | ||
"animepahe" to AnimePaheSource(context), | ||
"kawaiifu" to KawaiifuSource(context), | ||
"marin_moe" to MarinMoeSource(), | ||
"asian_load" to AsianLoad(), | ||
"my_asian_tv" to MyAsianTvSource(), | ||
) | ||
|
||
fun getSelectedSource(selectedSource: String): AnimeSource { | ||
if (selectedSource in sourceMap.keys) { | ||
return sourceMap[selectedSource]!! | ||
} | ||
return sourceMap["yugen"]!! | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters