Page 1 of 4 123 ... LastLast
Results 1 to 10 of 38

Thread: External tool: Transfer Season Record schedules from GBPVR to NPVR

  1. #1
    Join Date
    Dec 2004
    Location
    Stockholm, Sweden
    Posts
    115

    External tool: Transfer Season Record schedules from GBPVR to NPVR

    I've hacked together a tool that can copy Season Record schedules from GBPVR to NPVR.
    It's only been tested with GBPVR 1.3.11 and NPVR 1.5.24 so if you have another combo,
    tread carefully. Backup the npvr.db3 file before using it.. If you have a standard NPVR installation, that file is located in C:\Users\Public\NPVR.

    I made the tool for my own use, so it's rather techy and not the most user friendly tool that has seen the light of day, but I've added some help texts.
    One key point is that the tool needs to "map" the channels between GBPVR and NPVR, i.e. it needs to figure out what id a channel in NPVR has in GBPVR. It tries to figure out this mapping on it's own, but if there are channel names that differ between GBPVR and NPVR, you have to do some manual input.

    There is a preview step before actually modifying the NPVR database. This is probably of no use to most people, but it will generate some XML where those so inclined can see if the data seems reasonable...

    Anyway, hopefully it will be of use to some of you...


    INSTALLATION
    Just unpack the zip file to a separate directory, then run GBPVRtoNPVR.exe and follow the instructions.

    2010-12-29
    NOTE: On Windows7 64bit (maybe also Vista 64bit), use the x86 version.
    Attached Files Attached Files
    Last edited by kendrak24; 2013-04-11 at 05:56 AM. Reason: Updated zip files to latest version

  2. #2
    Join Date
    May 2006
    Location
    Canada
    Posts
    20,947
    kendrak24, you beat me, I started working on a similar tool a couple of days ago because I thought it was needed, and fixing channel mapping differences is the key thing to correct to make this automatic.

    Martin

  3. #3
    Join Date
    Dec 2004
    Location
    Stockholm, Sweden
    Posts
    115
    Yeah, I would imagine there are some users that have accumulated a big list of Season Record schedules in GBPVR over the years.
    I had over a hundred myself. Before I got all the Season Records transferred, the switch from GBPVR to NPVR didn't feel...well, complete, somehow.

  4. #4
    Join Date
    Nov 2005
    Location
    East Yorkshire, England
    Posts
    4,266
    I will try to give this a try over the weekend. I guess it will be a rarely used, but extremely useful tool for many gbpvr users.
    My switch to NPVR full time is paused awaiting search and client support, so all my npvr is just testing/playing and something like this could be used quite a bit during rebuilding.


  5. #5
    Join Date
    Nov 2005
    Location
    East Yorkshire, England
    Posts
    4,266
    Unfortunately I get an unhandled exception box at step 3 - NPVR data when I press the Preview button. Tried it a few times and always the same.

    Anything I can do to help?

    Martin

    edit: I should have said. GBPVR version 1.4.7 and NPVR 1.5.28 It seems to pick things up from both databases fine and the mapping works for those channels with matching names..





    See the end of this message for details on invoking
    just-in-time (JIT) debugging instead of this dialog box.

    ************** Exception Text **************
    System.InvalidCastException: Specified cast is not valid.
    at GBPVRtoNPVR.GBPVRtoNPVR.createNPVRData(Boolean preview) in D:\utv\c#\GBPVRtoNPVR\GBPVRtoNPVR\Form1.cs:line 405
    at GBPVRtoNPVR.GBPVRtoNPVR.onNPVRPreviewDataButtonCli ck(Object sender, EventArgs e) in D:\utv\c#\GBPVRtoNPVR\GBPVRtoNPVR\Form1.cs:line 748
    at System.Windows.Forms.Control.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnMouseUp(MouseEventAr gs mevent)
    at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.ButtonBase.WndProc(Message& m)
    at System.Windows.Forms.Button.WndProc(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


    ************** Loaded Assemblies **************
    mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
    ----------------------------------------
    GBPVRtoNPVR
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Documents%20and%20Settings/martin/Desktop/NPVR/GBPVRtoNPVR/GBPVRtoNPVR.exe
    ----------------------------------------
    System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    ----------------------------------------
    System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
    ----------------------------------------
    System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    ----------------------------------------
    System.Data.SQLite
    Assembly Version: 1.0.66.0
    Win32 Version: 1.0.66.0
    CodeBase: file:///C:/Documents%20and%20Settings/martin/Desktop/NPVR/GBPVRtoNPVR/System.Data.SQLite.DLL
    ----------------------------------------
    System.Data
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
    ----------------------------------------
    System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
    ----------------------------------------
    System.Transactions
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll
    ----------------------------------------
    System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
    ----------------------------------------
    System.EnterpriseServices
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.EnterpriseServices/2.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
    ----------------------------------------

    ************** JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.

    For example:

    <configuration>
    <system.windows.forms jitDebugging="true" />
    </configuration>

    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.
    Last edited by martint123; 2010-08-12 at 02:07 PM.


  6. #6
    Join Date
    Nov 2005
    Location
    East Yorkshire, England
    Posts
    4,266
    BUMP?

    [QUOTE=martint123;385016]Unfortunately I get an unhandled exception box at step 3 - NPVR data when I press the Preview button. Tried it a few times and always the same.

    Anything I can do to help?

    Martin

    My only other thought for a fix to get some of my season recordings moved from GBPVR to NPVR (for those in the list, but not in the EPG yet) is to create a dummy EPG with these shows in and set them up as seasons in NPVR and clear the EPG afterwards.


  7. #7
    Join Date
    Dec 2004
    Location
    Stockholm, Sweden
    Posts
    115
    Quote Originally Posted by martint123 View Post
    Unfortunately I get an unhandled exception box at step 3 - NPVR data when I press the Preview button. Tried it a few times and always the same.
    I suspect it must have something to do with the data entered in the mapping grid not being numeric or something...
    I've uploaded a new version in the first post which validates input in the mapping grid fields.
    Last edited by kendrak24; 2010-10-17 at 08:30 PM. Reason: Removed attachement. Moved it to first post...

  8. #8
    Join Date
    Nov 2005
    Location
    East Yorkshire, England
    Posts
    4,266
    Many thanks for the update, sadly I still get an exception as below. I am running npvr 1.5.33 now, but AFAIK the database is the same.
    Step one, getting gbpvr data works fine.
    Step 2, channel mapping works fine (possible change request, sort on name rather than OID for the npvr channel list??)
    It is when hitting the preview button that the exception occurs.

    regards,
    Martin

    Code:
    See the end of this message for details on invoking 
    just-in-time (JIT) debugging instead of this dialog box.
    
    ************** Exception Text **************
    System.InvalidCastException: Specified cast is not valid.
       at GBPVRtoNPVR.GBPVRtoNPVR.createNPVRData(Boolean preview) in D:\utv\c#\GBPVRtoNPVR\GBPVRtoNPVR\Form1.cs:line 411
       at GBPVRtoNPVR.GBPVRtoNPVR.onNPVRPreviewDataButtonClick(Object sender, EventArgs e) in D:\utv\c#\GBPVRtoNPVR\GBPVRtoNPVR\Form1.cs:line 755
       at System.Windows.Forms.Control.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ButtonBase.WndProc(Message& m)
       at System.Windows.Forms.Button.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    
    
    ************** Loaded Assemblies **************
    mscorlib
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
        CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
    ----------------------------------------
    GBPVRtoNPVR
        Assembly Version: 1.0.0.0
        Win32 Version: 1.0.0.0
        CodeBase: file:///C:/Documents%20and%20Settings/martin/Desktop/NPVR/GBPVRToNPVR_20101017/GBPVRtoNPVR.exe
    ----------------------------------------
    System.Windows.Forms
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    ----------------------------------------
    System
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
    ----------------------------------------
    System.Drawing
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    ----------------------------------------
    System.Data.SQLite
        Assembly Version: 1.0.66.0
        Win32 Version: 1.0.66.0
        CodeBase: file:///C:/Documents%20and%20Settings/martin/Desktop/NPVR/GBPVRToNPVR_20101017/System.Data.SQLite.DLL
    ----------------------------------------
    System.Data
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
    ----------------------------------------
    System.Xml
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
    ----------------------------------------
    System.Transactions
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll
    ----------------------------------------
    System.Configuration
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
    ----------------------------------------
    System.EnterpriseServices
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.EnterpriseServices/2.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
    ----------------------------------------
    
    ************** JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.
    
    For example:
    
    <configuration>
        <system.windows.forms jitDebugging="true" />
    </configuration>
    
    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.

  9. #9
    Join Date
    Dec 2004
    Location
    Stockholm, Sweden
    Posts
    115
    Quote Originally Posted by martint123 View Post
    Many thanks for the update, sadly I still get an exception as below. I am running npvr 1.5.33 now, but AFAIK the database is the same.
    Step one, getting gbpvr data works fine.
    Step 2, channel mapping works fine (possible change request, sort on name rather than OID for the npvr channel list??)
    It is when hitting the preview button that the exception occurs.
    Very strange. I can't reproduce this error no matter what data I put in the mapping grid...
    Can you take a screenshot of the app when you're done mapping the channels (so just before you switch to the third tab)?
    Please make sure as much of the grids as possible are visible, so make the app as big as you can before taking the screenshot.

    I've updated the attachment in the first post with a new version which contains a small change that _may_ fix the problem.
    Also the sort order for the NPVR channel grid is changed to sorting by name instead of OID.

  10. #10
    Join Date
    Nov 2005
    Location
    East Yorkshire, England
    Posts
    4,266
    Whatever your small change was seems to have fixed it. I've got the screen dump just in case you still need it, but I guess it may not be required now.

    My next step would have been to temporarily delete lots of recurring entries and try to pin it down to a specific one or group.

    I haven't gone though importing the data yet, thought I'd report getting past step 3 first

    Very many thanks
    Martin

    edit: p.s. The sorted destination channel list speeds up the process quite a lot rather than having to search for the missing channel names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •