So, the BASH downloader worked well enough for what it was. Then I decided to do some functional upgrades. It got so complex for a BASH script that I decided to make it a C# app. The whole dotnet platform is kind of the new Java, so why not roll with it? Besides, I’m getting pretty good at this dotnet on Linux thing–all my servers that I run are Linux (mostly Debian). I used to be pretty big on PHP on that platform, but as dotnet has matured that’s gone by the wayside.

The end result was pretty good, I think. Fairly simple service-layer architecture, with one service for dealing with episode management, and one for managing the metadata. I have it set up as a scheduled task that runs every four hours on my Plex box. It’s done fairly well, after ironing out the kinks over a couple weeks.

The neat little part of it was Main was as simple as:

private static async Task Main(string[] args)
    {
        var serviceProvider = ServiceConfiguration
            .AddServices()
            .BuildServiceProvider();

        using (var scope = serviceProvider.CreateScope())
        {
            var episodeProcessing = scope.ServiceProvider.GetService<IEpisodeProcessing>();
            if (episodeProcessing != null)
            {
                await episodeProcessing.ProcessEpisodes();
            }
        }
    }

Much like the BASH script, it pulls from a list that I define–though, I threw that list into a SQLite db. Still thinking about how I want to manage the list. Possibly a web app, possibly an Electron app. A web app would be pretty simple, but I’ve poked at Electron a bit and I do dig how it’s pretty much a web app in spirit. We’ll see. It’s not like I add podcasts to my list very often, so I can ponder a bit.