View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 15 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Tue Oct 18, 2016 10:05 am 
Offline
Joined: Tue Apr 11, 2006 7:44 am
Posts: 286
Location: Los Angeles, CA
Hello,
I just upgraded to 8.4.1 from 8.3 and see the new format for the /myth/recordings/ folder. I was wondering how the sub-folders are determined. In my recordings folder I now have a "Children", "Previously Viewed", and "TV Shows". The first two folders are two different recording groups that I have on my system. I am just wondering how it chose those two recording groups to make as separate folders?I thought that maybe it was du to the number of recordings in each group, but I have some other groups with more recordings than those.

Just wondering.

_________________
Tim

LinHES 8.4
HDHR3
BioStar A770, AMD X2 4050e, 2GB RAM
GigaByte GeForce 8400, Chaintech AV710
USB-UIRT


Top
 Profile  
 
PostPosted: Tue Oct 18, 2016 11:14 am 
Offline
Joined: Fri Jul 21, 2006 11:12 pm
Posts: 993
Location: SC
The first sub directory is based on the Category Type of the program. The Category Type of the program should be either movie, series, sports or tvshow. The recordings script combines series and tvshow into the TV Shows directory. This was done so that I could point Plex Libraries to these directories and select the correct Plex grabber.
What is odd is why you have Children and Previously Viewed. How do you get your guide data? Schedules Direct or something else? I am wondering if maybe you don't have category types.


Top
 Profile  
 
PostPosted: Tue Oct 18, 2016 1:10 pm 
Offline
Joined: Tue Apr 11, 2006 7:44 am
Posts: 286
Location: Los Angeles, CA
Just using Scheduled Direct for guide data.

Where are the categories defined in the MythTV database? I have never gone in to configure categories. Should that have happened automatically at some point? I have been using LinHES for quite a while (Knoppmyth days), upgrading the database along the way. Could that have missed something?

I do kind of like having the base folders for recording groups.

_________________
Tim

LinHES 8.4
HDHR3
BioStar A770, AMD X2 4050e, 2GB RAM
GigaByte GeForce 8400, Chaintech AV710
USB-UIRT


Top
 Profile  
 
PostPosted: Tue Oct 18, 2016 3:07 pm 
Offline
Joined: Fri Jul 21, 2006 11:12 pm
Posts: 993
Location: SC
The Category Type is defined in the MythTV code and assigned to a program in the program table. It could be that if they are really old programs maybe it wasn't assigned years ago. I am wondering if maybe a few of yours don't have Category Types assigned and so the Recording Group gets put at the top level. Are there alot of recordings in those that are not in TV Shows?


Top
 Profile  
 
PostPosted: Wed Oct 19, 2016 8:47 am 
Offline
Joined: Tue Apr 11, 2006 7:44 am
Posts: 286
Location: Los Angeles, CA
Yes, a fair amount. The Children category has about 80 shows in the folder, with the newest being recorded on 2011/11/24. There are two shows in the Children recording group that have been since that date that are showing up in the regular TV Shows folder. The Previously viewed folder is similar. I do have several recordings from this most recent Olympics that are in the TV Shows folder that I would have thought would have been put into a Sports category, if it was using the Category Type.

I also just checked the "recgroups" table to see if the Recording Group IDs correlated with the Category Type IDs that are referenced in the `recordings` script that is run in cron.hourly, but they are not the same numbers (looks like Movies is 1 and Sports is 3).

_________________
Tim

LinHES 8.4
HDHR3
BioStar A770, AMD X2 4050e, 2GB RAM
GigaByte GeForce 8400, Chaintech AV710
USB-UIRT


Top
 Profile  
 
PostPosted: Wed Oct 19, 2016 9:18 am 
Offline
Joined: Fri Jul 21, 2006 11:12 pm
Posts: 993
Location: SC
opel70 wrote:
Yes, a fair amount. The Children category has about 80 shows in the folder, with the newest being recorded on 2011/11/24. There are two shows in the Children recording group that have been since that date that are showing up in the regular TV Shows folder. The Previously viewed folder is similar. I do have several recordings from this most recent Olympics that are in the TV Shows folder that I would have thought would have been put into a Sports category, if it was using the Category Type.
For one of the programs that is in the top level Children directory look in the db at the program table and see what the category_type is. Do the same for one of the Olympics programs. My guess is that the Children program will not have a category_type at all and the Olympics will have either series or tvshow assigned.

opel70 wrote:
I also just checked the "recgroups" table to see if the Recording Group IDs correlated with the Category Type IDs that are referenced in the `recordings` script that is run in cron.hourly, but they are not the same numbers (looks like Movies is 1 and Sports is 3).
Two different things. Recording Groups are user created and can be anything in any order. Category Types are defined in the Myth code, not the db. Look at the recording script at the mythlink.pl line. The %Ct is the category type and the %U is recording group. I think what is happening is that mythlink.pl ignores an item when there is no data in the db for that item.


Top
 Profile  
 
PostPosted: Wed Oct 19, 2016 10:09 am 
Offline
Joined: Tue Apr 11, 2006 7:44 am
Posts: 286
Location: Los Angeles, CA
brfransen wrote:
opel70 wrote:
Yes, a fair amount. The Children category has about 80 shows in the folder, with the newest being recorded on 2011/11/24. There are two shows in the Children recording group that have been since that date that are showing up in the regular TV Shows folder. The Previously viewed folder is similar. I do have several recordings from this most recent Olympics that are in the TV Shows folder that I would have thought would have been put into a Sports category, if it was using the Category Type.
For one of the programs that is in the top level Children directory look in the db at the program table and see what the category_type is. Do the same for one of the Olympics programs. My guess is that the Children program will not have a category_type at all and the Olympics will have either series or tvshow assigned.

I just took a look at the entries in the db and 77 of the 83 recordings that are in the Children directory in the /myth/recordings/ directory have a category of "Children", just like the recgroup. It looks like there are only 2 recordings in my db with a blank category. And all of the Olympics recordings do have a category of "Sports event". Does the recorded table include the Category Type? or is that just in the program table?
Quote:
Two different things. Recording Groups are user created and can be anything in any order. Category Types are defined in the Myth code, not the db. Look at the recording script at the mythlink.pl line. The %Ct is the category type and the %U is recording group. I think what is happening is that mythlink.pl ignores an item when there is no data in the db for that item.

Ok, and this tip pointed me towards the script that does the actual renaming. So I went in and just removed the %Ct/ portion and now have my recordings folder just showing my Recording Groups, which is I really like. Though I still can't say why it was behaving this way. I did notice that my mythlink.pl file doesn't show %Ct as being an option in the --format command-line, but that omission is probably just in the help text.

_________________
Tim

LinHES 8.4
HDHR3
BioStar A770, AMD X2 4050e, 2GB RAM
GigaByte GeForce 8400, Chaintech AV710
USB-UIRT


Top
 Profile  
 
PostPosted: Wed Oct 19, 2016 10:15 am 
Offline
Joined: Fri Jul 21, 2006 11:12 pm
Posts: 993
Location: SC
opel70 wrote:
I just took a look at the entries in the db and 77 of the 83 recordings that are in the Children directory in the /myth/recordings/ directory have a category of "Children", just like the recgroup. It looks like there are only 2 recordings in my db with a blank category. And all of the Olympics recordings do have a category of "Sports event".
You need to look at category_type not category. They are not the same and not what the %Ct is tied to.

opel70 wrote:
I did notice that my mythlink.pl file doesn't show %Ct as being an option in the --format command-line, but that omission is probably just in the help text.
It is missing from the help in part because I added %Ct to Myth for LinHES and didn't patch the help text.


Top
 Profile  
 
PostPosted: Wed Oct 19, 2016 11:00 am 
Offline
Joined: Tue Apr 11, 2006 7:44 am
Posts: 286
Location: Los Angeles, CA
brfransen wrote:
You need to look at category_type not category. They are not the same and not what the %Ct is tied to.

Ok, I think I am starting to piece this together. Sorry for being so dense on this. The category_type is set in the redordedprogram table, not the recorded table. It looks like my recordedprogram table only goes back to 2012, with 146 entries in it. The recorded table includes all 254 recordings going back to 2007. So that means that there are 108 recordings with no corresponding entry in recordedprogram. And it would seem that this discrepancy causes the issue in the mythlink.pl script. I could probably try to create the correct information for those 108 shows, but that isn't all that critical at this point. So for now I'll just leave my modified cron.hourly/recordings script in place. I have modified this to be '--format '%U/%T/%T %- %oY-%om-%od = %S' (as the Series and Episode information is blank for everything as well). However the %T for the subdirectory doesn't seem to be working, but oh well.

Oh, and all of the Olympics recordings show up as a "series" in the recordedprogram table as opposed to "sports". Go figure.

_________________
Tim

LinHES 8.4
HDHR3
BioStar A770, AMD X2 4050e, 2GB RAM
GigaByte GeForce 8400, Chaintech AV710
USB-UIRT


Top
 Profile  
 
PostPosted: Wed Oct 19, 2016 12:59 pm 
Offline
Joined: Fri Jul 21, 2006 11:12 pm
Posts: 993
Location: SC
Interesting. On 2 dbs I have here recorded and recordedprogram have the exact same number of entries and one of them goes back to 2007 as well. You may have some corruption since recorded and recordedprogram don't have the same number of entries.

Note that the recordings cron job will be overwritten the next time the mythtv package is updated.


Top
 Profile  
 
PostPosted: Wed Oct 19, 2016 1:22 pm 
Offline
Joined: Tue Apr 11, 2006 7:44 am
Posts: 286
Location: Los Angeles, CA
brfransen wrote:
Interesting. On 2 dbs I have here recorded and recordedprogram have the exact same number of entries and one of them goes back to 2007 as well. You may have some corruption since recorded and recordedprogram don't have the same number of entries.

Note that the recordings cron job will be overwritten the next time the mythtv package is updated.

Yeah, I make a copy of any customizations like this that I make, not that there are many at this point.

I have run checks and repairs on the db in the past, and just ran them now, and nothing comes up wrong. So I guess the corruption happened a while ago, probably 2012 when the recordedprogram data starts. I am guessing there isn't any "automated" way to create the missing entries. Maybe I'll export the two tables and see what I can do about detecting the missing entries and fudging some import data for the recordedprogram table.

_________________
Tim

LinHES 8.4
HDHR3
BioStar A770, AMD X2 4050e, 2GB RAM
GigaByte GeForce 8400, Chaintech AV710
USB-UIRT


Top
 Profile  
 
PostPosted: Wed Oct 19, 2016 1:34 pm 
Offline
Joined: Fri Jul 21, 2006 11:12 pm
Posts: 993
Location: SC
opel70 wrote:
I am guessing there isn't any "automated" way to create the missing entries. Maybe I'll export the two tables and see what I can do about detecting the missing entries and fudging some import data for the recordedprogram table.
Probably not as the recordedprogram comes from the program table: https://www.mythtv.org/wiki/Recordedprogram_table


Top
 Profile  
 
PostPosted: Wed Oct 19, 2016 2:15 pm 
Offline
Joined: Tue Apr 11, 2006 7:44 am
Posts: 286
Location: Los Angeles, CA
Ok, one more (last?) update.

There isn't really that much in the recordedprogram table that isn't in the recorded table that is actually necessary. Just meta stats about the recording: format, CC info. So I exported both tables, sorted recorded by Start Time and deleted everything newer than 2012. Then I just went through and moved columns around and created columns to match the recordedprogram table. After a bit more finagling, I was able to import the resulting csv back into the recordedprogram table. So now both tables have 254 entries.

Now the default cron.hourly/recordings creates the expected folders based on Category Type. Kind of. From the looks of the mythlink.pl line, there should be Category Type folders with Recording Group folders under that. However, I only get the TV Shows Category Type folder with the Show titles folders under that. No Recording Group folders.

So, since I apparently don't have recordings categorized as Sports or Movies I went back to my customization of only generating the base folders as the Recording Groups.

Thank you for all of your time in working through this conundrum.

_________________
Tim

LinHES 8.4
HDHR3
BioStar A770, AMD X2 4050e, 2GB RAM
GigaByte GeForce 8400, Chaintech AV710
USB-UIRT


Top
 Profile  
 
PostPosted: Wed Oct 19, 2016 2:22 pm 
Offline
Joined: Fri Jul 21, 2006 11:12 pm
Posts: 993
Location: SC
opel70 wrote:
From the looks of the mythlink.pl line, there should be Category Type folders with Recording Group folders under that. However, I only get the TV Shows Category Type folder with the Show titles folders under that. No Recording Group folders.
Look at lines 48-64 of the recordings cron job. The recording groups are only created by mythlink so that deleted programs would not be included. Once the Deleted recgroup is removed all the remaining links are moved out of the recgroup directories.


Top
 Profile  
 
PostPosted: Wed Oct 19, 2016 2:26 pm 
Offline
Joined: Tue Apr 11, 2006 7:44 am
Posts: 286
Location: Los Angeles, CA
brfransen wrote:
opel70 wrote:
From the looks of the mythlink.pl line, there should be Category Type folders with Recording Group folders under that. However, I only get the TV Shows Category Type folder with the Show titles folders under that. No Recording Group folders.
Look at lines 48-64 of the recordings cron job. The recording groups are only created by mythlink so that deleted programs would not be included. Once the Deleted recgroup is removed all the remaining links are moved out of the recgroup directories.

Thanks again. More useful info. That also explains the various messages I get when running the recordings script that must all be part of that cleanup section of the script.

Again, I really appreciate all of the info you have had on how this script is processing the data.

_________________
Tim

LinHES 8.4
HDHR3
BioStar A770, AMD X2 4050e, 2GB RAM
GigaByte GeForce 8400, Chaintech AV710
USB-UIRT


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: Bing [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu