NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Docker amd64 v
« Previous 1 2 3 4 5 6 … 9 Next »
Keeping DB and Post Processed Files in Sync

 
  • 0 Vote(s) - 0 Average
Keeping DB and Post Processed Files in Sync
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,768
Threads: 954
Joined: May 2006
#31
2022-06-25, 03:05 PM
The default recording folder in not hard-coded so whatever is default at recording time occurs. The same for other folders on the rules the actual path can be changed before recording time. Note that UI clients do give methods of filtering and moving recordings between these groups. This can be useful if a directory is off-line.

Note that NextTool doesn't need the directory to be configured in NextPVR to import it as long as the server can see it. On Linux running as sudo -u nextpvr avoids this. It won't import the same file name twice though, that is independent from the directory path.

I have a feeling that v6 won' be out this week so you might want to do this new import before the next time you pass me the file.

Martin
ChrisHammond56
Offline

Junior Member

Posts: 39
Threads: 5
Joined: Mar 2015
#32
2022-08-09, 01:09 PM
Referring t my post of June 9, 2022....

I do have some pyhton scripts that help but honestly it takes more time to lookup it up and enter it then to delete them as they get scheduled.
- I don't really like this idea. I would have to scan my series recordings for each episode to see if I have it (tedious), and then keep removing the scheduled recording each and every time the episode was broadcast. The flip would be to let the recording happen, and then I could import the XML (with UID) into the DB and then, hopefully, the re-recording would stop.

I am now at the point of NPVR re-recording existing episodes. I think I know why, but would like some guidance....

For this particular episode, in the database I have this...

4229,Father Brown,/recordings/tv/Father Brown/Season 07/Father Brown S07E03 The Whistle in the Dark.mkv,2,2022-03-19 17:00:01,2022-03-19 17:44:01,0,0,0,alibi HD,"<Event>

  <OID>0</OID>
  <Title>Father Brown</Title>
  <SubTitle>The Whistle in the Dark</SubTitle>
  <Description>Father Brown must intervene when it appears that a dark spirit has murderous intent.</Description>
  <ChannelOID>0</ChannelOID>
  <StartTime>0001-01-01T00:00:00.0000000</StartTime>
  <EndTime>0001-01-01T00:00:00.0000000</EndTime>
  <FirstRun>true</FirstRun>
  <Season>7</Season>
  <Episode>3</Episode>
</Event>

Note: There is no UID entry, ChannelOID and the Date/Time entries are 0's

Currently I let the recording complete, and the XML has all the updated information. The latest recording of the episode has created this XML entry...

<?xml version="1.0" encoding="UTF-8"?>

<recording>
  <filename>/recordings/tv/Father Brown/Season 07/Father Brown S07E03 The Whistle in the Dark.mkv</filename>
  <channel>alibi HD</channel>
  <status>READY</status>
  <startTime>2022-08-08 13:00:00</startTime>
  <endTime>2022-08-08 14:02:00</endTime>
  <size>4070298035</size>
  <channel_OID>7373</channel_OID>
  <title>Father Brown</title>
  <subtitle>The Whistle in the Dark</subtitle>
  <description>Father Brown must intervene when it appears that a dark spirit has murderous intent.</description>
  <uid>EP016736560075</uid>
  <firstrun>false</firstrun>
  <original_air_date>2019-01-09T00:00:00.0000000</original_air_date>
  <season>7</season>
  <episode>3</episode>
  <audio>stereo</audio>
  <quality>HDTV</quality>
  <genres>
    <genre>Drama</genre>
    <genre>Crime</genre>
  </genres>
</recording>

I then use the NextTool to import the recording. However, I get this error message..

2022-08-08 14:43:20.961 [DEBUG][1] NextTool, Version=1.1.10.0, Culture=neutral, PublicKeyToken=null

2022-08-08 14:43:20.989 [INFO][1] Using remote RecordingService
2022-08-08 14:43:20.990 [DEBUG][1] Database: /config/npvr.db3
2022-08-08 14:43:21.198 [INFO][1] --importxml /recordings/tv/Father Brown/Season 07/Father Brown S07E03 The Whistle in the Dark.xml
2022-08-08 14:43:21.212 [DEBUG][1] Import Recordings...
2022-08-08 14:43:21.476 [DEBUG][1] - recording already exists for file:/recordings/tv/Father Brown/Season 07/Father Brown S07E03 The Whistle in the Dark.mkv
2022-08-08 14:43:21.476 [DEBUG][1] Import Recordings@exit: No recordings imported.

This is where I think the issue is. Having not imported the XML (recording), then the fields in the DB are not updated, and as such the UID field is not created. When the episode check occurs again, the missing UID causes the recording to be scheduled again, and around we go again. I have checked my scheduler and I can see that recordings are being scheduled where the DB entry exists, but the entry does not have a UID field.

Is there a way to use the NextTool to update missing fields from an XML that already has a DB entry?

I am also unsure why the 'existing file' aka MKV check is failing when the recording already exists. Is this not checked when the scheduler is started? and if so, surely the recording would then be removed.

Note: I replace the .'s in the filename when post-processed. Does this have any effect? The DB has the entry correct (with 'whitespace' and not '.')

'Father Brown.S06E07.The Dance of Death.mkv' would become 'Father Brown S06E07 The Dance of Death.mkv'.

Thanks
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,768
Threads: 954
Joined: May 2006
#33
2022-08-09, 01:20 PM
This is a really an NextTool question so it is the wrong sub-forum.

There are 3 different xml formats that NextPVR v4 and v5 creates. --importxml is for the recordings-backup.xml format and all NextTool does is pass the file to the import function to automate the process. The others are used for side-by-side processing. Since that looks like the side-by-side format so you should be using -file (-import will not rescan files that are there)

-file /recordings/tv/Father Brown/Season 07/Father Brown S07E03 The Whistle in the Dark.mvk

I can't guarantee this will update all the metadata fields though, the real reason was to change the file name.

Martin
ChrisHammond56
Offline

Junior Member

Posts: 39
Threads: 5
Joined: Mar 2015
#34
2022-08-12, 07:15 AM
Thanks for the reply. I will move this to the NextTool forum. Only issue is, I might be being a bit dumb here, but where is that. I cannot seem to find a link to the sub-forum from any of the main groups.

Chris
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,768
Threads: 954
Joined: May 2006
#35
2022-08-12, 09:02 AM
See here https://forums.nextpvr.com/showthread.php?tid=63897 I need to add that to the wiki.

Martin
ChrisHammond56
Offline

Junior Member

Posts: 39
Threads: 5
Joined: Mar 2015
#36
2022-08-15, 05:09 PM
Hi Martin. Thanks for the link. Keeping to this forum for my recording issue....

I am still unclear why I am getting recurring-repeat recordings. I was under the impression that the UniqueID in the Events field was used to check if a program had already been recorded. To test my theory, I could see that tomorrow (16-08-2022) a scheduled recording would take place. I already have that recording, and it created an XML..

<?xml version="1.0" encoding="UTF-8"?>
<recording>
  <filename>/recordings/tv/Father Brown/Season 07/Father Brown S07E09 The Skylark Scandal.mkv</filename>
  <channel>alibi HD</channel>
  <status>READY</status>
  <startTime>2022-04-05 13:00:12</startTime>
  <endTime>2022-04-05 13:44:12</endTime>
  <size>4129883769</size>
  <channel_OID>7373</channel_OID>
  <title>Father Brown</title>
  <subtitle>The Skylark Scandal</subtitle>
  <description>The Kembleford Ramblers annual outing takes a tragic turn when the local Lord is found strangled.</description>
  <firstrun>false</firstrun>
  <original_air_date>2019-01-17T00:00:00.0000000</original_air_date>
  <season>7</season>
  <episode>9</episode>
  <audio>stereo</audio>
  <quality>HDTV</quality>
</recording>

I can see from the original recording that the UniqueID is not present. Looking at the schedule event data, I can see the ID

<Event>
  <OID>2886344</OID>
  <Title>Father Brown</Title>
  <SubTitle>The Skylark Scandal</SubTitle>
  <Description>The Kembleford Ramblers&apos; annual outing takes a tragic turn for the worst when the local lord is found strangled.</Description>
  <ChannelOID>7373</ChannelOID>
  <StartTime>2022-08-16T12:00:00.0000000Z</StartTime>
  <EndTime>2022-08-16T13:00:00.0000000Z</EndTime>
  <FirstRun>false</FirstRun>
  <OriginalAirDate>2019-01-17T00:00:00.0000000</OriginalAirDate>
  <Season>7</Season>
  <Episode>9</Episode>
  <Audio>stereo</Audio>
  <Quality>HDTV</Quality>
  <Genres>
    <Genre>Drama</Genre>
    <Genre>Crime</Genre>
  </Genres>
  <Cast>
    <Member>Actor:Mark Williams</Member>
    <Member>Actor:Sorcha Cusack</Member>
    <Member>Actor:Emer Kenny</Member>
    <Member>Actor:Jack Deam</Member>
    <Member>Actor:John Burton</Member>
    <Member>Actor:Jasper Jacob</Member>
    <Member>Actor:Miranda Hennessy</Member>
    <Member>Actor:Kelly Harrison</Member>
    <Member>Actor:Mark Rice-Oxley</Member>
    <Member>Actor:Callum Woodhouse</Member>
    <Member>Actor:Maggie O&apos;Neill</Member>
  </Cast>
  <Crew>
    <Member>Executive Producer:Will Trotter</Member>
    <Member>ProducerTongueeter Bullock</Member>
    <Member>Writer:Rachel Smith</Member>
    <Member>Director:Christiana Ebohon Green</Member>
  </Crew>
  <MD5>Ohnan8kbhnI6Mn1nJUI5pQ</MD5>
  <UniqueID>EP016736560081</UniqueID>
</Event>

Working on the theory that the UID is the enabler, I amended the Event data in the DB to include the UID. I then restarted the NPVR container, and I still the scheduled recording.

I don't think that the history has any effect as its set to 180 from the default 90
    <DeletionHistoryDays>180</DeletionHistoryDays>

What can cause the reoccurrence having these settings? 

AND, I still don't know why NPVR doesn't stop the schedule when it sees that a recording file already in the database exists.

Thanks
Chris
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,768
Threads: 954
Joined: May 2006
#37
2022-08-15, 05:35 PM (This post was last modified: 2022-08-15, 05:35 PM by mvallevand.)
Yes it is the Unique ID that prevents duplicates and the NextTool that I used for you earlier proved that it works, it copies the ID from the guide over to this table. Logs would should use why they are being recorded. I know that it works so I don't want to spend much time looking into it.

The Deletion History is for files you delete that are no longer in the schedules recording table. 180 days isn't much since it only gives you six months before it starts re-recordings.

Martin
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (4): « Previous 1 2 3 4


Possibly Related Threads…
Thread Author Replies Views Last Post
  Program Files jrockow 6 887 2024-04-04, 08:22 PM
Last Post: jrockow
  Where to set up post processing? daphatty 1 1,074 2020-07-23, 09:57 PM
Last Post: mvallevand
  Recording zero size files vintdiesel 8 3,210 2019-07-02, 09:03 PM
Last Post: vintdiesel

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode