forked from tachiyomiorg/extensions-lib
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Showing
5 changed files
with
62 additions
and
3 deletions.
There are no files selected for viewing
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
6 changes: 6 additions & 0 deletions
6
library/src/main/java/eu/kanade/tachiyomi/animesource/model/UpdateStrategy.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,6 @@ | ||
package eu.kanade.tachiyomi.animesource.model | ||
|
||
enum class UpdateStrategy { | ||
ALWAYS_UPDATE, | ||
ONLY_FETCH_ONCE | ||
} |
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
19 changes: 19 additions & 0 deletions
19
library/src/main/java/eu/kanade/tachiyomi/network/JavaScriptEngine.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,19 @@ | ||
package eu.kanade.tachiyomi.network | ||
|
||
import android.content.Context | ||
|
||
/** | ||
* Util for evaluating JavaScript in sources. | ||
*/ | ||
class JavaScriptEngine(context: Context) { | ||
|
||
/** | ||
* Evaluate arbitrary JavaScript code and get the result as a primtive type | ||
* (e.g., String, Int). | ||
* | ||
* @since extensions-lib 14 | ||
* @param script JavaScript to execute. | ||
* @return Result of JavaScript code as a primitive type. | ||
*/ | ||
suspend fun <T> evaluate(script: String): T = throw Exception("Stub!") | ||
} |
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