@@ -10,6 +10,10 @@ export const config = {
|
||||
process.env.TIMESPAN ||
|
||||
process.argv.find((arg) => arg.startsWith("--timespan="))?.split("=")[1] ||
|
||||
"3",
|
||||
country:
|
||||
process.env.COUNTRY ||
|
||||
process.argv.find((arg) => arg.startsWith("--country="))?.split("=")[1] ||
|
||||
"USA",
|
||||
postalCode:
|
||||
process.env.POSTAL_CODE ||
|
||||
process.argv
|
||||
|
||||
@@ -12,7 +12,8 @@ Options:
|
||||
--help Show this help message
|
||||
--lineupId=ID Lineup ID (default: USA-lineupId-DEFAULT)
|
||||
--timespan=NUM Timespan in hours (default: 3)
|
||||
--pref=LIST User preferences, comma separated. Can be m, p, and h (default: empty)
|
||||
--pref=LIST User preferences, comma separated. Can be m, p, and h (default: empty)'
|
||||
--country=CON Country code (default: USA)
|
||||
--postalCode=ZIP Postal code (default: 30309)
|
||||
--userAgent=UA Custom user agent string (default: Uses random if not specified)
|
||||
--timezone=TZ Timezone (default: America/New_York)
|
||||
|
||||
@@ -83,7 +83,7 @@ function buildUrl() {
|
||||
lineupId: config.lineupId,
|
||||
timespan: config.timespan,
|
||||
headendId: "lineupId",
|
||||
country: "USA",
|
||||
country: config.country,
|
||||
timezone: config.timezone,
|
||||
postalCode: config.postalCode,
|
||||
isOverride: "true",
|
||||
@@ -109,7 +109,7 @@ export async function getTVListings(): Promise<GridApiResponse> {
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error(
|
||||
`Failed to fetch: ${response.status} ${response.statusText}`,
|
||||
`Failed to fetch: ${response.status} ${response.statusText}`
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user