NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums General General Discussion v
« Previous 1 … 114 115 116 117 118 … 159 Next »
Can you Browse the SQLite DataBase?

 
  • 0 Vote(s) - 0 Average
Can you Browse the SQLite DataBase?
Pioneer4x4
Offline

Posting Freak

Posts: 926
Threads: 50
Joined: Jan 2005
#1
2006-09-09, 10:59 AM (This post was last modified: 2006-09-09, 11:16 AM by Pioneer4x4.)
Can you Browse the SQLite DataBase like you can an access database?
I used to search for all of my shows ahead of time in the .mdb and edit the subtitle field (with episode number, notes...) so once the do record and get remaned, the file and description will have the information I need.

I should add Browse, and sort, and enter data. I found "SQLite Database Browser" but it doesn't appear to sort.
I need to sort the PROGRAMME table by "name" field, then edit the data in the "sub_title" field.
3x MVPs (not used anymore)
XBMC
Hauppauge 150 via SVideo
Comcast Digital Cable
Motorola HD Cable box channel changed via Firewire
Vista Home Premium with RDP hack
AMD Athalon 64 5000+
340gig sata, plus 80SATA+3x160IDE Drives in XP machine for storage.
UncleJohnsBand
Offline

Posting Freak

U.S.A.
Posts: 5,643
Threads: 258
Joined: Feb 2005
#2
2006-09-09, 02:51 PM
Pioneer4x4 Wrote:Can you Browse the SQLite DataBase like you can an access database?
I used to search for all of my shows ahead of time in the .mdb and edit the subtitle field (with episode number, notes...) so once the do record and get remaned, the file and description will have the information I need.

I should add Browse, and sort, and enter data. I found "SQLite Database Browser" but it doesn't appear to sort.
I need to sort the PROGRAMME table by "name" field, then edit the data in the "sub_title" field.

I use Sqlite Admin, Sqlite Database Browser and SqliteSpy.....I like them all.
Intel Core i7 @ 4.00GHz Skylake 14nm
ASUSTeK COMPUTER INC. Z170-DELUXE
Windows 10 Pro x64
PVR Software: NPVR 5.1.1
SiliconDust HDHomeRun HDHR5-4US Connect Quatro 4 Channel Tuner
Roku Ultra
2 PCH A-100's
Pioneer4x4
Offline

Posting Freak

Posts: 926
Threads: 50
Joined: Jan 2005
#3
2006-09-10, 02:35 PM
UncleJohnsBand Wrote:I use Sqlite Admin, Sqlite Database Browser and SqliteSpy.....I like them all.
I tried all 3
Sqlite Database Browser will let me edit data.
SqliteSpy will let me view and sort the table the way I like, but not apply any changes.
And I guess I just can't figure out anything in Sqlite Admin

Do I have to write sql code to do this?
3x MVPs (not used anymore)
XBMC
Hauppauge 150 via SVideo
Comcast Digital Cable
Motorola HD Cable box channel changed via Firewire
Vista Home Premium with RDP hack
AMD Athalon 64 5000+
340gig sata, plus 80SATA+3x160IDE Drives in XP machine for storage.
Pioneer4x4
Offline

Posting Freak

Posts: 926
Threads: 50
Joined: Jan 2005
#4
2006-09-10, 04:03 PM
Pioneer4x4 Wrote:Do I have to write sql code to do this?
I have been putzing with it.
Using SQLite Database Browser on a copy of GBPVR's db3, I have run sql commands such as

UPDATE PROGRAMME
SET sub_title=SUBSTR(unique_identifier,-4,4)||' - '||sub_title
WHERE name LIKE 'Ancient Mys%'

and it does what I used to do manually.
It will change the sub_title of an episode of "Ancient Mysteries With Leonard Nimoy" with unique_identifier of EP0799200016 and sub_title of "Metropolitan Museum of Art: Splendid Discovery" to "0016 - Metropolitan Museum of Art: Splendid Discovery". And when the recording gets renamed it will be 0016 - Metropolitan Museum of Art: Splendid Discovery.mpg.

Now I just need to exclude episodes with sub_titles that have already been altered. Maybe just search if the 6th char is a "-".
3x MVPs (not used anymore)
XBMC
Hauppauge 150 via SVideo
Comcast Digital Cable
Motorola HD Cable box channel changed via Firewire
Vista Home Premium with RDP hack
AMD Athalon 64 5000+
340gig sata, plus 80SATA+3x160IDE Drives in XP machine for storage.
UncleJohnsBand
Offline

Posting Freak

U.S.A.
Posts: 5,643
Threads: 258
Joined: Feb 2005
#5
2006-09-11, 09:26 PM
Pioneer4x4 Wrote:I tried all 3
Sqlite Database Browser will let me edit data.
SqliteSpy will let me view and sort the table the way I like, but not apply any changes.
And I guess I just can't figure out anything in Sqlite Admin

Do I have to write sql code to do this?

Now you know why I have all 3 installed.... Wink
Intel Core i7 @ 4.00GHz Skylake 14nm
ASUSTeK COMPUTER INC. Z170-DELUXE
Windows 10 Pro x64
PVR Software: NPVR 5.1.1
SiliconDust HDHomeRun HDHR5-4US Connect Quatro 4 Channel Tuner
Roku Ultra
2 PCH A-100's
Pioneer4x4
Offline

Posting Freak

Posts: 926
Threads: 50
Joined: Jan 2005
#6
2006-09-11, 10:27 PM
OK, I feel comfortable in sql code now. I can definately do what I want, and I can probably totally screw up the db also!Big Grin
I have some sql code that I would like to run everytime the epg gets updated. Can I put calls to sqlite3 in a batch file to run after the epg is updated?

The code is
UPDATE PROGRAMME
SET sub_title=SUBSTR(unique_identifier,-4,4)||' - '||sub_title
WHERE (SUBSTR(sub_title,1,1)>"9" OR sub_title='') AND unique_identifier <"F"

What it does is add the last 4 digits of the "unique_identifier" to the beginning of the episode name "sub_title" if
1)subtitle doesn't start with a number (already done it)
2)subtitle is blank
3)if it is an episode, not show or movie (first two chars of unique_identifier)

The output looks like
"0001 - episodename.mpg"

it works like a charm in the <Execute SQL> tab of SQLite Browser!
3x MVPs (not used anymore)
XBMC
Hauppauge 150 via SVideo
Comcast Digital Cable
Motorola HD Cable box channel changed via Firewire
Vista Home Premium with RDP hack
AMD Athalon 64 5000+
340gig sata, plus 80SATA+3x160IDE Drives in XP machine for storage.
UncleJohnsBand
Offline

Posting Freak

U.S.A.
Posts: 5,643
Threads: 258
Joined: Feb 2005
#7
2006-09-11, 11:16 PM
Pioneer4x4 Wrote:OK, I feel comfortable in sql code now. I can definately do what I want, and I can probably totally screw up the db also!Big Grin
I have some sql code that I would like to run everytime the epg gets updated. Can I put calls to sqlite3 in a batch file to run after the epg is updated?

The code is
UPDATE PROGRAMME
SET sub_title=SUBSTR(unique_identifier,-4,4)||' - '||sub_title
WHERE (SUBSTR(sub_title,1,1)>"9" OR sub_title='') AND unique_identifier <"F"

What it does is add the last 4 digits of the "unique_identifier" to the beginning of the episode name "sub_title" if
1)subtitle doesn't start with a number (already done it)
2)subtitle is blank
3)if it is an episode, not show or movie (first two chars of unique_identifier)

The output looks like
"0001 - episodename.mpg"

it works like a charm in the <Execute SQL> tab of SQLite Browser!

You would need a small program that can call the SQLite engine using that query. Then in the postupdateepg.bat file put a line that runs the program.
Intel Core i7 @ 4.00GHz Skylake 14nm
ASUSTeK COMPUTER INC. Z170-DELUXE
Windows 10 Pro x64
PVR Software: NPVR 5.1.1
SiliconDust HDHomeRun HDHR5-4US Connect Quatro 4 Channel Tuner
Roku Ultra
2 PCH A-100's
Old Dog
Offline

Posting Freak

Posts: 1,083
Threads: 99
Joined: Jul 2005
#8
2006-09-11, 11:28 PM
Pioneer4x4 Wrote:OK, I feel comfortable in sql code now. I can definately do what I want, and I can probably totally screw up the db also!Big Grin
I have some sql code that I would like to run everytime the epg gets updated. Can I put calls to sqlite3 in a batch file to run after the epg is updated?

I Googled "commandline sqlite" and this was the first return...
http://www.sqlite.org/sqlite.html
Learning new tricks!
Visit Plain Jane's Collection
UncleJohnsBand
Offline

Posting Freak

U.S.A.
Posts: 5,643
Threads: 258
Joined: Feb 2005
#9
2006-09-11, 11:59 PM
Old Dog Wrote:I Googled "commandline sqlite" and this was the first return...
http://www.sqlite.org/sqlite.html

Looks like you have to go into an interactive mode to use this tool......
Intel Core i7 @ 4.00GHz Skylake 14nm
ASUSTeK COMPUTER INC. Z170-DELUXE
Windows 10 Pro x64
PVR Software: NPVR 5.1.1
SiliconDust HDHomeRun HDHR5-4US Connect Quatro 4 Channel Tuner
Roku Ultra
2 PCH A-100's
UncleJohnsBand
Offline

Posting Freak

U.S.A.
Posts: 5,643
Threads: 258
Joined: Feb 2005
#10
2006-09-12, 01:19 AM
Here is a little app I threw together with SharpDevelop. It simply reads in a query command from a file and runs it against the GBPVR database.

I have included the source as well as the compiled app (located in the release\bin directory).

Just copy the exe and the .txt file to the gbpvr directory. From the command line (or in a batch file) just type appenduniqueid.

It will read whatever query string you have placed in query.txt and run it.

That's it. Big Grin
Intel Core i7 @ 4.00GHz Skylake 14nm
ASUSTeK COMPUTER INC. Z170-DELUXE
Windows 10 Pro x64
PVR Software: NPVR 5.1.1
SiliconDust HDHomeRun HDHR5-4US Connect Quatro 4 Channel Tuner
Roku Ultra
2 PCH A-100's
« 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
  sqlite database modifications skippy_nz 19 5,987 2009-04-09, 03:52 AM
Last Post: wtg
  Browse and play recordings on PS3 rbelisle 2 2,959 2008-11-20, 06:54 PM
Last Post: rbelisle
  SQLite manager plugin for firefox martint123 1 2,038 2008-03-13, 04:14 AM
Last Post: JavaWiz
  SQLite Expert Personal and AVG Free ACTCMS 1 1,862 2007-12-01, 09:11 PM
Last Post: martint123
  SQLite with VB .Net taz 3 2,516 2007-11-07, 08:45 PM
Last Post: saintjo
  Jumping out of GB-PVR to browse the web - all via the remote control? joche 6 2,201 2007-02-09, 08:26 PM
Last Post: joche
  2 PVR's one database for recordings? xmorph 3 1,689 2007-01-14, 10:30 PM
Last Post: dvasco
  SQLite DB editor bgowland 3 2,246 2006-05-20, 09:29 PM
Last Post: ubu
  MovieTrack - a handy little movie database groover km 5 2,811 2005-08-24, 08:13 AM
Last Post: stefan
  music video/single database ? reven 1 1,811 2005-06-04, 03:32 PM
Last Post: ydekmekji

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

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

Linear Mode
Threaded Mode