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


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


Script available here:

Fixed episode title formatting

Added two new formatting options for series:

  • series_date: series original air date - format: YYYY-MM-DD
  • series_year: series original air year - format: YYYY

Example use: TV Shows/{series} ({series_year}) - S{season}E{episode} - {title}


Looks Good !!! It now embeds title information into the file-name :smile:. It also found Johnny Carson’s The Tonight Show and embedded the recording-date into the file-name. I’ll keep monitoring things, but it is great so far. Thanks again ! :smile:


More fixes:


  • Fixed issue with file names on Windows that contains special characters

This weekend I will validate the Sports functionality after I am able to record some sports shows


Latest version:


  • Implemented sports show support. The following tags are supported for sports shows:
    {series} - outputs the sports league name (ex: NFL)
    {date_only} - outputs the date the sporting event aired
    {title} - outputs the title of the sporing event (ex: New York Giants vs Dallas Cowboys)