mirror of
https://github.com/zimplexing/OrionTV.git
synced 2026-03-07 03:07:29 +08:00
Support http
This commit is contained in:
@@ -97,7 +97,7 @@ export default function DetailScreen() {
|
|||||||
if (error) {
|
if (error) {
|
||||||
return (
|
return (
|
||||||
<ThemedView style={styles.centered}>
|
<ThemedView style={styles.centered}>
|
||||||
<ThemedText type="subtitle">Error: {error}</ThemedText>
|
<ThemedText type="subtitle">{error}</ThemedText>
|
||||||
</ThemedView>
|
</ThemedView>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ const initialCategories: Category[] = [
|
|||||||
{ title: "热门剧集", type: "tv", tag: "热门" },
|
{ title: "热门剧集", type: "tv", tag: "热门" },
|
||||||
{ title: "热门电影", type: "movie", tag: "热门" },
|
{ title: "热门电影", type: "movie", tag: "热门" },
|
||||||
{ title: "豆瓣 Top250", type: "movie", tag: "top250" },
|
{ title: "豆瓣 Top250", type: "movie", tag: "top250" },
|
||||||
|
// { title: "儿童", type: "movie", tag: "儿童" },
|
||||||
{ title: "美剧", type: "tv", tag: "美剧" },
|
{ title: "美剧", type: "tv", tag: "美剧" },
|
||||||
{ title: "韩剧", type: "tv", tag: "韩剧" },
|
{ title: "韩剧", type: "tv", tag: "韩剧" },
|
||||||
{ title: "日剧", type: "tv", tag: "日剧" },
|
{ title: "日剧", type: "tv", tag: "日剧" },
|
||||||
|
|||||||
@@ -43,7 +43,11 @@ export default function SearchScreen() {
|
|||||||
setError(null);
|
setError(null);
|
||||||
try {
|
try {
|
||||||
const response = await moonTVApi.searchVideos(keyword);
|
const response = await moonTVApi.searchVideos(keyword);
|
||||||
setResults(response.results);
|
if (response.results.length > 0) {
|
||||||
|
setResults(response.results);
|
||||||
|
} else {
|
||||||
|
setError("没有找到相关内容");
|
||||||
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
setError("搜索失败,请稍后重试。");
|
setError("搜索失败,请稍后重试。");
|
||||||
console.error("Search failed:", err);
|
console.error("Search failed:", err);
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
"test": "jest --watchAll",
|
"test": "jest --watchAll",
|
||||||
"lint": "expo lint",
|
"lint": "expo lint",
|
||||||
"prebuild": "EXPO_USE_METRO_WORKSPACE_ROOT=1 expo prebuild --clean",
|
"prebuild": "EXPO_USE_METRO_WORKSPACE_ROOT=1 expo prebuild --clean",
|
||||||
"prebuild-tv": "EXPO_TV=1 EXPO_USE_METRO_WORKSPACE_ROOT=1 expo prebuild --clean",
|
"prebuild-tv": "EXPO_TV=1 EXPO_USE_METRO_WORKSPACE_ROOT=1 expo prebuild --clean && yarn copy-config",
|
||||||
"copy-config": "cp -r xml/* android/app/src/*",
|
"copy-config": "cp -r xml/* android/app/src/*",
|
||||||
"build-local": "cd android && ./gradlew assembleRelease"
|
"build-local": "cd android && ./gradlew assembleRelease"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user