NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 27 28 29 30 31 … 93 Next »
Current program details, from batch file!

 
  • 0 Vote(s) - 0 Average
Current program details, from batch file!
Jim_
Offline

Senior Member

Posts: 696
Threads: 21
Joined: Dec 2005
#11
2006-10-24, 05:17 PM
pBS Wrote:i'm going to try to save and import recordings info from a remote database!..Big Grin
as long as it opens it from a unc path it should be fine..Smile
so even looking stuff up should be possible if it works..Big Grin

SUCCESS!!! Big Grin
now that is going to be usefull..lol
i have 2 machines with gbpvr installed, and now i can share the recordings info automatically...
plus i'm going to work on a reoccuring recordings import/export..
too cool...hehe

Please share!

Keeping with the multiple computer line of thought, here are a couple of ideas I’m thinking about.
I have two GBPVR computers with a single tuner each, my parents have a laptop without a tuner.

It would be very cool to offload the conflict recordings from both gbpvr systems to a single file on the network, so the other computer could pick up the conflict and record it.

Another idea would be to have my parents use GBPVR on their laptop to schedule programs they want to watch.
Their schedule could then be automatically offloaded and emailed (or synced to my ftp) and my first available (non-conflict) computer could record it for them!
I use the EWA, but they’re not computer literate. Recording conflicts and the ability to delete things makes the EWA a no-go for them.

Jim
[SIZE="1"]HP e9240f| Phenom II X4-945| Radeon HD4650 1-gig | 8 gig ram | Blu-Ray
Windows 7 64bit | 1TB system | 1.5TB Recordings | 3-TB Library
HDMI >> Sony 40" 1080p LCD TV
HVR-2250 | HVR-1290 | WinTV PVR USB2 | WinTV HD-PVR | GBPVR 1.4.7[/SIZE]
Projects: I-xmltv (Unsupported at this time) |
dark_half
Offline

Senior Member

USA
Posts: 463
Threads: 30
Joined: Mar 2006
#12
2006-10-24, 07:29 PM
I tried what you suggested but it errors out with
Code:
SQL error: unrecognized token: ":"


Here is a sample of the batch. Also if I follow what it being done correctly shoudn't "SELECT oid" be "SELECT programme_oid". Then again I may just be wrong and shouldn't be poking around the db. Anyway if you can point me in the right direction to resolve my token error I would appreciate it.
Code:
@echo off
set file_oid=
for /f "usebackq tokens=1,2 delims=, " %%v in (`sqlite3 -separator "," "C:\Program Files\DEVNZ\Gbpvr\GBPVR.DB3" " SELECT oid FROM RECORDING_SCHEDULE where filename=%1; " `) do @set file_oid=%%v
sqlite3 -separator ": " "C:\Program Files\DEVNZ\Gbpvr\GBPVR.DB3" " SELECT description FROM PROGRAMME where oid = '%file_oid%' ; "
pause
pBS
Offline

Posting Freak

Posts: 4,829
Threads: 182
Joined: Aug 2005
#13
2006-10-24, 08:34 PM
yep...my mistake...they are similar up till about 100 for me..
also may want to enclose %1 in single quotes...
i think that may do it...Smile
Hardware: HDHR Prime, HDPVR 1212, Raspberry pi2, VFD display w/LCDSmartie
pBS
Offline

Posting Freak

Posts: 4,829
Threads: 182
Joined: Aug 2005
#14
2006-10-24, 09:51 PM (This post was last modified: 2006-10-25, 07:21 AM by pBS.)
here goes...
EDIT: now uses 'LIKE' for case insensitivity! Big Grin
Code:
@echo off
set file_oid=
for /f "usebackq tokens=1,2 delims=," %%v in (`sqlite3 "\\Pvr\os\program files\devnz\gbpvr\gbpvr.db3" "SELECT programme_oid FROM RECORDING_SCHEDULE where filename LIKE '%~1';"`) do set file_oid=%%~v
sqlite3 "\\Pvr\os\program files\devnz\gbpvr\gbpvr.db3" " SELECT description FROM PROGRAMME where oid='%file_oid%'; "
pause
adjust the database string for yours and it's good to go..Wink
enjoy!
[notice how mine is grabbing from remote data? Big Grin]
and be very carefull with the quotes...sqlite likes singles, and windows gives out doubles..so i use the %~1 to remove quotes so i can add singles..
Hardware: HDHR Prime, HDPVR 1212, Raspberry pi2, VFD display w/LCDSmartie
dark_half
Offline

Senior Member

USA
Posts: 463
Threads: 30
Joined: Mar 2006
#15
2006-10-24, 10:05 PM
Thank you that did it. All I had to do was change the location of the database.
pBS
Offline

Posting Freak

Posts: 4,829
Threads: 182
Joined: Aug 2005
#16
2006-10-25, 07:22 AM
added LIKE to last post so won't need exact case for matches...Smile
lots of goodies still left to explore..
weeee!
Hardware: HDHR Prime, HDPVR 1212, Raspberry pi2, VFD display w/LCDSmartie
pBS
Offline

Posting Freak

Posts: 4,829
Threads: 182
Joined: Aug 2005
#17
2006-10-25, 10:25 AM (This post was last modified: 2006-10-25, 11:32 PM by pBS.)
oh and i meant recording_type, not the status, tho i needed that too..Smile
[trying to save re-occurings..]
i combined the previous 2 lines into one single one...hehe
[both sql statements on one line]
makes cross referencing neater...first gets the programme-oid, the second looks up info based on that... so only one line statement to return info...neater..

Code:
for /f "usebackq tokens=1,2 delims=," %%v in (`sqlite3 "%db%" "SELECT programme_oid FROM RECORDING_SCHEDULE where status= '4' and recording_type='5'; " `) do sqlite3 "%db%" " SELECT name, sub_title FROM PROGRAMME where oid='%%v'; "

currently i can backup the re-occurings, and restore, but only overwriting whatever's there...
can't figure out how to use the last_insert_rowid thingy..
i see that lots of times in the logs..Smile

is there any way to get the 'next' row insert number??
i figured i could list the rows and take highest plus 1...
any quicker [or built-in] ways?

also, i found that adding % around a search term is like a wildcard*,eg: a [where description like '%word%' ] would find all descriptions with the word 'word' in it..Big Grin
Hardware: HDHR Prime, HDPVR 1212, Raspberry pi2, VFD display w/LCDSmartie
Mister Slimm
Offline

Senior Member

Posts: 437
Threads: 41
Joined: Nov 2005
#18
2006-10-26, 11:11 AM
GBPVRcli allows access to recordings information in the GB-PVR database and allows you to output the information formatted in any way you can think of. The output can be redirected to another batch file which can then be executed in order to accomplish any task. At this time, it does not allow you to change information in the database.
[SIZE="1"]Akasa Zen case, AMD Phenom II X3 720, 4.00Gb Ram, Sapphire ATI Radeon 4890, Terratec Terratec Cinergy 2400i Twin Digital Tuner, 1050Gb storage, Windows 7 Home Premium.
See my blog for releases, HD wallpapers, movie, game and anime reviews and more.[/SIZE]
pBS
Offline

Posting Freak

Posts: 4,829
Threads: 182
Joined: Aug 2005
#19
2006-10-26, 04:43 PM (This post was last modified: 2006-10-26, 04:53 PM by pBS.)
just use an insert command and leave out the oid column, [replace with NULL]
or the hard way, list all oid's and take highest one, and add 1...Smile

i have re-occuring recordings able to be exported, and re-imported finally..Smile

now just have to tie it up with the reoccurring_extras and figure out what to do about capture source settings...[and if anything else is tied to them and needed to be backed up or changed..any ideas Sub?]
it's the one thing that is a real pain to rebuild if you want to do a fresh install...
Hardware: HDHR Prime, HDPVR 1212, Raspberry pi2, VFD display w/LCDSmartie
KingArgyle
Offline

Posting Freak

Posts: 1,271
Threads: 95
Joined: Nov 2004
#20
2006-10-26, 07:10 PM
pBS, you might be able to use CDK Scheduler's PriorityRecording.xml file to handle your show exports, and then use it to re-import. It should work for all your Re-Occuring recordings, and it already defines information for Capture Source, start times, end times, etc.

There is an XML Schema on the CDK Scheduler page that shows the layout, as well as some documentation on the elements.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (5): « Previous 1 2 3 4 5 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  How Does "Use S01E01 File naming format if possible" work puck64 7 5,303 2015-08-25, 10:21 AM
Last Post: puck64
  Possible to have another element in details-single.xml Northpole 2 2,202 2014-07-11, 09:51 PM
Last Post: Northpole
  NEWA - using buffer file produced by /public/VLCService?Channel= bgowland 5 2,785 2014-01-02, 06:36 AM
Last Post: bgowland
  Recording export tags and export details? spinnaker 10 4,385 2013-10-23, 01:48 AM
Last Post: mvallevand
  Is the input file for pvrx2.exe -import unique to NextPVR? spinnaker 1 1,765 2013-10-08, 02:25 AM
Last Post: sub
  Accessing music file metadata in C# bgowland 6 3,272 2013-01-26, 05:14 AM
Last Post: bgowland
  Album art. Current conventions? bgowland 2 1,587 2012-12-21, 02:08 AM
Last Post: bgowland
  Skin element Details in NowNext Jaggy 2 1,778 2011-09-19, 11:50 PM
Last Post: Jaggy
  "Rating" in cached event details xml alibert 74 16,700 2011-03-28, 01:06 AM
Last Post: zehd
  NPVR batch files mvallevand 4 3,197 2010-11-27, 07:40 PM
Last Post: mvallevand

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

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

Linear Mode
Threaded Mode