NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Legacy (v4.x and earlier) v
« Previous 1 … 330 331 332 333 334 … 433 Next »
Recordings Import Problem

Recordings Import Problem
jcjefferies
Offline

Posting Freak

UK, North Gloucestershire
Posts: 1,220
Threads: 140
Joined: Jan 2011
#1
2011-11-16, 01:39 PM
All my recordings made before mid August 2011 listed in “event_details” in the NPVR database have lost their original XML format. That date was when I setup my new NPVR server and imported my old recordings. As a test I have just Exported then Imported a single recording and the original XML formatting has gone. This does not seem to be a problem at all for NPVR unless you are running a script which uses the formatting like:-

FOR /F “tokens=3 delims=<>” ..........

My script dumped the contents of “event_details” to a text file then used the command to extract <details> to another file to help detect duplicate recordings. Unfortunately as all the “Carriage Returns” between each XML item are missing for older recordings it now appears all on one line for those so “tokens=3” no longer selects the correct text.

This wont be a problem for most File Rename scripts as they work on New files. I don’t know if NScriptHelper.exe uses the same method to detect “Title” etc. Last night my son in just a few minutes wrote a PHP script to print out a list of my duplicate recordings and that was not affected by the missing formatting.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,807
Threads: 769
Joined: Nov 2003
#2
2011-11-16, 04:57 PM
jcjefferies Wrote:I don’t know if NScriptHelper.exe uses the same method to detect “Title” etc.
Most apps that work with xml, including NScriptHelper, ignore 'carriage return' characters, and they're just treated as part of the white spacing between nodes.
jcjefferies
Offline

Posting Freak

UK, North Gloucestershire
Posts: 1,220
Threads: 140
Joined: Jan 2011
#3
2011-11-18, 07:17 PM
Thanks Sub I can confirm that NScriptHelper.exe works on the "event_details" XML data with and without the text formatting "carriage returns". The odd thing is that I started writing my script using NScriptHelper.exe but went back to using FOR /F "tokens= etc.

This is obviously not a real problem, however I have also noticed another odd thing which I have just realised is related to imported recordings. If I go into “Ready Recordings” and select a subject title, a list of individual recordings together with the channel name is displayed. For several months I have notices that if I now open a recording the channel icon is sometimes incorrect and not the same as the name on the previous screen. I have just noticed that the channel number is usually “0” and the icon for a random channel is displayed and this I now see is related to older recordings that were “Imported” from a previous NPVR server. I have just noticed that in the “Scheduled Recordings” table “channel_oid” is “0” for all imported recordings. Some imported recordings do display a valid although incorrect random channel number and icon even though they also have a “0” channel_oid. Every time you restart NextPVR.exe a different channel 0 icon is selected.

This obviously doesn’t in any way affect the working of NPVR and is just a minor irritation but at least I now know why the wrong channel icons are sometimes displayed.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,807
Threads: 769
Joined: Nov 2003
#4
2011-11-18, 08:24 PM
When you imported the channels, was there already a channel in the database with the same name? If not, it'd leave the channel_oid as 0.
Jaggy
Online

Posting Freak

Carterton, NZ
Posts: 3,638
Threads: 148
Joined: Mar 2006
#5
2011-11-19, 12:38 AM
jcjefferies Wrote:Some imported recordings do display a valid although incorrect random channel number and icon even though they also have a “0” channel_oid. Every time you restart NextPVR.exe a different channel 0 icon is selected.

This obviously doesn’t in any way affect the working of NPVR and is just a minor irritation but at least I now know why the wrong channel icons are sometimes displayed.

Personally I find it slightly more annoying than "a minor irritation" Sad

Quote:sub

When you imported the channels, was there already a channel in the database with the same name? If not, it'd leave the channel_oid as 0.


Does this mean if setting up a clean database & the import is done before setting up any channels it will display the right data? What then happens when you setup a channel with the same name as one that has that has been imported?
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,807
Threads: 769
Joined: Nov 2003
#6
2011-11-19, 12:49 AM
Jaggy Wrote:Does this mean if setting up a clean database & the import is done before setting up any channels it will display the right data? What then happens when you setup a channel with the same name as one that has that has been imported?
Setting up the channel later wont effect recordings that have already been imported. If there was no matching channel at the time they were imported then their channel oid is set to 0.
jcjefferies
Offline

Posting Freak

UK, North Gloucestershire
Posts: 1,220
Threads: 140
Joined: Jan 2011
#7
2011-11-22, 04:11 PM
Its three month since I installed my new server and imported about 400GB of recordings from the old setup so cannot remember what happened exactly. I do seem to remember that Recurring Recordings refuse to import if the channel does not exist but I have done several installs on the old server so dont know if that was when I installed this new server.

To fix the problem I used SQLite Manager to update the number in the channel_oid column after making a backup copy of the database. Using a simple SQL "Update" command for each channel in turn I updated the channel_oid number to match the channel name. Unfortunately this made no difference to the channel icon displayed under Recordings as NPVR uses the “ChannelOID” number stored in XML format under “event_details”. I have just spent a couple of hours updating most of the incorrect “ChannelOID” numbers for around 200 recordings so the correct channel number and icon is now displayed.

This has shown up another similar problem as one of our channels recently moved to a different mux so now has a different ID number even though the channel number is still the same. Those recordings made before October have a different “channel_oid” number which NPVR no longer recognises so the channel number is “0”. Luckily there were only six recordings so it didn’t take long to update the “oid” numbers.
Lao Pan
Offline

Posting Freak

UK (Mendip TX)
Posts: 1,301
Threads: 114
Joined: Oct 2008
#8
2011-11-23, 04:53 PM
I have been hoping that some awfully nice sql Guru would come up with a utility or script to update these 2 channel oid's from the name or channel number. Every time there is a retune on freeview it takes me several hours to replace them manually (600Gb) using sqlspy - Obviously I am not that Guru. :confused:

Also recordings of de-funked channels have to be given an unused oid that is greater than "0" in the event field to stop them using the incorrect channel icon. (I use 7999)
It's not an overly complicated system - it's more - overly simple operatives  Huh
Reddwarf
Offline

Posting Freak

Posts: 6,629
Threads: 230
Joined: Mar 2007
#9
2011-11-23, 07:03 PM
Lao Pan Wrote:I have been hoping that some awfully nice sql Guru would come up with a utility or script to update these 2 channel oid's from the name or channel number. Every time there is a retune on freeview it takes me several hours to replace them manually (600Gb) using sqlspy - Obviously I am not that Guru. :confused:

Also recordings of de-funked channels have to be given an unused oid that is greater than "0" in the event field to stop them using the incorrect channel icon. (I use 7999)
I'm struggeling with the same problems now, my cable provider has moved all channels and most of them has changed oid så lots of my recurring recording would not import, and most of them that did got the wrong channel assigned. There should be a match between channel names instead of channel oid. Sub?

"I'd rather have a bottle in front of me than a frontal lobotomy"
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,807
Threads: 769
Joined: Nov 2003
#10
2011-11-23, 07:16 PM
I've made a change for the next release to try finding the channel by name if the channel oid stored in a recording does not refer to a valid channel. This should give a correct channel icon if a channel as been deleted and rescanned, or if the channel name doesnt match an existing channel at the time it was imported (by that channel is later added).
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): 1 2 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  Failed recordings won't delete Spid4567 3 2,587 2023-07-14, 10:13 PM
Last Post: ZeDoZ
  All my recordings start 90 sec early ncsercs 2 1,438 2022-03-19, 03:28 AM
Last Post: sub
  zap2it import tv logo MaxOne72 2 1,529 2021-11-14, 05:56 PM
Last Post: sub
  NPVR4 and MPC-HC problem The Solutor 29 7,404 2021-07-27, 03:45 PM
Last Post: The Solutor
  Wake - Sleep Interaction -> Failed Recordings mikeh49 48 15,242 2021-03-21, 11:21 PM
Last Post: careads
  Most recordings are zero bytes virtualpaul 4 2,147 2021-01-29, 12:55 PM
Last Post: virtualpaul
  Problem locking on to a tuner? time_lord 7 3,209 2021-01-09, 12:06 PM
Last Post: Graham
  Recordings with Next PVR 4.2.5 (CL0116) have background music but no voice in record DavidF 4 2,206 2021-01-07, 08:47 AM
Last Post: sub
  EPG XMLTV problem DBHall 8 3,897 2021-01-01, 12:34 PM
Last Post: Graham
  Problem with Intel 4600 graphics driver pol098 1 1,498 2020-12-01, 12:44 PM
Last Post: romdl

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

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

Linear Mode
Threaded Mode