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

In case it helps anybody I use the following options:

-history:“x:/pathtofile/tablo.history” -ffmpeg:“x:/pathtofile/ffmpeg/bin/ffmpeg.exe” -tempdir:“x:/pathtofolder/temp” -tvdir:“x:/pathtofolder/Recorded TV/TV Shows” -sportsdir:“x:/pathtofolder/Recorded TV/Sports” -tvcreate:False -moviedir:“x:/pathtofolder/Recorded TV/Movies” -existdir:“P:/ServerFolders/Recorded TV/Already Exists” -faildir:“x:/pathtofolder/Recorded TV/TV Shows” -log:“x:/pathtofile/logs/tablo-download.log”

I just tried the new version (2.0.61). Renamed my tablo .history and .log files. Got the following results (and errors):

[Dec 7 09:11:02 2015] - Starting TabloToGo Version 2.0.60
[Dec 7 09:11:02 2015] - Loading download history
[Dec 7 09:11:02 2015] - 0 shows and movies have already been downloaded
[Dec 7 09:11:02 2015] [192.168.2.11] - Found Tablo named Manually Entered
[Dec 7 09:11:02 2015] [192.168.2.11] - Loading meta-data for 158 recordings
Traceback (most recent call last):
File “tablo2go-2.0.61.py”, line 1011, in
show_proc = proc_meta(show_info, OPTIONS)
File “tablo2go-2.0.61.py”, line 712, in proc_meta
cleandate = string.splitfields(PROC[‘date’], ‘T’)[0]
File “/usr/lib/python2.7/string.py”, line 292, in split
return s.split(sep, maxsplit)
AttributeError: ‘int’ object has no attribute ‘split’


Note: I’m running on Linux (with Python 2.7.5-5ubuntu3), but tablo2go-2.0.56 has been working for a long time in this environment (until Tablo removed the metadata). I see my error is similar to kkoceski, but on a different line number in string.py. I’ll have a look on my end and see if I can find any clues.

Climbing down the stack, it seems to be choking when trying to fix the date on a manually recorded movie. Inside string.py, it fails in the following place:

Split a string into a list of space/tab-separated words

def split(s, sep=None, maxsplit=-1):
“”"split(s [,sep [,maxsplit]]) -> list of strings

Return a list of the words in the string s, using sep as the
delimiter string.  If maxsplit is given, splits at no more than
maxsplit places (resulting in at most maxsplit+1 words).  If sep
is not specified or is None, any whitespace string is a separator.

(split and splitfields are synonymous)

"""
return s.split(sep, maxsplit)

Update: Nope. Even with the -tv option, it still fails, so it isn’t just a movie thing.

There is probably another piece of metadata thats missing, I’ll take another look tonight.

1 Like

Nope - starting off without a .history file didn’t work.
jskenney - Thanks a bunch once again for providing and supporting this !!!
TabloTV - Is something like this still on your roadmap ??? Will you be fixing the metadata problem ?

jskenney thanks for maintaining this code…it’s one of the reasons I still use tablo. I not sure I totally understand why they had to break 3rd party devs code like this…very annoying.

Updated version 2.0.62 has been posted. I made a few modifications to the new episode tracker to remove spaces (because that would have broken the mp4 build), and added a safeguard to the date.

Hope this works for everyone.

Oh Boy !!! It’s churning away. This is quite a relief - Thanks again, jskenney !!!

What a cluttered mess I’ve made of my backup drive, trying to salvage my recordings.
But hey, if I didn’t like to dabble, I’d probably be using some other solution.
I really like TabloTV - don’t think otherwise.

I’m trying to stick with Linux, and wine didn’t work out, so I couldn’t switch to the GUI methods.

SurLaTablo looks like a fine product, but there was a learning curve. It’s probably no more of a learning curve than tablo2go, but new to me. I actually got it working OK, but got stuck when I ran out of /tmp space and couldn’t figure out how to change the temporary-directory of python to somewhere else. Then I broke it, had a beer and went to bed.

Reflecting on this, I realize that I was more disappointed about failing to capture a TV show than actually watching it. I think this is a good thing - keeps me thinking !!!

From the Python documentation (with regards to temporary files):

the user of the application can control the directory location by setting the TMPDIR, TEMP or TMP environment variables.

Towards the end of the SurLaTablo installation video, there is a segment where the PATH is updated, from there you can also set environment variables.

Oh my Gosh, there’s a video. It’s 20+ minutes long. I’m going to have to watch it.
This looks to be Windows-based, so I’m not sure if it applies to me.
It’s good to have options - wow - Thanks so much cjcox, and everyone !!!

Yeah, tablo2go is still downloading, so I think I’m good2go…

1 Like

Yay! It works. Thanks jskenney

Most OSX, *ix users know about TMPDIR… I just assumed you needed a Windows video (my bad). If you’re on a different platform just make sure TMPDIR points where you need it. As with all *ix style platforms, you can put it into the environment just on the call if need be:

TMPDIR=/my/new/temp surlatablo.py …etc…

no (my bad) needed.
It’s all GOOD here :smile:
Yeah, a bit mushy, but there’s other posts that aren’t quite so nice.
Thanks !

2.0.62 works like a charm for me. Thanks so much! Wish I could replay the favour. :grinning:

It even works with the old tablo.history file. Fantastic!

The 2.0.62 update wasn’t able to download shows that don’t have season/episode numbers (i.e. The Wiz Live!, Meet the Press). I had to update the following lines in the proc_meta method to use the air date instead of the season/episode numbers for episodes missing the information:

Before:

if PROC['eid'] == '.':
        PROC['eid'] = PROC['series']+'.'+str(PROC['season'])+'.'+str(PROC['episode'])+'.'+PROC['title']
        PROC['eid'] = clean(PROC['eid'], {' ':'_'})

After:

if PROC['eid'] == '.':
        if PROC['season'] == 0 and PROC['episode'] == 0:
            PROC['eid'] = PROC['series']+'.'+PROC['airdate']
        else:
            PROC['eid'] = PROC['series']+'.'+str(PROC['season'])+'.'+str(PROC['episode'])+'.'+PROC['title']
        PROC['eid'] = clean(PROC['eid'], {' ':'_'})

Hello, how do I mark “Thomas & Friends” as complete? I think it is having trouble with the “&” ampersand?

I tried this “python tablo2.py Thomas & Friends -complete” but it does not work. Is there a way I can just type it into the history file?

Thank you,
Walter

A new version of tablo2go (3.02) has been posted on the website https://sites.google.com/a/moboard.com/tablo and is available for download, this is a complete rewrite using Tablo’s new API calls. I have also simplified it considerably as there are no command line arguments and only a few configuration items at the top of the file. This requires python3, the requests library (which you should hopefully already have installed by default), and ffmpeg (needed to download the files).

Version 3 was planned to be a simple command line tool to download files from the Tablo, a future version may be more feature rich.

@jskenney - I posted your blurb above in the header of the topic so it’s easier for folks to find. Will move this into the third party apps area too.

Ah well… worth a try.

oanna Lumley; Troye Sivan
Traceback (most recent call last):
File “./tablo2go-3.04.py”, line 275, in
disp_build = squish(fillin(NAME_MOVIES, QUEUE[TABLO_IP][airing_num]))
File “./tablo2go-3.04.py”, line 120, in fillin
_string = _string.replace(’{’+str(key)+’}’, str(_dict[key]))
UnicodeEncodeError: ‘ascii’ codec can’t encode character u’\xe9’ in position 413: ordinal not in range(128)