安装与配置方法
- 先在 Mac 上安装并打开 Glanceway,再使用上方的安装链接。
- 点击“安装到 Glanceway”。如果浏览器无法唤起应用,下载 .gwsrc 文件并在信息源管理中导入。
- 填写下列必填字段并保存,设置刷新间隔,等待首次成功获取。
配置检查
COUNTRY— 可选. Country for TV schedule
没有显示内容时如何排查
- 对照当前版本配置表核对字段、列表项和凭据。下方示例不包含可用的真实凭据。
- 检查网络与上游服务状态。认证失败或速率限制可能导致刷新失败,应根据上游限制调整间隔。
- 空列表也可能表示没有符合条件的条目。内容和更新时间取决于数据提供方及信息源实现。
配置项
| 名称 | 键 | 类型 | 必填 | 默认值 | 描述 |
|---|---|---|---|---|---|
| Country | COUNTRY | select | 否 | US | Country for TV schedule USGBCAAU |
源代码
id: codytseng/tvmaze-schedule
version: 1.0.0
name: TVMaze Schedule
description: Today's TV episode schedule by country
author: codytseng
author_url: https://github.com/codytseng
category: Entertainment
tags:
- tv
- schedule
- entertainment
config:
- key: COUNTRY
name: Country
type: select
required: false
default: US
description: Country for TV schedule
options:
- US
- GB
- CA
- AU id: codytseng/tvmaze-schedule
version: 1.0.0
name: TVMaze Schedule
description: Today's TV episode schedule by country
author: codytseng
author_url: https://github.com/codytseng
category: Entertainment
tags:
- tv
- schedule
- entertainment
config:
- key: COUNTRY
name: Country
type: select
required: false
default: US
description: Country for TV schedule
options:
- US
- GB
- CA
- AU module.exports = async (api) => {
const country = api.config.get("COUNTRY") || "US";
async function fetchData() {
const res = await api.fetch(
`https://api.tvmaze.com/schedule?country=${country}`,
);
if (!res.ok || !res.json) {
throw new Error(`Failed to fetch TV schedule (HTTP ${res.status})`);
}
const items = res.json.map((episode) => ({
id: String(episode.id),
title: episode.show.name,
subtitle: episode.name,
url: episode.show.url,
timestamp: episode.airstamp,
}));
api.emit(items);
}
await fetchData();
return {
refresh: fetchData,
};
}; module.exports = async (api) => {
const country = api.config.get("COUNTRY") || "US";
async function fetchData() {
const res = await api.fetch(
`https://api.tvmaze.com/schedule?country=${country}`,
);
if (!res.ok || !res.json) {
throw new Error(`Failed to fetch TV schedule (HTTP ${res.status})`);
}
const items = res.json.map((episode) => ({
id: String(episode.id),
title: episode.show.name,
subtitle: episode.name,
url: episode.show.url,
timestamp: episode.airstamp,
}));
api.emit(items);
}
await fetchData();
return {
refresh: fetchData,
};
};