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 … 250 251 252 253 254 … 433 Next »
sqLite recording table

sqLite recording table
fvfv
Offline

Member

Posts: 131
Threads: 20
Joined: Nov 2005
#1
2013-07-08, 02:16 PM
I'm writing a little php utility to rename shows a bit more "Library" friendly, such as "Under the Dome.S01E03.ts" using thetvdb api. I'm sure there are many renamers out there, but none that fit my needs so far.

I'm extremely curious as to how does NPVR pick up the actual file name from the RECORDED table, being that the definition for filename in the recorded table is only varchar(50). How does it know when you have a long folder name like
"c:/media/tvshows/recordings/Beauty and the Beast (2012)/Season 1/Beauty and The Beast_part1.S01E13.20080925110101.ts",
Which obviously is longer than 50 characters.

I know all about the :metadata.xml stream that is part of the actual recording file, but that means that NPVR would have to scan the physical folder at start up to get the actual file name.

Is there another table where the filename is stored ?

My object is to rename the physical file as well as the SQLite database so that I can play the recording with NPVR or any other player.
martint123
Offline

Posting Freak

UK, East Yorkshire
Posts: 4,658
Threads: 208
Joined: Nov 2005
#2
2013-07-08, 04:11 PM
I thought I'd read a post from sub about this, but can't find it. However, from the sqlite documentation:-

Quote:The following table shows how many common datatype names from more traditional SQL implementations are converted into affinities by the five rules of the previous section. This table shows only a small subset of the datatype names that SQLite will accept. Note that numeric arguments in parentheses that following the type name (ex: "VARCHAR(255)") are ignored by SQLite - SQLite does not impose any length restrictions (other than the large global SQLITE_MAX_LENGTH limit) on the length of strings, BLOBs or numeric values.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,729
Threads: 767
Joined: Nov 2003
#3
2013-07-08, 04:56 PM
Yep, what he said. SQLite ignores the length specified on a VARCHAR field.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,729
Threads: 767
Joined: Nov 2003
#4
2013-07-08, 04:57 PM
BTW, you can also run the following to update the database:

NScriptHelper.exe -rename <old-file-name> <new-file-name>
fvfv
Offline

Member

Posts: 131
Threads: 20
Joined: Nov 2005
#5
2013-07-08, 05:12 PM
No way !!!! Wish I'd known this before.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,729
Threads: 767
Joined: Nov 2003
#6
2013-07-08, 05:40 PM
yes way Big Grin
johnsonx42
Offline

Posting Freak

Posts: 7,298
Threads: 189
Joined: Sep 2008
#7
2013-07-08, 06:55 PM
or you can use Martin's ImageGrabLite utility; as the name implies it started life as an image grabber, but has added renaming and .nfo generation to it's bag of tricks. I realize you said you were writing your own, but IGL already does exactly what you said you wanted. http://www.nextpvr.com/nwiki/pmwiki.php?...geGrabLite
server: NextPVR 5.0.7/Win10 2004/64-bit/AMD A6-7400k/hvr-2250 & hvr-1250/Winegard Flatwave antenna/Schedules Direct
main client: NextPVR 5.0.7 Desktop Client; LG 50UH5500 WebOS 3.0 TV
fvfv
Offline

Member

Posts: 131
Threads: 20
Joined: Nov 2005
#8
2013-07-08, 09:32 PM
It turns out I was using sqliteadmin, a pretty old tool for querying sqlite and it "seemed" that the filename was truncated at 50 but in reality sqlite does not impose restrictions on the length.
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,967
Threads: 956
Joined: May 2006
#9
2013-07-08, 10:10 PM
I am now using a full update to IGL for the next version of NextPVR, which is going to be needed because of sqlite changes and also the fact that themoviedb is killing off their XML interface for JSON. If there is some feature you'd like to see let me know. Even you if you prefer your own code, it might be something other IGL users would like.

Martin
fvfv
Offline

Member

Posts: 131
Threads: 20
Joined: Nov 2005
#10
2013-07-09, 02:20 PM
My php script simply queries tvdb and parses out the XML returned. Since I have not tried IGL yet, does it generate NFO files ?, because that would be a really nice feature to have.
« 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
  Recording movies / TV to XBMC directory stucture spinnaker 10 3,552 2024-06-03, 03:56 AM
Last Post: Rod Hutchinson
  Not recording errors vidwiz 4 1,000 2024-04-17, 05:39 PM
Last Post: mvallevand
  Add Series/Episode Info to Recording Metadata andrewj 2 1,078 2023-11-20, 03:42 PM
Last Post: sub
  Recording to a network drive woes. 2leftfeet 12 7,201 2022-04-05, 08:03 PM
Last Post: mvallevand
  device needed for recording David209 2 1,737 2021-04-04, 08:47 AM
Last Post: David209
  PC not going to sleep after recording LeoL 7 3,278 2021-04-01, 07:17 PM
Last Post: Handy.Man
  HDHomerun recording bizzarely not working Jean0987654321 3 2,041 2021-03-27, 03:23 PM
Last Post: Jean0987654321
Video Restrict Recording Space foucomm 1 1,328 2021-01-30, 09:25 PM
Last Post: mvallevand
  Directory dropdown on the recording edit dialog MicahMakenzie 1 1,502 2021-01-11, 04:37 PM
Last Post: Graham
  Recording service stopped or not running at scheduled time MattInetroit 3 1,893 2021-01-08, 12:03 AM
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