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


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.


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

Same goes for all episodes of The Exorcist:

The Exorcist - S01E08 - Chapter Eight: The Griefbearers,mp4


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.


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


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.


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.


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.


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


Hi Jeffery - I am still using 3.31, with 3.33 still not working for me.
I am using python3, so I don’t think that’s the problem.
The only thing I don’t like about 3.31 is that it doesn’t handle S00E00 very well.
Thanks again for all your work !


I am using version 3.35, but I found I needed to make these three four many changes to make it work for me. It can probably be made cleaner:

  1. In get_video (twice):

     for line in resp.iter_lines():

    (then use “lined” everywhere you have “line” in that block)

  2. At the top level program, in the loop “# Go through queued items”, just before “if USE_FFMPEG:”, check to ensure there is something to do, first, or print error message if there isn’t:

             if (QUEUE[TABLO_IP][airing_num]['m3u8']):
                 if USE_FFMPEG:
                 print(TABLO_IP+' - Download Failed - '+QUEUE[TABLO_IP][airing_num]['build']+'.ts')
  3. In the top-level program, in the loop “# Download Metadata from found tablos” where you are determining what do to based on airing_type, add:

         elif airing_type == 'sports':
             disp_build = squish(fillin(NAME_SPORTS, QUEUE[TABLO_IP][airing_num]))
             if disp_id == '' or disp_id.find('SH') == 0:
                 disp_id = clean(disp_build, {' ':'.'})
  4. In “# Go through queued items” add, where similar post_api are happening:

     elif QUEUE[TABLO_IP][airing_num]['type'] == 'sports':
         playlist = post_api(TABLO_IP, '8885', '/recordings/sports/events/'+str(airing_num)+'/watch', COMMENT='Retrieve sport playlist')
  5. Add next to NAME_UNKNOWN

     NAME_SPORTS  = "... your information here.../Sports/{disp_event} {date_only}"
  6. In “# Download Metadata from found tablos”, where you are processing the airings, insert:

     disp_event = rDict(METADATA[TABLO_IP]['airing'][airing_num], '', 'event', 'title')
  7. Just a little bit after the above, where you are inserting into queue, insert


(I think those are all the changes)

I suspect there’s more to be done for manual recordings, but I haven’t tried that yet. And I’m pretty sure Windows machines won’t like the Sports names with colons in them. I don’t use Windows (and neither should anyone else).


Hi qajxujeza,
Would it be possible for you post your complete python file, please ?
Thanks, Kurt


@kkoceski I will post mine later today to my github account and provide a link here.

I incorporated @qajxujeza (thanks for the finds) finds, added a fix for episodes without season/episode numbers and added logging into mine. I have been unable to test the Sports show changes at this point because I don’t have any recorded. Was waiting until this weekend to test that additional functionality.


@kkoceski Script is up and available here:


Script includes changes from @qajxujeza, fix for episodes with no season/episode numbers, and includes two new options:
-name_sports “value”
-log_file “log_file_path”

I have not been able to test the -name_sports option yet because I don’t have any sports shows recorded yet. If you have issues let me know.

@jskenney thanks for providing the initial script. Feel free to use any/all/none of the changes in my uploaded version


Thanks ! I’ll try to give this a shot tonight - Kurt


I actually got to it at lunch time. It is working !
However, the “title” portion is not getting embedded into the file-name.
Version, 3.31 ( which didn’t handle S00E00 well ) works OK.


What type of show is failing? Is it a show without season/episode data? Can you post your file formats below? Thanks.


With 3.31, I get :
The Tonight Show Starring Jimmy Fallon - S04E69 - Michael Keaton; Nina Dobrev; The xx.ts

With this modified 3.35, I get :
The Tonight Show Starring Jimmy Fallon - S04E69.ts


Sorry for not being on the forums much lately, I am working to combine tvdb queries with my tablo2go software so I get consistent naming of files from both my TiVo and Tablo software. My TiVo work is done, and then I plan to port this into my tablo2go software, I probably won’t add any new updates until this merger is complete. Thanks to everyone who is still working on making this better, I’ll work to port any of these changes into the code.


@kkoceski Can you post what your file formats look like. Are you specifying them on the command line? I will look to see if there was a difference between 3.31 and 3.35 that may have caused the different names to be generated.


I only made minimal changes:

'# Note that any metadata apearing can be added manually to the code below, but
'# these are available by default.
NAME_SERIES = “./TV/{series}/{series} - S{season}E{episode} - {title}”
NAME_UNKNOWN = “./Fail/{series}/{series} - {title} ({date_only})”
NAME_MOVIES = “./Movies/{title} ({year})”
NAME_SPORTS = “./Sports/{title} - {date_only}”


'# Set metadata and history files
FILE_TABLO_METADATA = ‘./tablo3.mtd’
FILE_TABLO_HISTORY = ‘./tablo3.history’
FILE_TIVO_HISTORY = ‘./auto.history’

This is what I enter at the command line:
python3 tablo2go-3.35-with-fixes_KK.py -ip

In addition, it considers “Saturday Night Live” an unknown show instead of a TV show.

“The Tonight Show” ( the one with Johnny Carson ) isn’t getting detected. 2.0.62_FIX ( yes, the old one - I have 2 tablos, and have NOT updated the other one ) gets it as:
The Tonight Show - 2017-01-04.ts