API/interface to pull recorded show listings, metadata, and files off of the Tablo


#424

Hey Buddy - 3.31 is past the chasm that glitched with 3.30.
3.30 is still running, after 2 restarts, since goofing up on 2 shows.
Again, 3.31 is still going strong !
I have to go to bed now, but I’ll probably wake up and wonder about this …
Oh, and I’m running on a new 4TB drive, so I’ve got plenty of room ( for now ).


#425

Thanks @jskenney!


#426

3.30 has puked, but 3.31 is still going :smile:


#427

Version 3.33 posted!

ADDED: Full unicode support
ADDED: progress bar and cleaner interface when not in debug mode
ADDED: search system is regular expressions based (you can still just provide strings if you want)

Cleaned up code so that it should be both Python3 and Python2 safe.

Hope that helps, I think I am done for this weeks code-a-thon. Drop a note if there are any issues.


#428

Thanks again ! I’m still downloading on 3.31, so I think I will wait for that to finish before trying 3.33. This is because I am hoping that the same database can be used. That way, I don’t have to do a full download of my 500GB Tablo drive to my new offline one.


#429

Oh, and it looks like you forgot to post it …


#430

Sorry about that, version 3.33 is now on the site. Hopefully this version will be stable for a while. Let me know if you have any issues.


#431

3.31 finally finished successfully. However, it doesn’t treat shows that don’t have Season/Episode information as well as the old version 2 did. It calls it S00E00, and only 1 of the shows can be downloaded. The old v2 would append the date so that multiple episodes could be downloaded. Johnny Carson is an example. An exception to this is where there is also an episode name, then there WILL be multiple episodes with S00E00, but with the episode name appended. I don’t know that I like my description, but I hope it makes sense :slight_smile:

I tried 3.33, but it errors -

[kkoceski@E4300_XFCE tablo2go_3.33]$ python tablo2go-3.33_500GB.py
192.168.0.101 - Found Tablo - unk-name (unk-type)
Percent: [##########] 100% Loading Series Metadata Done…
Percent: [##########] 100% Loading Episode Metadata Done…

192.168.0.101 - 33536 - 2016-01-24 14:00Z - EP000191281244 - Downloading - ./TV/CBS News Sunday Morning/CBS News Sunday Morning - S00E00
Traceback (most recent call last):
File “tablo2go-3.33_500GB.py”, line 609, in
elif (get_video(QUEUE[TABLO_IP][airing_num][‘m3u8’], QUEUE[TABLO_IP][airing_num][‘build’])):
File “tablo2go-3.33_500GB.py”, line 313, in get_video
if line != ‘’ and line.find(“b’#”) != 0 and line.find(’#’) != 0:
TypeError: a bytes-like object is required, not ‘str’
[kkoceski@E4300_XFCE tablo2go_3.33]$

Edit ( 12:38 ) :
Having noticed that this errors on a S00E00 episode, I deleted this from the Tablo and ran 3.33 again with the same result, but different show that does have proper Season/Episode info.


#432

The error looks like I missed a place when I was trying to make this work in python2 (I moved to python3 with the newest version but have been trying to keep it compatible).

I have completely forgotten what I had version 2 do, its been so long now, Is there a requested format for when no metadata is available?


#433

Gosh, you are so obliging. Thanks !
I’m going to request that if S00E00 comes up, that you add ( or replace S00E00 ) with the date stamp of when this show was recorded by the Tablo. The time stamp might also be necessary for multiple shows that are recorded on the same day.


#434

Hi Jeffrey,

Could you add a command line option to manually specify the tablo’s IP, please? I’m the guy who’s tablo2go box is behind a VPN router and the automated method doesn’t work. I changed the code you identified a while back but something else breaks down the line in 3.33. Ideally I’d like to just download your most recent versions, point a symlink to it and not have to touch any of the code.

/net/ds411/volume1/video/Tools$ ./t2go.sh
192.168.1.20 - Found Tablo - unk-name (unk-type)
Traceback (most recent call last):
File “/net/ds411/volume1/video/Tools/t2go”, line 555, in
if found_tablos != []:
NameError: name ‘found_tablos’ is not defined

Thanks!


#435

Hi Jeffrey. I’ve been using v3.08 since it released, but ran into a new issue today when trying to download last night’s Late Show With Stephen Colbert. In the metadata, the title includes double quotes in one of the guest names (Jeff “The Bear Man” Watson), which faults the Python script. I’m guessing the quotes need to be escaped, but my Python powers are too feeble to fix it. I pulled down 3.33 and it also reproduces with the same issue. Here is the output…

[chuck]$ python tablo2go-3.33.py
192.168.2.11 - Found Tablo - CC-Tablo (dual)

192.168.2.11 - 167049 - 2016-11-18 04:35Z - EP019062760248 - Downloading - /home/chuck/Media_Library/Tablo/dl/The Late Show With Stephen Colbert - S02E46 - Amy Adams; Simone Biles; Jeff “The Bear Man” Watson
Traceback (most recent call last):
File “tablo2go-3.33.py”, line 618, in
elif (get_video(QUEUE[TABLO_IP][airing_num][‘m3u8’], QUEUE[TABLO_IP][airing_num][‘build’])):
File “tablo2go-3.33.py”, line 324, in get_video
if line != ‘’ and line.find(“b’#”) != 0 and line.find(’#’) != 0:
TypeError: a bytes-like object is required, not ‘str’
[chuck]$

No panic, but something for you to look at when time permits.

THANKS for all your work. TabloToGo has been indispensable for me.


#436

Awwk! I forgot to protect the recording and now it has been erased. I’ll try to catch it on rerun so I can have a test file saved.


#437

One of the issues I’ve been wanting to see if it got fixed in more recent versions is that certain file names look fine on my linux box but are garbled when accessed via Samba on my Windows box. I suspect its because of illegal characters. For example, I suspected the colon in this filename was to blame in this instance:

Dodgeball: A True Underdog Story (2004).mp4
becomes
DD1QTD~1.mp4

Same goes for all episodes of The Exorcist:

The Exorcist - S01E08 - Chapter Eight: The Griefbearers,mp4
becomes
TI19L0~5.mp4


#438

That is a samba problem, I’ve seen it a few times, it happens where certain characters are in the filename (from the above it looks like it dislikes the the the colon. Try renaming the file and removing the colon. In my scripts, the BAD_CHARS in the clean function can be modified to automatically change the colon to something else.


#439

djrobic: It is Samba messing up your file names. Solution here:

It’s a file name mangling problem. Samba is converting filenames down to old style DOS 8.3 filenames.
Edit /etc/smb.conf (*) and add mangled names=no to the [global] section and restart the smb service.
Reference: http://oreilly.com/openbook/samba/book/ch05_04.html


#440

Jeffrey: It handles titles with semicolons fine. I’ll have a look in BAD_CHARS and mask the quote mark next time I get one in a title. Thanks for the tip.


#441

Thanks chuckc. Jeffrey was right that Samba is renaming the file, but no amount of reconfiguring Samba will allow you to use a colon in a filename in Windows (just try creating a new text file with a colon in it on your Windows box). The only solution is to add it to BAD_CHARS (which I have done). Waiting for the next airing of The Exorcist to confirm that it works as desired.


#442

I have to believe that nobody else is having a problem with 3.33 ?
I must have goofed up the modifications needed to conform to my local paths.
3.31 is working OK for me, but has that issue with S00E00.
I’ll try to edit 3.33 again tonight and see if it works.


#443

I ended up working on a different project this past weekend, so I will try to get an update out in the next few days. Pending changes:

  1. A third naming pattern (like what is already their for series and movies) for series without season, episode data.
  2. Enter IP addresses via the command line
  3. @kkoceski and @chuckc issues with python 2 and the bytes-like object