How to delete many episodes of a recorded TV show

SurLaTablo uses a regular expresion query across surlatablo’s JSON rendered as a flat string. So you can do some pretty useful things and for aggregate things, you can just make multiple calls to it.

If you have bash or other Bourne shell variant, I’ll post a script here tonight that will keep “x” episodes. With a patch to (I suppose the next beta…sigh) we can even filter out all but “x” episodes, but only delete if watched.

Or maybe I can add a new Delete transcoder or option to that transcoder that prevents delete if not watched or something like that.

Thanks @cjcox. I will look into SurLaTablo when I have more time. But out of curiosity, is the script an on demand action to do recordings clean up (e.g. delete all episodes except the most recent ‘x’)? I assume it’s not a resident program that monitors and gets triggered automatically whenever ‘x’ is reached. Am I correct?

It’s not a service, but certainly could be wrappered to be service-like or scheduled to run at certain times.

1 Like

Not sure if this’ll be helpful for your setup, but TabloRipper runs as a service and will delete all episodes except the most recent ‘x’.

Not as good as having it built into your Tablo, but it’ll accomplish the task until Nuvyyo gets around to adding it.

PS: If you don’t actually need it to “rip” anything, you can set the selection filter to something that’s never matched (e.g. “DO-NOT-RIP”). Then it’ll just delete your extra episodes for you.

Thanks @CycleJ. Is it possible to have different settings for different schedules using the TabloRipper? For example, my “News at 9” will keep only 2 episodes, while others may keep 5, or no limit. Is that possible with TabloRipper?

Also, how often does TabloRipper poll Tablo to check the number of episodes? Once per day?

I went simple to start. “X” is up to you, but it’s the same value for each show you add to the list. Or, you can tell it to limit all shows by entering an asterisk for the matching criteria.

The background service is like any other windows service - it runs all the time (very, very low overhead). But you get to specify a time range that it’ll actually wake up and “do something” (e.g. 1-2AM).

1 Like  -q . -Q '${series}' -s series | sort -u  |
while read series;do
  echo  "Deletions I would do for $series" -n -q series~="$series" -Q '${rec_id}' -s '-friendly_title' |
    sed -n '5,$p' | xargs -n1 -i -n -q rec_id~="{}" -Q '${friendly_title}' 

Now that sorts the episodes based on friendly_title. You might want to change the -s '-friendly_title' to -s '-lair_date' in case you want to keep the last so many by air date. The sed -n '5,$p' determines what gets deleted, in the case the 5th recorded episode and older (you are keeping 4). What I just typed above doesn’t actually delete anything. Do do that you’d adjust the last invocation to include -c Delete (or -c DeleteX).

Is something like this possible in Windows 10? Microsoft says “yes”. But I’m not so sure.

As I mentioned before, surlatablo doesn’t check for watched or not. Might be something to add.

1 Like