5 Commits

Author SHA1 Message Date
zimplexing
b48ac069e8 Support http 2025-07-04 16:30:20 +08:00
zimplexing
ae138eb4ae Support http 2025-07-04 16:05:18 +08:00
zimplexing
24bccb9227 Merge branch 'master' of github.com:zimplexing/OrionTV 2025-07-02 15:57:46 +08:00
zimplexing
fa0f37d06b Update 2025-07-02 15:56:59 +08:00
Xin
a9b501a9ff Update README.md 2025-07-02 14:20:45 +08:00
7 changed files with 14 additions and 30 deletions

View File

@@ -97,24 +97,7 @@ yarn android-tv
#### [Vercel](https://vercel.com/) 部署
1. **安装 Vercel CLI**
如果您尚未安装,请全局安装 Vercel CLI
```sh
npm install -g vercel
```
2. **部署**
进入 `backend` 目录并运行 `vercel` 命令:
```sh
cd backend
vercel
```
按照 Vercel CLI 的提示完成登录和部署过程。`vercel.json` 文件已配置好所有必要的构建和路由设置。
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fzimplexing%2FOrionTV&root-directory=backend)
#### Docker 部署
@@ -122,9 +105,11 @@ yarn android-tv
2. `docker run -d -p 3001:3001 zimpel1/tv-host`
本地部署后需要配置https才行不然会无法访问
#### 使用 demo 地址
在设置中可以使用 demo 地址: https://orion-tv.vercel.app需要代理且不保证稳定和可用性。
在设置中可以使用 demo 地址: https://orion-tv.vercel.app 需要代理且不保证稳定和可用性。
## 📜 主要脚本

View File

@@ -97,7 +97,7 @@ export default function DetailScreen() {
if (error) {
return (
<ThemedView style={styles.centered}>
<ThemedText type="subtitle">Error: {error}</ThemedText>
<ThemedText type="subtitle">{error}</ThemedText>
</ThemedView>
);
}

View File

@@ -46,6 +46,7 @@ const initialCategories: Category[] = [
{ title: "热门剧集", type: "tv", tag: "热门" },
{ title: "热门电影", type: "movie", tag: "热门" },
{ title: "豆瓣 Top250", type: "movie", tag: "top250" },
// { title: "儿童", type: "movie", tag: "儿童" },
{ title: "美剧", type: "tv", tag: "美剧" },
{ title: "韩剧", type: "tv", tag: "韩剧" },
{ title: "日剧", type: "tv", tag: "日剧" },

View File

@@ -43,7 +43,11 @@ export default function SearchScreen() {
setError(null);
try {
const response = await moonTVApi.searchVideos(keyword);
setResults(response.results);
if (response.results.length > 0) {
setResults(response.results);
} else {
setError("没有找到相关内容");
}
} catch (err) {
setError("搜索失败,请稍后重试。");
console.error("Search failed:", err);

View File

@@ -2,7 +2,7 @@
"name": "OrionTV",
"private": true,
"main": "expo-router/entry",
"version": "1.0.3",
"version": "1.0.4",
"scripts": {
"start": "EXPO_USE_METRO_WORKSPACE_ROOT=1 expo start",
"start-tv": "EXPO_TV=1 EXPO_USE_METRO_WORKSPACE_ROOT=1 expo start",
@@ -15,7 +15,7 @@
"test": "jest --watchAll",
"lint": "expo lint",
"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/*",
"build-local": "cd android && ./gradlew assembleRelease"
},

View File

@@ -17,7 +17,7 @@
<data android:scheme="https"/>
</intent>
</queries>
<application android:name=".MainApplication" android:usesCleartextTraffic="true" android:networkSecurityConfig="@xml/network_security_config" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:allowBackup="true" android:theme="@style/AppTheme" android:banner="@drawable/tv_banner">
<application android:name=".MainApplication" android:usesCleartextTraffic="true" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:allowBackup="true" android:theme="@style/AppTheme" android:banner="@drawable/tv_banner">
<meta-data android:name="expo.modules.updates.ENABLED" android:value="false"/>
<meta-data android:name="expo.modules.updates.EXPO_UPDATES_CHECK_ON_LAUNCH" android:value="ALWAYS"/>
<meta-data android:name="expo.modules.updates.EXPO_UPDATES_LAUNCH_WAIT_MS" android:value="0"/>

View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">192.168.1.100</domain>
</domain-config>
</network-security-config>