Rec New "To Me" option or at least a "No Duplicates" setting

@cedarrapidsboy  @cjcox @bromo999

I’ve got small script I’ve written to help deal with this, I’ll post it below and if anyone feels adventurous please feel free to give it a try:

http://www.vanronk.net/2014/09/11/remove-tablo-duplicate-recordings/

Pitty its not written in Python … i’d rather not have to install php … but thanks for the effort.

I might get around to implementing it in the plex plugin (using python of course)

If i have time I might try putting your php script on my linux based PLEX server which has php on it … im just lazy and don’t want to have to ssh into the plex box to run it … i would rather do it from my mac… lol

@ericgus I’m pretty sure your Mac ships with php installed, I don’t recall ever having it install it on any of mine. 

@ericgus I'm pretty sure your Mac ships with php installed, I don't recall ever having it install it on any of mine. 

php -v

PHP 5.4.24 


damm.. you are right again .. lol.. ty

@ericgus Oh what station is playing I dream of Jeannie? It's called Antenna-TV in my market. It is the CW's sub-channel on our dial.
Fwiw I contacted ANTENNA TV to try to get them into the Boston area as well as send a email or two to a few stations seeing if they would pick them up.. seems like a really good station!. Thanks for the tip!</blockquote>

Yeah, I contacted them as well.  Definitely seems like a great station.  Added another one to bring them to Boston Metro using their contact us page – http://antennatv.tv/contact-form/

I sent an email to WBZ director of programming to consider adding them since WBZ in boston is the only channel without any digital sub channels. I got a reply that they would bring the topic up at their weekly programming meeting so … who knows. but it would be fantatsic to have them in our area.

@Davidvr your script works very well … one question … does it presumably delete the older recording first? I would hope since it might cause issues deleting a duplicate thats currently in the process of recording… 

@ericgus It will actually delete the newest copies of the program, but it takes recording state into account, so it will not touch a recording that hasn’t completed, and it also automatically deletes all failed recordings.


It matches the programs based on show, season and episode number. If it finds a program that doesn’t have a season or episode number it will ignore it as well. 

Ok thanks … was trying to read thru the PHP code and wasn’t getting far (php isnt my thing)… 

@ericgus the php file I made isn’t really human readable, its been processed and spit out as two lines of code for distribution. 

@ericgus the php file I made isn't really human readable, its been processed and spit out as two lines of code for distribution. 

Ok I feel better now … :slight_smile:  I honestly thought I was having some kind of brain lapse or something trying to read it… 

@ericgus the php file I made isn't really human readable, its been processed and spit out as two lines of code for distribution. 

Didn’t work for me unfortunately. PHP 5.6.0 (Windows)


>php.exe -f DeDuper.php

>

(nothing seems to happen)
@ericgus the php file I made isn't really human readable, its been processed and spit out as two lines of code for distribution. 
Didn't work for me unfortunately. PHP 5.6.0 (Windows)

php.exe -f DeDuper.php

(nothing seems to happen)


You would need to talk to @Davidvr as he is the author of the php script.
You would need to talk to Davidvr as he is the author of the php script.

@ericgus, yeah, thanks. That wasn’t targeted at you. But, the quote button keeps those @ mentions and I forgot to remove it.

@cedarrapidsboy I’ll forgive that you are running php on windows :wink: and test it out tonight on a vm to see if their is something broken. In the mean time try running it like this if you could and see if it works better?


php.exe -n -f DeDuper.php 

@Davidvr - Same result with -n -f. I almost apologized for my PHP build when it seemed a lot of members of this thread are of the Apple Church.

@cedarrapidsboy No worries, I’ll debug it tonight and see if it throws an error on windows. I’m a Windows Systems Engineer by day, all I can say about the apple church is it is nice to come home to a computer that I don’t have to fix, remove malware, viruses, etc :wink:

@cedarrapidsboy No worries, I'll debug it tonight and see if it throws an error on windows. I'm a Windows Systems Engineer by day, all I can say about the apple church is it is nice to come home to a computer that I don't have to fix, remove malware, viruses, etc ;)

My story is similar … and my day job I use corporate unix mainframes heavy iron (not intel based the big boy stuff) … I hardly actually touch windows much these days either personally or professionally… back in the 286/386/486 era I used to professionally build custom PC’s … do malware/virus removals …etc… (I still do on the occasional basis but now really only for those few remaining family members who still have windows machines)… And I used to use Linux for my own home machines so getting a Mac was really a no brainer since they all pretty much work the same internally… 

Hi everyone, I’m a new Tablo owner and I’ve been visiting this community a lot, researching the Tablo before finally making the purchase.

Anyhow, I’m a novice programmer and I don’t know PHP, but I was able to unobscure Davidvr’s code, then I formatted the script and renamed some variables to make it easier to read and follow. First I’d like to say that I’m very disappointed that Davidvr obscured his script. This is supposed to be a community where Tablo users share ideas and learn from each other.

I’m glad I commented out the line that actually deletes recordings before running the script, otherwise I’d be pretty pissed off. As the code is currently written, it appears that it would delete all series recordings. I don’t think this was deliberate or malicious. I think the code is out of date and changes in how the Tablo stores recording info has caused the script to unintentionally identify false duplicates.

The element jsonFromTribune does not exist in the recording info file, therefore there are no values within that element (sorry if I explained this incorrectly, I don’t know the proper terminology for json strings).

Key/value pairs are then added to an array containing the IDs for each recording, with NULL being it’s value. As the script iterates through all the recording ids, the NULL values are compared to other NULL values and a false duplicate for that recording ID is identified.

I say that it appears (because I don’t know for sure) that the script would delete these false duplicates because I don’t understand the part of the code that actually performs the deletion. It uses a function called curl, which I’ve never heard of before and I don’t understand how it works. The recording IDs are passed to curl and assuming that the NULL values have no effect, then I would suspect that curl would in fact unintentionally delete the falsely identified duplicate recordings.

I advise everyone not to download and run this script until it has been updated by the author. Furthermore, I think the author should update the script to prompt the user before performing each delete.

It’s a simple fix and I’ve made some changes to the code that seem to work, but I don’t know if the code was originally supposed to be comparing meta data that had more unique values.

With all that said, I’m actually kind of excited that someone has figured out how to do this kind of stuff via scripts and I’d like to learn more.

Davidvr, if you’re reading this please don’t take offense. You’re code is great, it just got broken over time as the Tablo evolved.