PDA

View Full Version : SageTV Import Utility



mvallevand
2011-08-13, 12:00 AM
Here are the step need to run this utility. It is much easier if you install NPVR on the same box as NPVR. Note this is designed to be run before you configure devices or an EPG.


1. First in you need the SageTV web interface server and the sagex-services plugins installed. If you install the plugins with the web defaults you only need to change the IP if you are not running NPVR and SageTV on the same box.

2. You need to place use 7zip to decompress the attached file and place the NextSageGUI.exe in "Program Files\NPVR" or with 64bit
"Program Files(x86)\NPVR folder"

3. Run NextSageGUI. Input the forms values and if you are running on the server you don't need to change the IP, and for no running on the
server leave everything tick.

If you are running from another PC untick "Use Local Drives" but be forwarned if your Sage Recordings aren't on shares you will be prompted with a Notepad and you will need to do global search and replace on your shares

ie Search for "D:\Sage Archive" and replace with \\IP\Sharename

4. When it exits you will have an NextPVR datbase file in your NPVR user directory in the SageImport folder called NPVR.db3. If you have not configured your NextPVR EPG or tuners just replace the file in the database directory with this new one. The User Directory by default is

Windows Vista, 7, Server 2008: C:\users\public\npvr
Windows XP, Server 2003: c:\documents and settings\all users\application data\npvr

If you have configured NPVR, rename the existing NPVR.db3 before continuing.

If everything works the next time you start NextPVR you should have a channel list with no EPG data with your stations and icons, your Favourites should be includes and all your Recordings with their resume points.

Martin

CraziFuzzy
2011-08-13, 02:34 AM
Had some success with this. It seems to have brought in the recordings database, and I saw it bring in the channel logos and such. It only brought in one of the channel lineups I have. It also now gives an exception when navigating to the recordings screen.

logs attached:

mvallevand
2011-08-13, 02:53 AM
Sub, will probably have to look at the trace error on metadata. Does the machine you are connecting from have access to the O: drive?

Edit: If it does, is your copy of ffdshow allowing NextPVR.exe and do you have mpeg2 decoding enabled in ffdshow? You might need to go into the Decoder configuration screen of NPVR (right click the NextPVR screen).

Martin

mvallevand
2011-08-13, 03:16 AM
From the thread with your database, it looks like the import of the ATSC channels would work, but NPVR doesn't like the SageTV format you used (with dashes) that the import utility made.

Martin

toricred
2011-09-24, 10:55 PM
Now that I have done a proof of concept, I have moved on to using this utility. After running it and moving the resulting db3 file into place I am getting an error message when trying to open recordings, the guide, or aome of the other parts of setup. a screenshot of the error is attached.

mvallevand
2011-09-25, 12:30 AM
Now that I have done a proof of concept, I have moved on to using this utility. After running it and moving the resulting db3 file into place I am getting an error message when trying to open recordings, the guide, or aome of the other parts of setup. a screenshot of the error is attached.

Ok, I havent tried this with 2.2.6. Did you go into devices to add them to the database?

Martin

toricred
2011-09-25, 12:35 AM
Would that also cause the recordings list to be blank?

toricred
2011-09-25, 01:04 AM
I went in and re-added the sources. I also cleaned out the channels that showed a source of "unknown". Still getting the same error.

mvallevand
2011-09-25, 02:11 AM
I think I remember Fuzzy had a problem, because SageTV properly allows virtual channels with the decimal place. I did update the utility but maybe not the forum post. I'll post it again after I finish watching Fringe.

Martin

mvallevand
2011-09-25, 03:20 AM
I have update the utility in the first thread. If that doesn't work you will need to upload the compressed contents of the SageImport folder.

Martin

toricred
2011-09-25, 03:30 AM
Ok, that's an improvement. I now have the channel lists with no error boxes. It still isn't showing my favorites or recordings. What's next?

toricred
2011-09-25, 03:37 AM
BTW here is the imports folder.

mvallevand
2011-09-25, 04:38 AM
Ok, I can import your recordings (although I can't import the resume location which I do online), can you compress and send the SageImport.log from the log folder I forgot to ask for it.

Martin

toricred
2011-09-25, 04:49 AM
I don't see a SageImport.log, but I do see a NextSage.log and here it is. The resume location isn't important. Would favorites be possible?

mvallevand
2011-09-25, 05:10 AM
Sorry, I forgot what the name was. Could you try it again and this time untick local drives and change Sorcerer's to Sorcerers that should get by this problem.

If it gets past this favourites might be possible.

Martin

toricred
2011-09-25, 05:17 AM
It appears to have pulled it all in now. Thank you so much for your patience.

mvallevand
2011-09-25, 05:33 AM
Thanks for your patience and helping with the beta test, I will update the utility to deal with the apostrophe in the filename.

Martin

toricred
2011-10-01, 05:32 PM
I am spending more time with npvr this morning and noticed that all the recurring recordings came in with the channel locked to the first channel in my lineup. In SageTV they were all set to any channel as long as the series name matches. Is there a way to have this as a default? Also did you ever get the apostrophe issue resolved?

mvallevand
2011-10-01, 05:57 PM
I am spending more time with npvr this morning and noticed that all the recurring recordings came in with the channel locked to the first channel in my lineup. In SageTV they were all set to any channel as long as the series name matches. Is there a way to have this as a default? I didn't have a lot of wiz.bin's to work from but I tried to find you the best matching NPVR rule. Could you select an update from the recordings menu and post a screen shot.


Also did you ever get the apostrophe issue resolved?

Yes I updated the first post.

Martin

toricred
2011-10-15, 06:38 PM
I'm really sorry to bother you again, but I am doing my final run to migrate away from Sage this week. All of a sudden when I run this utility it errors out with a 500 Internal Server Error. There might have been an update to the sagex.api. I'm assuming you are using this api for the utility. If that is so then I should be able to contact the developer of that api and revert it. So I guess the question is are you using the sagex.api?

mvallevand
2011-10-15, 07:37 PM
I'm really sorry to bother you again, but I am doing my final run to migrate away from Sage this week. All of a sudden when I run this utility it errors out with a 500 Internal Server Error. There might have been an update to the sagex.api. I'm assuming you are using this api for the utility. If that is so then I should be able to contact the developer of that api and revert it. So I guess the question is are you using the sagex.api?

Yes I use sagex and sage web services. Unfortunately both my sage server and the Microsoft XP vhd expired, so I will have to reinstall from scratch to test if it is my problem.

Martin

toricred
2011-10-15, 09:02 PM
I think I may have found the problem on my system. I am consolidating my recordings to one drive and the Sage wiz.bin is confused at the moment. When I finish consolidating then I can get the wiz.bin consistent and try again.

mvallevand
2011-10-15, 10:14 PM
Ok. I have reinstalled the VM and SageTV with the latest required web plugins and I didn't see any new errors. If you'd still like me to do something about importing favourites, PM me your email, and I'll contact you to get a copy of your wiz.bin and I can see what I can do.

Martin

toricred
2011-10-15, 11:04 PM
I already have all the favorites. What I am mainly looking for is importing my recordings and tuners.

mvallevand
2011-10-15, 11:34 PM
Importing tuners would be much too difficult and prone to error and changes in NPVR logic.

Martin

toricred
2011-10-15, 11:55 PM
Maybe I don't understand the details on tuners. One of my Colossus tuners is working fine in Sage, but doesn't show up at all in NPVR. Right now the more important part is importing the recordings.

mvallevand
2011-10-16, 12:37 AM
You probably should post about NPVR not-detecting the second Colossus device in the main forum so sub can help you out.

Martin

toricred
2011-10-16, 12:38 AM
I found the problem. I'm running FlexRAID now for it's storage pool technology. Apparently it is using something that this utility doesn't like. When I stop FlexRAID then the utility runs fine.

I spoke too soon. It just took longer to error out. Any other suggestions for getting my recordings imported?

mvallevand
2011-10-16, 01:13 AM
I spoke too soon. It just took longer to error out. Any other suggestions for getting my recordings imported?

I guess I need your wiz.bin file.

Martin.

mvallevand
2011-10-16, 06:02 AM
There is a crash/bug in the XML output logic in the SageTV web server. I deleted the following entries using the Sage web interface and it worked again.

DoctorWho-TheStolenEarth-4384349-0.ts
Heroes-Run-4077818-0.ts

However it seems you don't have have Channels configured in that wiz.bin. If you don't configure any I modified the import utility to deal with this odd situation.

Martin

toricred
2011-10-16, 06:28 PM
The wiz.bin isn't configured in any special way to the best of my knowledge, but I will have to add the channels anyhow when I add the tuners. Could I get the modified version?

mvallevand
2011-10-16, 07:59 PM
Sure I have updated the file in post 1.

Martin

toricred
2011-10-30, 07:03 PM
I have started using npvr this weekend. For some reason the favorites imported with this utility aren't being scheduled to record. When I try to update or cancel them I get an error Unable to update recurring recordings with advanced rules. Is there a file with the advanced rules that I can look at to try to fix this?

mvallevand
2011-10-30, 08:14 PM
Do an EPG update from NPVR and send your logs, it should show all the rules in action. I could easily have messed something up on the import, you are the first person to test it for "real".

Martin

toricred
2011-10-30, 08:27 PM
Let me know if I am missing any other logs.

mvallevand
2011-10-30, 08:58 PM
Sub, if you happen by this thread, can you look at the NPVR.log to see if the rules look right for an All Episodes Any Channel recording.

Martin

sub
2011-10-30, 10:11 PM
You could see if this patch helps: http://forums.gbpvr.com/showthread.php?50946-Recordings-fail-using-the-quot-Any-Channel-quot-option&p=422487#post422487

toricred
2011-10-30, 10:21 PM
That sort of fixed it. It gets everything, but some things are listed multiple times. For example the episode of Once Upon A Time airing tonight is listed to be recorded 3 times.

EDIT: Never Mind. While trying to fix this I had created multiple copies of the recurring recording. It all looks right now.

mvallevand
2011-10-30, 10:36 PM
Good, although but I noticed there were some problems on the import. I didn't mark up the apostrophes so SQL won't like shows like

Harry's Law
R.L. Stine's The Haunting Hour: The Series
Charlie's Angels
Harper's Island

You might be able to edit the Advanced Rule and just add a second apostrophe.

Edit (for new users) I have updated the utility to use double apostrophes.

Martin

toricred
2011-10-31, 12:43 AM
Where would I go to add the second apostrophe?

mvallevand
2011-10-31, 12:51 AM
The Recurring Recordings screen in Recordings. Update. The Advance Rules (sic) field is awkward to edit because there is no cursor so just backspace to the apostrophe and type. It might be easier to delete these rules and add new ones.

Martin

PatM
2012-03-13, 06:40 PM
Does this not import the TV recordings from Sage? Just ran it and I have channels, favorites and Icons, no recordings.

DOH! I was looking at it wrong... Trying to use the import function. Copied over the db3 and they're there.

PatM
2012-03-15, 01:48 PM
Ran into a big problem. When I first did the imports all the recordings from sage worked fine. I've had NPVR add recordings of the same series and now only the new recordings from NPVR will play. Imported Sage recordings bring up the play screen but the viewing area is black, no sound, and the timeline bar shows 00:00:00 at both ends as if the recordings were zero length.

I'm wondering if it's a path problem. THe sage recordings are all in the root directory while the new recordings are in directories based on the series name. Perhaps the existance of the directory makes NPVR look in the wrong place? I tried copying a sage recording to the series directory but no change. This was just before leaving for work though so I didn't have time to restart NPVR Services.

mvallevand
2012-03-15, 04:17 PM
If the SageTV server and NextPVR server are the same box you shouldn't have a problem because all the paths are the same and NextPVR will use the stored filename from SageTV, the series name in NextPVR is optional anyway The fact that you are seeing black and not getting an error seems to indicate the file, and uploading your logs could confirm this. My guess is that the problem relates to SageTV's preference to store files as mpeg-ps (.mpg) and your system might need to have an mpeg splitter installed. (ie LAV or Haali) The logs would also show this.

Note when you run the Import utility the import xml file would have opened up in Notepad allowing you to change relative paths, if you were running from a separate server.

Martin

PatM
2012-03-15, 09:35 PM
I have both LAV and Haali installed (newest CCCP pack) and configured. Both NPVR and Sage were on the same machine but I didn't see any notepad pop up after running the utility.

It's a db3 database and I believe that's sqlite isn't it? I can always install it and browse the database file to see.

Still seems odd that after the import and before having NPVR do any recordings the imported files worked fine. It's only afterward, when NPVR did some recordings, that we seem to be having problems. Might be just coincidence of course.

mvallevand
2012-03-15, 09:49 PM
I have both LAV and Haali installed (newest CCCP pack) and configured. Both NPVR and Sage were on the same machine but I didn't see any notepad pop up after running the utility.

You would have had to tick Use Shares on the import.


It's a db3 database and I believe that's sqlite isn't it? I can always install it and browse the database file to see.

Yes it is , but if you compress and upload your logs, things would be apparent. You can also browse the import file used in DataDirectory\SageImport\SageIn.xml and look for

filePath=

Martin

PatM
2012-03-16, 02:03 PM
Didn't have any time to experiment last night but this morning I did a quick check.

I can play all recordings, sage or not, on the server machine. I can only play NPVR recordings on the client. I had NPVR on my laptop as a client which I did a quick check with and it's the same as the other client - can't play sage recordings (mpg) but can play NPVR recordings. I didn't have time to check but I'm thinking I have CCCP on both clients and K-Lite on the server. Tonight I should have a lot more time so I can pack up logs and experiment more thoroughly.

sub
2012-03-16, 04:47 PM
The client/server protocol is only designed to work with file types that NextPVR records, ie .ts files. If you're trying to watch other file types, like .mp4, .mkv, .mpg etc, then nextpvr wont be able to watch them. You'd need to watch them from the video library on a client PC.

When it comes to these other file formats, nextpvr just leaves it up to directshow to use whatever decoders and splitters it wants. Those components are typically only designed to work with files on a filesystem though, so have no concept of using TCP/IP etc to stream it from a client machine.

PatM
2012-03-17, 01:33 PM
Ok, that explains it. I'll just toss the sage recordings.

I'm working on getting STBs to work with my hauppauge cards and when that's done we'll have much better quality recordings so that should mollify the wife about losing her shows 8)

Beefstew83
2012-05-11, 01:05 AM
What formats does NPVR natively play? I haven't recorded anything yet. I have a bunch of SageTV and BeyondTV shows going back to the early 2000's (almost 2gb worth compressed as divx, etc). I need to figure a way for the wife to watch them if she desires from her laptop. It may be possible to convert them to a native NPVR format so they will all appear together (that may blow up their size though).

mvallevand
2012-05-11, 01:52 AM
What formats does NPVR natively play? I haven't recorded anything yet. I have a bunch of SageTV and BeyondTV shows going back to the early 2000's (almost 2gb worth compressed as divx, etc). I need to figure a way for the wife to watch them if she desires from her laptop. It may be possible to convert them to a native NPVR format so they will all appear together (that may blow up their size though).

Native format is mpeg.ts but from the Video Library you can pretty much play any format that Windows can play with the appropiate codecs Using the Import utiity into the Recordings database there is a limit on clients to only use .ts. I am not sure why sub block others formats from the client it would likely be able to configure the client to play everything but C:\ files.

You must mean 2TB, 2GB isn't even an half an hour these days.

Martin

Beefstew83
2012-05-11, 10:22 PM
That is quite a shame. That will be a barrier to using NPVR. I would have to use a split system of SageTV for viewing (and recording clearQAM) and NPVR for recording CableCard. That would be a less desirable solution all around.

skl111
2012-10-04, 05:43 AM
Martin,
I posted this thread in the wishlist section and Had forgot about your utility.
Would it be possible to modify this so it could be ran every hour or so to import updated information from sage into npvr? and vice versa?

http://forums.gbpvr.com/showthread.php?52750-STV-NPVR-Intermediate-App

skl111
2012-10-04, 05:47 AM
The client/server protocol is only designed to work with file types that NextPVR records, ie .ts files. If you're trying to watch other file types, like .mp4, .mkv, .mpg etc, then nextpvr wont be able to watch them. You'd need to watch them from the video library on a client PC.

When it comes to these other file formats, nextpvr just leaves it up to directshow to use whatever decoders and splitters it wants. Those components are typically only designed to work with files on a filesystem though, so have no concept of using TCP/IP etc to stream it from a client machine.

Sub is this still the case? This is actually the information I was requesting in the item list, I just didn't phrase it nearly as clear. Would it be possible to use FFMPEG to stream the non .ts files as .ts files for the clients?

dinki
2013-01-23, 03:04 PM
Just wanted to say thanks for creating this. I'm a former GBPVR user that went to SageTV because of the extender hardware and now I'm making my way back in the hopes of continuing to use my media mvps as well as adding XBMC frontends to tie into NPVR's backend for live tv.

I have a TON of recordings and am finding that NPVR is having a hard time digesting them. I'm seeing a lot of 'not responding' for a while in the gui on my server. I haven't set up the tuners or added an EPG source (Schedules Direct) yet so hopefully that will fix whatever problems I'm seeing.

mvallevand
2013-01-24, 01:22 AM
There are a couple of config.xml setting that will help since nextpvr check through you TON each startup changes these defaults to false.

<AutoRemoveMissingRecordings>false</AutoRemoveMissingRecordings>
<CheckForRenamedRecordings>false</CheckForRenamedRecordings>

Martin

dinki
2013-01-24, 01:18 PM
Wow! That made a huge difference! Thanks so much!

dinki
2013-06-14, 08:38 PM
I'm back for more. I'm almost ready for the transition. My question is is there a way for me to keep the settings I've set for NPVR (tuner and channel setup), but 'refresh' my database to include my latest sagetv recordings and favorite recordings? Can this be done or is it just easier to start from scratch when I officially make the switch?

mvallevand
2013-06-14, 09:48 PM
If you copy your proper npvr.db3 into the SageImport folder and don't check Import Channels I think it will do what you want.

Martin

dinki
2013-06-17, 12:59 PM
Thanks for the reply. So by copying the npvr.db3 file into SageImport directory before running the utility the utility will then append the information from SageTV to what already exists? Then after I move the new npvr.db3 back to its original location and all should be well?

mvallevand
2013-06-17, 09:24 PM
I think so, but backup your original npvr.db3 just in case.

Martin

SkierHiker
2013-10-16, 07:41 AM
I'm hoping this is simple but when I run NextSageGUI.exe I get the following exception. I have .Net Framework 4.5 installed.

System.BadImageFormatException: Could not load file or assembly 'NUtility, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
File name: 'NUtility, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
at NextSageGUI.NextSage..ctor()
at NextSageGUI.Form1.button1_Click(Object sender, EventArgs e)
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)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].



************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5472 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
NextSageGUI
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Program%20Files%20(x86)/NPVR/NextSageGUI.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5468 (Win7SP1GDR.050727-5400)
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.5467 (Win7SP1GDR.050727-5400)
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.5467 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5476 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5476 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Data
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5459 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.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.

mvallevand
2013-10-16, 08:38 AM
I hope it's simple too, I didn't update this for 3.1 but I will give if a go. I wasn,t sur if anyone needed it any longer.

Martin

mvallevand
2013-10-16, 12:18 PM
I hope it's simple too, I didn't update this for 3.1 but I will give if a go. I wasn,t sur if anyone needed it any longer.

Martin

A quick look at the source and it might still work. You do need to install the utility to the NextPVR Program folder as Admin if that doesn't work, I will rebuild it.

Martin

SkierHiker
2013-10-18, 06:29 AM
Where do I get the new version? The link on the first page still downloads what looks like the old version.

My SageTV client PC bit the dust so I'm looking for an alternative to a SageTV extender.

mvallevand
2013-10-18, 12:41 PM
Where do I get the new version? The link on the first page still downloads what looks like the old version.

My SageTV client PC bit the dust so I'm looking for an alternative to a SageTV extender.

As I wrote that older version might work, did you actually try it with it saved in the Program Files folder?

Martin

SkierHiker
2013-10-19, 05:54 AM
I'm admin on the box and it was installed in the NPVR folder. I even tried running it as administrator, same behavior.

mvallevand
2013-10-20, 02:09 AM
Ok here it is recompiled, I can no longer test it.

Martin

SkierHiker
2013-10-21, 04:10 AM
It works, thanks. Now I just have to figure out how to use it. I have it installed on my File Server and need to stream to my TV via either Chromecast or a Roku box. Any suggestions to help me save time scouring the forums? I have Plex installed with a SageTV plugin but its looking like I'll have to re-encode all my TV files to mp4 for efficient streaming. Does NPVR have a Plex plugin or something better?

mvallevand
2013-10-21, 04:18 AM
Good. My suggestion would be to forget Chromecast and Roku if you don't want to transcode the limitations are with SageTV.

Martin

avandeputte
2013-12-31, 02:10 AM
I too had the big ugly error until the recompiled version from a couple posts ago. Now it runs. Or it seems to, I do get a SageImport folder, with 4 files, but the npvr.db3 file has an old timestamp and doesn't appear to contain much of anything. I attached the content of the folder in a zip.

Any clues? I am a bit late to the Sage --> NextPVR conversion, such a relief to see this utility existed!

The NextSage.log has this (and only this):

[...startup]
2013-12-30 21:58:45.079 [DEBUG][1] Exception has been thrown by the target of an invocation.
2013-12-30 21:58:45.094 [DEBUG][1] Exception has been thrown by the target of an invocation.
2013-12-30 21:58:45.106 [DEBUG][1] Exception has been thrown by the target of an invocation.

mvallevand
2013-12-31, 03:29 AM
The NextSage.log has this (and only this):

It worked for me as an offline import. My wife is working here way through the same House Hunters marathon. Did you install it in the NPVR Program Directory?

Here's a version I used I recompiled it just in case I changed something.

Edit: Also I noticed that I was able to add OriginalAirDate and Genres to the Recordings data in case any skin uses them ever.

Martin

avandeputte
2014-01-01, 12:32 AM
Great! No crashes/errors with this version, and I see the db3 file with the same timestamp as the other 3 files - so I think it worked.

Just curious though, what do you mean when you said you exported them offline? Unfortunately I already configured nextPVR before I discovered this utility, I am not looking forward to start over with a new db3...

Happy new year!

mvallevand
2014-01-01, 01:13 AM
Great! No crashes/errors with this version, and I see the db3 file with the same timestamp as the other 3 files - so I think it worked.

Great



Just curious though, what do you mean when you said you exported them offline? Unfortunately I already configured nextPVR before I discovered this utility, I am not looking forward to start over with a new db3...


If you empty the EPG and compress and upload your db3 file, I'll see what I can do.

Martin

avandeputte
2014-01-01, 01:19 AM
Confirmed - your utility works like a charm.... It's a thing of beauty. This utility is going to make the switch a no brainer for me. But I may have to run it over and over because I want to keep testing and customizing before I make the switch final (let's just say my wife is not very understanding of my little experiments, so I better get it right ;))

Your mention about adding original air date to the skin got my thinking... How do you do that?

I tried adding Text text="@originalairdate" visible="@isItem" location="2.32,66.28" size="93.03,63.17" font="DefaultSmall" align="left" wrap="true"/>
to my already customized skin, it doesn't work. How do you reference these fields from a skin?

Thanks again - I am having lots of fun with npvr so far.

mvallevand
2014-01-01, 03:02 AM
Sub might not even expose it, on the Recordings screen or Event popup.

Martin

Beefstew83
2014-04-26, 12:23 PM
Martin,

Thanks for all your hard work on this utility. I also am a bit late to the SageTV Import game and would like to keep my existing NPVR configuration. Can the .db3 file be opened in SQLite or is it Dbase III? I figure I might be able to merge the imported recordings into the existing .db3 file. Who knows, it might just be easier to redo the channels over.

mvallevand
2014-04-27, 01:47 AM
sqlite. It is possible to open/merge two different db3 file's tables.

Martin

Beefstew83
2014-05-01, 11:01 PM
Martin,

I ran the import utility and the resulting db3 file was very small(31kb). There were no recordings in that file. There was a SageIn.xml that was 3mb and had all the recordings in it. I didn't notice any reference to the SageIn.xml in the db3 file. Is this normal? The regular db3 was huge by comparison and there are no NPVR recordings currently.

mvallevand
2014-05-02, 12:33 AM
Martin,

I ran the import utility and the resulting db3 file was very small(31kb). There were no recordings in that file. There was a SageIn.xml that was 3mb and had all the recordings in it. I didn't notice any reference to the SageIn.xml in the db3 file. Is this normal? The regular db3 was huge by comparison and there are no NPVR recordings currently.

Did you use this version http://forums.gbpvr.com/showthread.php?50467-SageTV-Import-Utility&p=468985#post468985

Martin

Beefstew83
2014-05-02, 10:09 PM
No, I was using the June 2013 version. Thanks for the heads up. The db3 file looks much better now, viewing it in Notepad. I haven't gotten sqlite yet. Would it be a good idea to use sqlite to merge the db3 files or would cutting and pasting in notepad be good enough, given that I think I can see where the channels leave off and the imported recordings begin?

ACTCMS
2014-05-02, 10:52 PM
I definitely wouldn't try to edit it with notepad or anything else other than a proper DB editor - you'll be sure to screw up the DB's internal pointers.

Alex

Beefstew83
2014-05-04, 02:32 AM
Yeah, I was looking at it in sqlite3 and it seemed like I just need to copy records from certain tables into the db3 file from NPVR. I just need to figure out how to copy records from one database to another. I am more familiar with mySQL than sqlite. Are there any other editors that are compatible with the db3 files?

It seems there are at least 4 or 5 tables that would need to be copied over; but I haven't looked in any of them yet.

mvallevand
2014-05-04, 03:26 AM
Give me a link to your separate db3 files and I'll right a sqlite script for it,

Martin

Beefstew83
2014-05-05, 12:41 AM
Here's the sage import db3:

https://www.dropbox.com/s/xggb28rz3f4uvww/npvr_sage.db3

Here's the NPVR db3:

https://www.dropbox.com/s/5cpl39evfqlryto/npvr.db3

Thanks much Martin!! :D

mvallevand
2014-05-05, 02:09 AM
Save this as copy.sql with your two files



ATTACH DATABASE 'npvr_sage.db3' AS 'npvr_sage';
INSERT INTO scheduled_recording
(name,filename,status,start_time,end_time,capture_ source_oid,channel_oid,recurrence_oid,channel_name ,
event_details,failure_reason,pre_padding,post_padd ing,quality)
SELECT name,filename,status,start_time,end_time,capture_s ource_oid,channel_oid,recurrence_oid,channel_name,
event_details,failure_reason,pre_padding,post_padd ing,quality
FROM npvr_sage.scheduled_recording;


Launch the sqlite3 shell

sqlite3 npvr.db3

then run the script
.read copy.sql
and exit
.quit

Martin

Beefstew83
2014-05-05, 10:54 AM
That worked great, Martin, Thanks!!!

Now I have to figure out how to squeeze down all these recordings I'm making in NPVR. I have ImageGrabLite renaming them--just got to transcode them as well. :D