安裝與設定方式
- 先在 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,
};
};