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 … 132 133 134 135 136 … 433 Next »
Database update issues and changing priorities

Database update issues and changing priorities
johnsta
Offline

Member

Posts: 62
Threads: 7
Joined: May 2016
#1
2016-05-20, 03:55 PM
Last week WMC stopped working, so I moved from WMC to NextPVR (Windows
7, Ceton card with Comcast cablecard).

I'm having some issues with the database that I think are related to
each other. I don't know if these issues are features/bugs in NextPVR
or if they're occurring because I screwed up the database by inserting
manual recordings through SQLite. If it's the latter, please tell me
the best way to straighten things out. The previous thread was:
http://forums.nextpvr.com/showthread.php...-recording
  • The "Update" button doesn't seem to work for me at all. If
    I try to use it on a series, the "Recording Type" comes up as "Record
    Once," even though it's a series. If I try to use it on a manual
    recording, whether I've inserted it through the GUI or through INSERT,
    then I get an System.IndexOutOfRangeException when I click on
    "Update", as in the above thread. Is this a bug in NextPVR, or is
    this happening because of some issue in npvr.db3?

  • I've manually scheduled a program "BBC-Midnite-4am", which records
    BBC World News from midnight to 4 am. (I had added this recording
    through sqlite3.) It records fine into a file called
    BBC-Midnite-4am_20160520_00000400.ts. But then it records the same
    channel a second time, from 3:45am-4am, into a file called
    BBC-Midnite-4am_20160520_00000400-0.ts. This happens every night. So
    there are two recordings of the same thing from 3:45-4.

    I looked at the NRecord.log file (attached), and it looks like NRecord
    goes nuts around 3:40 am, rescheduling recordings, and rolling over to
    a new log file. It also gets sporadic "database locked" errors, which
    may be a NextPVR bug.

  • By the time I have everything set up, I'm going to have 150-200
    recurring recordings set up, about half of them manual and half
    series, and I'm going to need to set priorities. A typical scenario
    is that I want to record the BBC World News from 8-9pm, but only if
    there's a free tuner, which means the BBC recording has to have a
    lower priority than the series recordings. It would be quick and
    convenient for me to set priorities by using sqlite3 to UPDATE the
    "priority" field in each of the records in the RECURRING_RECORDING
    table (and making sure that all priorities are unique). Would that
    work? This would be easiest, since I need to set the priority of
    each new manual recording that I add, even if it's through the GUI.

    The only other way I know about is:
    1. Edit recurring-backup.xml to create
      new-recurring.xml. However, there's no "priority" field in the
      XML. But there is an "oid" field. Can I just set that?

    2. Move the old npvr.db3 to a safe location, in case it's needed
      again. This wipes out all existing recordings in NextPVR.

    3. Kill and restart NextPVR, so that hopefully it will create an
      empty npvr.db3.

    4. Start "NextPVR.exe -import new-recurring.xml".

    That's a complicated procedure, especially if all I want to do is to
    change one priority. Is that the "official" way to change priorities,
    since I can't find a way in the GUI?

Thanks for your help.

Attachment: c:\Users\Public\NPVR\Logs\logs-20160520-0959.zip
-- I've added recurring-backup.xml to this file.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,117
Threads: 957
Joined: May 2006
#2
2016-05-20, 07:58 PM
You do an EPG update at 2:53 that lasts until. 3:45 which explains two recordings, move the EPG update time to a time you are not recording. You have lots of channels and I think in the next version of NextPVR it will be more efficient.

Priority change ins a real changing priority in NextPVR sucks, you can change them with command line sqlite but with a visual sqlite editor it isn't too bad.

Update doesn't let you change a recording type.

Martin
johnsta
Offline

Member

Posts: 62
Threads: 7
Joined: May 2016
#3
2016-05-20, 09:43 PM
mvallevand Wrote:You do an EPG update at 2:53 that lasts until. 3:45 which explains two recordings, move the EPG update time to a time you are not recording. You have lots of channels and I think in the next version of NextPVR it will be more efficient.

Priority change ins a real changing priority in NextPVR sucks, you can change them with command line sqlite but with a visual sqlite editor it isn't too bad.

Update doesn't let you change a recording type.

Martin




Thanks, that really helps.

I have recordings going on all the time, so I'll just live with the
two recordings, since I can just delete one. It's not a big deal.

Also, thanks for letting me know that I can use sqlite (command line
or visual) to change the priority field of the records.

But what about the IndexOutOfRangeExceptions that I'm getting? Is
that a NextPVR bug?

Thanks again for all your help. This is a great system.
ACTCMS
Offline

Posting Freak

UK
Posts: 2,730
Threads: 101
Joined: Jun 2007
#4
2016-05-20, 10:00 PM
johnsta Wrote:I have recordings going on all the time, so I'll just live with the
two recordings, since I can just delete one. It's not a big deal.
You likely won't have two recordings of the same thing...

The first recording with be from Midnight to 2:53 and the second recording will be from 3:45 to 4:00.

Alex
johnsta
Offline

Member

Posts: 62
Threads: 7
Joined: May 2016
#5
2016-05-20, 10:36 PM
ACTCMS Wrote:You likely won't have two recordings of the same thing...

The first recording with be from Midnight to 2:53 and the second recording will be from 3:45 to 4:00.

Alex


That's not what happened the last 3 nights. I verified that one
recording went from from 12-4, and the other went from 3:45 to 4, and
that the two were the same in the last 15 minutes. I run it every
night, seven days a week. I'll post again if anything changes.
HarryH3
Offline

Posting Freak

U.S.A
Posts: 925
Threads: 56
Joined: Mar 2006
#6
2016-05-21, 03:47 AM
Here's an UpdateEPG batch file that someone posted here a long time ago that will automagically delay an EPG update if a recording is in progress:

Code:
@ECHO off
REM Update EPG only if not recording

Set DEBUG=FALSE
Set BASEUDIR=c:\Users\Public\NPVR
Set BASEPDIR=c:\Program Files (x86)\NPVR
REM BASEPDIR=c:\Program Files\NPVR

Set LOGFILE="%BASEUDIR%\Logs\EpgCheck.log"
Set NSHELPER="%BASEPDIR%\NScriptHelper.exe"
Set NPVR="%BASEPDIR%\NextPVR.exe"

CALL :LOGMSG
CALL :LOGMSG -----------------------------------------------
CALL :LOGMSG Begin EPG Update process

:VALIDATEENV
    CALL :LOGMSG Validating Environment
    FOR %%i IN ("%BASEUDIR%") DO IF NOT EXIST %%~si\NUL (
        CALL :LOGMSG ABORT: Base user directory does not exist. Check script variable BASEUDIR
        GOTO :ENDJOB
    )
    FOR %%i IN ("%BASEPDIR%") DO IF NOT EXIST %%~si\NUL (
        CALL :LOGMSG ABORT: Base Program directory does not exist. Check script variable BASEPDIR
        GOTO :ENDJOB
    )
    FOR %%i IN (%NSHELPER%) DO IF NOT EXIST %%~si (
        CALL :LOGMSG ABORT: NScriptHelper.exe does not exist. Check script variable NSHELPER
        GOTO :ENDJOB
    )
    FOR %%i IN (%NPVR%) DO IF NOT EXIST %%~si (
        CALL :LOGMSG ABORT: NextPVR.exe does not exist. Check script variable NPVR
        GOTO :ENDJOB
    )
    
    set chknpvr=1
:LOOP
    CALL :LOGMSG Check to see if any recording in progress...
    %NSHELPER% -isInUse >> %LOGFILE%
    %NSHELPER% -isInUse | find "NOT RECORDING"
    set chknpvr=%ERRORLEVEL%
    REM CALL :LOGMSG isInUse returns %chknpvr%
    if %chknpvr% NEQ 0 (
        timeout 300
        GOTO :LOOP
    )
    CALL :LOGMSG No recordings in progress, update the EPG.
    c:
    cd "C:\Users\Public\NPVR\mc2xml"
    mc2xml -d 240
    CALL :LOGMSG EPG Update complete
    GoTo :ENDJOB

--------------------------------------------------------------------------------------------
:LOGMSG
    if "%*". EQU "". (
        echo.
    ) else (
        echo %*
    )
    echo %date% %time% %* >> %LOGFILE%
    Goto :EOF

--------------------------------------------------------------------------------------------
:ENDJOB
    If %DEBUG% EQU TRUE Pause
i3-3570k, 8GB RAM, Win10 Pro, Nvidia GT710, HDHomeRun (OTA), NPVR 6.x
On a clear disk, you can seek forever...
BrettB
Offline

Posting Freak

Saint Paul, MN, USA
Posts: 2,668
Threads: 170
Joined: Jun 2007
#7
2016-05-21, 07:57 AM
johnsta Wrote:
  • The "Update" button doesn't seem to work for me at all. If
    I try to use it on a series, the "Recording Type" comes up as "Record
    Once," even though it's a series. If I try to use it on a manual
    recording, whether I've inserted it through the GUI or through INSERT,
    then I get an System.IndexOutOfRangeException when I click on
    "Update", as in the above thread. Is this a bug in NextPVR, or is
    this happening because of some issue in npvr.db3?

It sounds like you are trying to update a specific scheduled instance of a recurring recording instead of the recurring recording itself. When you are on the Recordings list screen, press the left or right arrow until it shows "Recurring Recordings", then select the recording your want to change, and update that. (FYI: I'm not sure that the change will be reflected in any specific scheduled instances of the updated recurring recording until an EPG update runs--either automatically or manually.)

To change the priority of recurring recordings, go to the same recordings list screen and get to the "Recurring Recordings" list. Sort the list by priority by pressing the Stop button until it displays "Sort By Priority Ascending" or "Sort By Priority Descending". You can then select (i.e. highlight) the recording you want to adjust and press the skip buttons to move the selected item up/down the priority list. (FYI: The keyboard equivalent for "skip left" and "skip right" are the Ctrl-Left and Ctrl-Right.) Again, the changes in prority won't be reflected in the specific scheduled recording instances until an EPG update is run.
johnsta
Offline

Member

Posts: 62
Threads: 7
Joined: May 2016
#8
2016-05-22, 12:51 PM
HarryH3 Wrote:> Here's an UpdateEPG batch file that someone posted here a long
> time ago that will automagically delay an EPG update if a
> recording is in progress:

Thanks for posting that script. It contains lots of useful stuff that
I can use for other purposes.

However, since I have something recording 24 hours a day, I would
never get an EPG update. So I'm just going to leave it the way it is
for now, and live with the dual recording.
johnsta
Offline

Member

Posts: 62
Threads: 7
Joined: May 2016
#9
2016-05-22, 01:19 PM
BrettB Wrote:> It sounds like you are trying to update a specific scheduled
> instance of a recurring recording instead of the recurring
> recording itself. When you are on the Recordings list screen,
> press the left or right arrow until it shows "Recurring
> Recordings", then select the recording your want to change, and
> update that. (FYI: I'm not sure that the change will be reflected
> in any specific scheduled instances of the updated recurring
> recording until an EPG update runs--either automatically or
> manually.)

You're right that I've been confusing updating a specific scheduled
instance with a recurring instance. So just to be clear: If I go to
the Recurring Recordings screen, double-click on recurring recording
that I've entered manually (using "Man-Rec"), then click on "Update",
then NextPVR crashes with an array out of bounds exception and has to
be restarted. Fortunately, NextPVR handles the problem gracefully
otherwise -- i.e., doesn't leave the database locked or anything, so
it's no problem just to restart NextPVR.

BrettB Wrote:> To change the priority of recurring recordings, go to the same
> recordings list screen and get to the "Recurring Recordings"
> list. Sort the list by priority by pressing the Stop button until
> it displays "Sort By Priority Ascending" or "Sort By Priority
> Descending". You can then select (i.e. highlight) the recording
> you want to adjust and press the skip buttons to move the selected
> item up/down the priority list. (FYI: The keyboard equivalent for
> "skip left" and "skip right" are the Ctrl-Left and Ctrl-Right.)
> Again, the changes in prority won't be reflected in the specific
> scheduled recording instances until an EPG update is run.

Thanks for letting me know about this.
johnsta
Offline

Member

Posts: 62
Threads: 7
Joined: May 2016
#10
2016-05-22, 01:20 PM
I thought the following might be useful to other people. This is the
sql to get a listing of scheduled recordings for the next three days,
followed by a listing of the recurring recordings. Just put
sqlite3.exe on your path and paste this into a command window:

Code:
sqlite3.exe c:\Users\Public\NPVR\npvr.db3

select datetime(start_time, 'localtime'),
time(end_time, 'localtime'),
printf("%10s ", channel_name), name, failure_reason
from SCHEDULED_RECORDING
where end_time > datetime()
  and start_time < datetime('now', '+3 day')
order by start_time ;

select oid, priority, name from Recurring_recording ;
.exit


I constantly tweak this in various ways and use it all the time.

It's wonderful to have this capability back again. Years ago, when I
was using Beyond TV, I could get an ascii listing of the scheduled
recordings, but I was never able to do so with WMC. Having this
capability back again is really nice.

By the way, I've recently learned that you can also get a listing
of this type with:

> NScriptHelper.exe -pending
« 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
  EPG Update Errors jcole998 23 1,647 2025-05-11, 06:03 PM
Last Post: mvallevand
  Device Update - Channel Mapping chezmorris 10 4,810 2022-07-01, 01:59 PM
Last Post: mvallevand
  tsreader4 skipping issues dlindyds 63 14,796 2021-09-05, 03:23 AM
Last Post: rizarefaldi
  ITV/BBC HD and EPG missing from scan and update angelisle 16 4,292 2021-08-26, 11:45 AM
Last Post: NumberFive
  Fast-forward and comskip issues manic_biker 11 3,966 2021-07-12, 02:17 AM
Last Post: Robazz
  Issues with Signal? Tularis 6 2,419 2021-05-01, 11:09 AM
Last Post: shspvr
  Auto Update EPG not running as scheduled? BairStrokes 2 1,801 2021-03-26, 12:02 PM
Last Post: NumberFive
  automatic EPG update virtualpaul 18 13,134 2021-01-29, 12:40 PM
Last Post: virtualpaul
  Auto Update EPG not running as scheduled Bobbybear 10 3,748 2020-10-24, 09:24 AM
Last Post: Bobbybear
  Microsoft update Brucek2839 2 1,538 2020-09-12, 03:29 AM
Last Post: Brucek2839

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

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

Linear Mode
Threaded Mode