Download script?

Want to write your own code to work with a HDHomeRun or work with the HDHomeRun DVR? We are happy to help with concepts, APIs, best practices.
Post Reply
titantractor271
Posts: 54
Joined: Mon Jan 18, 2021 9:27 am

Download script?

Post by titantractor271 »

I am quickly using up my storage space on my scribes and I'd like to offload some of the recordings to another disk. How would you write such a script? Is there a batch script, Python or simple C/Java API which I can use to build some offloading code? Obviously after I offload, I'll compose a delete script. I also want to be able to pull recordings from the drive to share with Plex so I don't need to double record shows I may want to watch remotely. Any thought or suggestions s on these ideas?

titantractor271
Posts: 54
Joined: Mon Jan 18, 2021 9:27 am

Re: Download script?

Post by titantractor271 »

I might have figured this out with a few google commands, but I am still interested in others ideas or way to do this.

What I found,

1. Go to the recorded files page and copy the link of the video you want. (I know there is an API for this)

2. Run the curl command (ex: curl -o video.ts "http://192.168.254.96/recorded/play?id=6ae89d32" ) which will download the video to your system.

Obviously I need to automate this, but this is what I know so far. Any other ideas?

Online
signcarver
Expert
Posts: 9674
Joined: Wed Jan 24, 2007 1:04 am
Device ID: 10A05954 10802091 131B34B7 13231F92 1070A18E 1073ED6F 15300C36
x 28

Re: Download script?

Post by signcarver »

That's basically it but it used to be easier as they gave all the files rather than separating them by series. Also you most likely want to use recorded_files.json rather than .html to get the list.

You will also probably want to delete which will use the command url with additional parameters of cmd=delete and an optional parameter of rerecord=1

Note the first parameter is preceded by a ? while additional parameters are preceded by & and I believe the first parameter of ID is already in the given url (actually away from home so can't check)

See https://github.com/Silicondust/document ... Recordings

titantractor271
Posts: 54
Joined: Mon Jan 18, 2021 9:27 am

Re: Download script?

Post by titantractor271 »

Appreciate the replies. I used a combination of the APIs raw from Postman and the delete script in python. I was able to load a spreadsheet with an inventory of my recordings and generate a curl script to download a series. Then I used the purge script to remove everything to date. I am thinking of making an Excel macro which can load an excel sheet, but longer term writing a java program to drive the process.

BTW: Does anyone keep get flagged using this website by spamhaus??? I keep getting the message Your IP a.b.c.d has been blocked because it is blacklisted. For details please see http://www.spamhaus.org/query/bl?ip=a.b.c.d

Post Reply