First episodes of classic (80's, 90's) TV series

Categories == Series
EpisodeNumber == 1
SeasonNumber == 1
OriginalDate > 1979-12-31
OriginalDate < 1990-01-01

Add 10 to the years for the 90's shows.

I figure that if a channel airs the first episode of a series, it most likely intends to air the whole series over time.
I check every day to see if new recordings are scheduled. If I see a series that I like, I create a pass for it.

Good opportunity to collect your own copies of classic series.


This is great. Thanks for the inspiration!


I was disappointed that this pass only provides results for the next day (or less). Actually, I saw quite a few cases of anomalous behavior (or limits on the size of the result set) while playing around with variants of the pass.

But that inspired me to figure out how to dump all of the guide data into PowerShell. From there I found out that Decades is running marathons of "Police Squad!" and "Sledge Hammer" the weekend of June 5th.

So, thanks for that. My DVR will be busy that weekend.

1 Like

Cool, I'm glad that this pass was helpful to some extent. :slightly_smiling_face:

Google tells me that PowerShell is a task automation tool on Windows. I'm interested to know how you use it with guide data and for what purpose. I am intrigued. Can you please give more details? :slightly_smiling_face:

Back when I was working for a living, I was something of a PowerShell-aholic. Whenever I want to do some ad-hoc data manipulation, it tends to be my tool of choice. It's more than a "task automation tool". It's a tool for manipulating objects and streams/collections of objects. It's also a good way to play around with .Net.

This will define a function that can be used to fetch the guide data:

function Get-CdvrGuideData(
    $sw = [System.Diagnostics.Stopwatch]::StartNew()

    $unixEpoch = [datetime]::SpecifyKind('1/1/1970', 'UTC')

    $startTime = [long]($Start.ToUniversalTime() - $unixEpoch).TotalSeconds
    $duration = $Days * 86400

    $uri = 'http://{0}:8089/devices/{1}/guide?time={2}&duration={3}' -f $Server,$Provider,$startTime,$duration

    (Invoke-RestMethod -Method Get -Uri $uri).Airings | % {
        $_ | Add-Member NoteProperty ChannelNum ([decimal]$_.Channel)
        $_ | Add-Member NoteProperty StartTime ($unixEpoch.AddSeconds($_.Time).ToLocalTime())
    } | sort Time,ChannelNum

    Write-Verbose ('Elapsed: ' + $sw.Elapsed.ToString())

Use the -Server option to specify the name or IP address of the DVR server if it is running on a different computer.

Use the -Start and/or -Days options if you don't want to fetch all of the guide data.

This command will fetch the guide data and store it in a variable named $guideData. It will take a couple of minutes to get all of the guide data.

$guideData = Get-CdvrGuideData

This command will filter the first-episodes and store the result in a variable named $firstEpisodes.

$firstEpisodes = $guideData | ? { $_.SeasonNumber -eq 1 -and $_.EpisodeNumber -eq 1 }

This command will display the results in a grid view. ("ogv" is an abbreviation for Output-GridView.) You can do additional filtering in the grid view.

$firstEpisodes | ogv

Very nice.
I'm a software engineer but must admit that I have never done anything with PowerShell. My main experience is with C and Python, and a little bit of C++.

Thank you for sharing this piece of code.
Now, I'm very interested in playing with PowerShell. :slightly_smiling_face: