Recorded TV storage and max episode count

SalmonSurprise

Posts: 45
Joined: Thu Jul 28, 2016 1:42 am
Location:

HTPC Specs: Show details

Recorded TV storage and max episode count

#1

Post by SalmonSurprise » Thu Jul 28, 2016 1:56 am

Hello All. I have been lurking around these forums for some time now, but I am finally challenged with something I just cannot seem to solve. It's quite simple really. I have setup 2 drives, one local, one networked, to both provide WMC with my TV shows. Each drive has a Recorded TV folder in it's root, and displays the shows together. The problem is that the maximum episode count is not enforced across 2 drives. It only counts the episodes on the drive WMC is set to record to. All other drives are disregarded even though WMC knows they are TV shows. It also doesn't detect duplicates across both drives. I absolutely need this to work. It sounds strange but I have a lot riding on this (financially and time wise). Someone please help!!!

User avatar
Scallica

Posts: 2799
Joined: Mon Jun 06, 2011 7:09 pm
Location: USA!

HTPC Specs: Show details

#2

Post by Scallica » Thu Jul 28, 2016 2:55 am

Hard disk drives are cheap. Get a 3 or 4TB drive for recorded TV and save yourself time and aggravation.

Occam's razor...
https://simple.m.wikipedia.org/wiki/Occam%27s_razor
HTPC Enthusiast / Forum Moderator - TGB.tv Code of Conduct

SalmonSurprise

Posts: 45
Joined: Thu Jul 28, 2016 1:42 am
Location:

HTPC Specs: Show details

#3

Post by SalmonSurprise » Thu Jul 28, 2016 4:20 am

Scallica wrote:Hard disk drives are cheap. Get a 3 or 4TB drive for recorded TV and save yourself time and aggravation.

Occam's razor...
https://simple.m.wikipedia.org/wiki/Occam%27s_razor
I guess I should have been more clear:

I am running WMC on a server with a 4TB WD Purple drive and it moves the recordings nightly to another server with a 36TB RAID6 array. I can't write directly to the RAID since WMC won't write to network locations and it saves power to not spin up all those disks (12) every time a recording or buffer is needed. Can't run WMC on the main server with the RAID as it is used for other things as well.

So please help!!!

glugglug

Posts: 391
Joined: Thu Jun 09, 2011 1:34 am
Location:

HTPC Specs: Show details

#4

Post by glugglug » Thu Jul 28, 2016 11:21 am

I used two drive letters on my old WMC PC without the issue you are describing, so it must be because the drive is networked.

I believe iSCSI will fix your issue by making the network drive appear local.

That said, I wouldn't be using purple drives for anything but a surveillance system. The differentiator there is they do not check for bit errors the way a normal drive does.

User avatar
Scallica

Posts: 2799
Joined: Mon Jun 06, 2011 7:09 pm
Location: USA!

HTPC Specs: Show details

#5

Post by Scallica » Thu Jul 28, 2016 12:34 pm

glugglug wrote: I believe iSCSI will fix your issue by making the network drive appear local.

That said, I wouldn't be using purple drives for anything but a surveillance system. The differentiator there is they do not check for bit errors the way a normal drive does.
I agree. iSCSI appears to be the only solution. Your RAID server will appear as a local drive on your WMC system.

Yep, purple drives are for surveillance systems. I recommend WD Red Pro drives for a NAS.

http://www.wdc.com/en/products/products.aspx?id=1280
HTPC Enthusiast / Forum Moderator - TGB.tv Code of Conduct

SalmonSurprise

Posts: 45
Joined: Thu Jul 28, 2016 1:42 am
Location:

HTPC Specs: Show details

#6

Post by SalmonSurprise » Thu Jul 28, 2016 6:12 pm

Thanks for the responses!

1. Glugglug, you said you have used 2 local drive letters without it messing up the max episode count and still properly detecting duplicates? I have done this on another setup with 2 local drive letters, and it goes past the max, and doesn't detect dups. Strange...

2. iSCSI is new to me. I did some research and cannot believe this evaded me for so long!!! What an awesome technology! I am further researching implementation.

3. The reason I got the WD Purple was for the exact point you made. I figured since a DVR is essentially the same thing as a CCTV, always recording (I have 6 HD tuners) and always reading/viewing (I have 3 extenders), the absence of bit error checking would be a positive. Is there something I'm missing?

I would really like to know more about #1 and #3, I am doing lots of research on #2 (great suggestion!)

Thanks again!

SalmonSurprise

Posts: 45
Joined: Thu Jul 28, 2016 1:42 am
Location:

HTPC Specs: Show details

#7

Post by SalmonSurprise » Fri Jul 29, 2016 12:29 am

And in regards to #2, turns out iSCSI is limited to 16TB. I guess I can live with that.

sbaeder

Posts: 161
Joined: Tue Jan 29, 2013 4:56 am
Location:

HTPC Specs: Show details

#8

Post by sbaeder » Sat Jul 30, 2016 6:09 pm

AFAIK, what ever the "recording drive" is for WMC is what it uses to manage RECORDING. Yes, you can add in all sorts of other media locations from local or remote "drives", but that still won't affect duplicates and/or limits on the number of shows. So, *IF* someone added in more than one drive letter to the recording folder (i.e. where WMC manages things like number of shows to keep), can you explain how you did that? (Note: isn't duplicates in some other database internal to WMC, and not just what is in the recording drive???)

The OP request to NOT have to spin up the NAS for each show being recorded, so while making the recording folder be physically located on another machine is certainly possible (using iscsi), that didn't exactly reflect the original request. BUT, if it works (and is acceptable) - go for it.

glugglug

Posts: 391
Joined: Thu Jun 09, 2011 1:34 am
Location:

HTPC Specs: Show details

#9

Post by glugglug » Sun Jul 31, 2016 8:38 pm

I don't know if it preserves the max episode count when you move episodes to a different drive, as the shows that I moved were all set to keep as many as possible. But it definitely detected duplicates properly and didn't record the same episode twice.

Another thing you may want to look into is Stablebit DrivePool. It is far more performant for the typical media center use-case than normal RAID.
It doesn't support adding "network" drives to the pool persay, but it does allow iSCSI volumes to be part of the pool. Not sure what will happen when your NAS goes down in that scenario .... I think it may go a bit crazy trying to get to the configured replication level on all the local stuff with the NAS volumes missing.

Space

Posts: 2840
Joined: Sun Jun 02, 2013 9:44 pm
Location:

HTPC Specs: Show details

#10

Post by Space » Sun Jul 31, 2016 9:23 pm

Not recording the same episode twice has nothing to do with what episodes are currently on the hard drive(s). It keeps track of that in a separate database.

Here is a prior thread about this issue and my potential solution, although it requires a bit of work and some programming knowledge:

http://www.thegreenbutton.tv/forums/vie ... =5&t=10019

glugglug

Posts: 391
Joined: Thu Jun 09, 2011 1:34 am
Location:

HTPC Specs: Show details

#11

Post by glugglug » Sun Jul 31, 2016 9:50 pm

I think the episode count is also tracked in the DB. If you redo TV setup, even with a single drive the episodes before redoing TV setup never get deleted (so you can in some cases get to double the configured count).

When the file is moved to a different drive, it's possible that the deletion code doesn't know where to find it to delete.

Space

Posts: 2840
Joined: Sun Jun 02, 2013 9:44 pm
Location:

HTPC Specs: Show details

#12

Post by Space » Sun Jul 31, 2016 11:25 pm

I don't know that it keeps track of the count in the DB, but you are correct in that WMC can differentiate between a recording it knows it recorded, and ones it does not think it recorded, and therefore only count the ones it knows it recorded that still exist on the recording drive.

One way you can tell if a particular recording is known by WMC (as one that it recorded) is to look at the channel number of the recording (this may not work for recordings from OTA). If I record a show from my cable card device that is on channel 2, it will indicate channel "2" in the details of the recording. However, if the data about that recording somehow is removed from the DB (like by running TV setup), then the channel instead shows up as "2.0". Also, you will no longer have the "delete series" option or other options that deal with the series of that episode, as it is no longer linked to the series.

All my older recordings from my old cable company display the ".0" appended to the channel number, whereas the new recordings from my current cable company do not. This was due to running TV Setup when migrating to the new cable company.

SalmonSurprise

Posts: 45
Joined: Thu Jul 28, 2016 1:42 am
Location:

HTPC Specs: Show details

#13

Post by SalmonSurprise » Wed Aug 03, 2016 11:29 pm

I can't seem to figure out a way to make the scheduled tasks work. Even if I did, I would have to make a new one every time I wanted a new series. That won't work. Since it doesn't seem like anyone knows off the top of their head how to do this, I will make an offer here.

$50USD via PayPal to anyone who can provide a workable solution that meets the following criteria:

1. Make recorded TV on 2 drive letters count towards the max episode count for a series.
2. Make recorded TV on 2 drive letters detect duplicates.
3. Make the solution usable so in the future, a mouse and keyboard is not required to set up new series. (Can't make a scheduled task every time I want to watch a new series, unless the computer auto creates such tasks)

#1 and #3 are the most important. I will give partial credit if you can't figure out #2. I am seriously in a bind here. Somebody please help. I'm serious about my offer.

Space

Posts: 2840
Joined: Sun Jun 02, 2013 9:44 pm
Location:

HTPC Specs: Show details

#14

Post by Space » Thu Aug 04, 2016 7:28 am

Maybe symlinks?

mklink /D "D:\Recorded TV\show1.wtv" "E:\Recorded TV\show1.wtv"

or

mklink /D "D:\Recorded TV\show1.wtv" "\\SERVER\SHARE\Recorded TV\show1.wtv"

Whenever a show is recorded to your record drive (D:) a script moves that show to your archive drive (E:, or \\SERVER\SHARE)

After the file is moved, the script creates the above symlink.

WMC sees the symlink as the actual file, so it should still see all the files (including the symlinked files) as being in the same folder. The symlinks will be in your D: drive, but they take up very little space. The actual video files will be in your E: or \\SERVER\SHARE drive.

You will be unable to delete the video from WMC, however (deleting it will just delete the symlink). I guess you can still have the archive drive as directly known by WMC, in which case you will see each video listed twice, but you will at least be able to delete the video from WMC. If you only configure the D: drive as a WMC library, you will see all the files listed only once (even the ones on the share/E: drive) but you will have to set something up so that when the symlink on D: is delete by WMC, the actual file on the share/E: drive is also deleted.

It's not an elegant solution and requires some programming, but it should work. WMC will see all your episodes and SHOULD not record more than the configured amount. If you only want this to happen for certain Series, then it would be a bit more complicated, since you would have to have a mechanism to determine which Series to do it with, but you can maybe use the "Keep" setting to determine this ("Until I delete" for Series you don't want moved to archive drive, "Until I watch" for those you do). This setting is viewable in the metadata of the wtv file so a script can easily determine if a newly recorded video is in-scope.

I don't have the time or skills to create such a program to do this, but I just thought I would throw out there a way it might be done. There very well may be easier ways to do this. This also does nothing about preventing duplicates, but WMC should already do this (assuming the guide data is correct).

User avatar
CyberSimian

Posts: 516
Joined: Mon Jun 20, 2011 5:52 pm
Location: Southampton, UK

HTPC Specs: Show details

#15

Post by CyberSimian » Thu Aug 04, 2016 10:07 am

Space wrote:Maybe symlinks? ... WMC sees the symlink as the actual file, so it should still see all the files (including the symlinked files) as being in the same folder.
I tried this when I used WMC on Vista, but it was not a solution for my requirements. WMC saw the files as being present in the "Recorded TV" folder, and showed the metadata, but when a file was selected for playback, WMC diagnosed an error ("the file cannot be found" or "the file is unplayable", or somesuch).

The characteristic of a symlinked file is that it has a file size of zero (i.e. the size of the symlink itself is zero). WMC behaves as though the code that plays the video first queries the file properties (which in this case will be the symlink), checks the file size, sees that it is zero, and so diagnoses an error. The metadata is cached in the recordings database, so WMC does not need to read the recording file in order to display the metadata in "Recorded TV".

That was Vista; perhaps WMC on Win 7/8/10 is better? Worth trying anyway.

-- from CyberSimian in the UK

Space

Posts: 2840
Joined: Sun Jun 02, 2013 9:44 pm
Location:

HTPC Specs: Show details

#16

Post by Space » Thu Aug 04, 2016 10:48 am

Before I posted, I did a quick test and it worked on a Win7 machine. I was able to play the file within WMC with no problems. When I told WMC to delete the recording, it deleted the symlink and left the pointed-to video untouched.

As for the metadata being cached in the database, yes, that could have been the case with my quick test, since all I did was take an old recording that was sitting in the "Recorded TV" folder, moved it to another location and then created the symlink pointing to the new location. I even tested moving the wtv to another WMC library location (with the symlink in the main recorded-to location) and both showed up in the WMC list (the symlink one and the real one) and I was able to play "both" recordings fine in WMC. When I deleted one recording, the symlink got deleted, when I deleted the other, the wtv file was deleted.

Also, I made a mistake in my above post, the /D option should not be used, that is only used when making a symlink for folders, not for files like I am doing.

Corrected command lines:

mklink "D:\Recorded TV\show1.wtv" "E:\Recorded TV\show1.wtv"

or

mklink "D:\Recorded TV\show1.wtv" "\\SERVER\SHARE\Recorded TV\show1.wtv"

SalmonSurprise

Posts: 45
Joined: Thu Jul 28, 2016 1:42 am
Location:

HTPC Specs: Show details

#17

Post by SalmonSurprise » Thu Aug 04, 2016 3:58 pm

This isn't a bad idea...

1. abc.wtv recorded by WMC on Recording Drive
2. Nightly script runs that moves abc.wtv from Recording Drive to Archive RAID *
3. Nightly script (could be part of script in #2) creates symbolic links for all files that were moved to Archive RAID

Then a program could be written that runs in the background that monitors the Recording Drive:

1. WMC deletes symlink in Recording Drive.
2. Program sees deletion, and deletes matching file from Archive RAID

This sounds feasible. The only issue is where I have an *. When a script is run to move everything over to the Archive RAID, how would it know what is needed to be moved vs. what is a symlink. I guess the script could ignore files with a size <1KB?

What do you think?

Space

Posts: 2840
Joined: Sun Jun 02, 2013 9:44 pm
Location:

HTPC Specs: Show details

#18

Post by Space » Thu Aug 04, 2016 4:37 pm

You can use "dir FILENAME" or "fsutil reparsepoint query FILENAME" to determine if a file is a symlink or not.

List all wtv files in the folder that are symlnks:
dir /AL *.wtv

List all wtv files in the folder excluding those that are actually symlinks:
dir /A-L *.wtv

Space

Posts: 2840
Joined: Sun Jun 02, 2013 9:44 pm
Location:

HTPC Specs: Show details

#19

Post by Space » Fri Aug 05, 2016 3:32 pm

One problems with the symlink strategy that I just thought of may be disk space. Depending on how WMC determines used disk space, it may report that there is not enough space to record a new show, even if there is plenty of space available because it is counting all the space used by the recordings in the archive location. I'm not sure how to workaround that (maybe forcing WMC to think it can use a very large amount of disk space somehow, more than the actual amount available in the recording disk).

SalmonSurprise

Posts: 45
Joined: Thu Jul 28, 2016 1:42 am
Location:

HTPC Specs: Show details

#20

Post by SalmonSurprise » Fri Aug 05, 2016 10:23 pm

I thought the file system sees symlinks as having a size of 0KB. Would WMC see the same thing that Windows sees?

Post Reply