Glanceway Glanceway
Toutes les sources

TVMaze Schedule

Divertissement v1.0.0

Today's TV episode schedule by country

@codytseng #tv #schedule #entertainment

Install and configure this source

  1. Install Glanceway and open it on your Mac before using the install link above.
  2. Choose Install in Glanceway. If the browser cannot open the app, download the .gwsrc file and import it through source management.
  3. Complete the required fields below, save, and choose a refresh interval. Check the source after its first successful fetch.

Configuration checklist

  • COUNTRY — Optional. Country for TV schedule

If items are missing

  • Verify the field names, list entries, and credentials against the current version’s configuration table. Sample values below are examples, not active credentials.
  • Check network access and upstream service availability. Authentication failures and rate limits can prevent a refresh; use a slower interval when the provider limits requests.
  • An empty result can also mean there are no matching items. Fetched content and update timing depend on the provider and source implementation.

Configuration

Nom Clé Type Requis Défaut Description
Country COUNTRY select Non US Country for TV schedule
USGBCAAU

Code source

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,
  };
};

Sources similaires