I'm building an always-on download box, and it is both cool and cryptic.
My son and I may very well become roommates - if the winds blow right. So I'm doing some final tweaks on the network here before I pull up the nets to move downstream.
One of the key pieces of cleanup is to build a TV downloader. There are lots of tutorials on how to build these tools. And if you have a PC, the process is quite simple. But I wanted to build it on a Raspberry Pi. So I've spent a bunch of hours this weekend building a Raspbian Jessie image and getting all the tools I need from a variety of repos. I got most of it done last night.
But as is always the case, I always learn something new whenever I do these kinds of projects. And today was no exception. WIth a new system, I decided to build the TV/downloader using Sickrage and SABnzbd. I won't go into great deal concerning the build choices and all of the software versions. But as of this afternoon, I was stumped on a couple of items.
After loading all the apps, I fired up the device and began configuring it. And everything went well. But when I fired up a sample download, I ran into what appeared to be Linux permission problems. And if you've ever worked with Unix or Linux, you know how these kinds of challenges get solved: lots of patience, lots of time-consuming research, and a fair bit of luck.
Basically, the system would download all the pieces. But when SABnzbd went to assemble the pieces, I got what appeared to be a permissions error. So I looked online and found that lots of people had similar problems. I tried a bunch of proposed fixes to no avail. So I brought out the hammer: I switched to running the apps under root.
Unfortunately, that didn't work either. I could access the remote NAS device. But it still couldn't save the file. Since I could do all that I needed w/o root, I switched back to running under a user account.
As I wanted to rule out LAN issues, I tried to store the files on the sdcard of the Pi. Voila. Success. So the problem had something to do with the filesystem - or so I thought.
And then it dawned on me. I wonder if the problem was not the sending system or the receiving system but how the app encoded the filenames. I switched to using my NAS devices while pointing to some different names (without blanks and special characters). This was successful. So someplace between the app designer, the coder, the tester, and the user, we had a problem that needed to be solved.
I haven't logged the bug yet (though I will). But by changing the folder path (and omitting blanks), I got the test file downloaded. And I'm viewing it now. BTW, the sample file was chosen for a reason: I had a cryptic problem with little or no background. There are lots of symbols and not a lot of backstory. So my quest today is very much like the quest of Blindspot: to piece together clues and to solve a mystery.
And, as usual, I had a boatload of fun along the way!
On to Game of Thrones!