NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 3 4 5 6 7 … 93 Next »
How to move recordings without them getting deleted from db

 
  • 0 Vote(s) - 0 Average
How to move recordings without them getting deleted from db
drmargarit
Offline

Member

Posts: 184
Threads: 49
Joined: Sep 2013
#1
2015-09-27, 01:45 AM
Another utility I am working on moves recordings from local storage (small ssd) to the server. I move the file and its .edl then, if the move was successful, update the file name in the db. Sporadically, recordings were disappearing from the DB entirely even though the update was successful. I tried running the utility at startup before nextpvr is launched rather than shutdown and the problem seems to have disappeared but I don't know why.

What would be the best method to update the db so that I don't lose recordings?
Does the .exe or one of the services watch recordings directories and delete db entries when files disappear?

Thanks,

Jim
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,837
Threads: 954
Joined: May 2006
#2
2015-09-27, 01:49 AM
Set up an archive directory and just use the archive function to move it for you.

Martin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,661
Threads: 767
Joined: Nov 2003
#3
2015-09-27, 01:51 AM
Whenever it tries to load the recording list from the database, if it notices the file missing from disk, then it removes it from the database on the assumption you've manually deleted the file.

To move them to another location, you can copy them to the new location, then run:

nscripthelper.exe -rename <sourcefile> <destfile>

then delete the origina file. This -rename step updates the database to reflect the new location of the file.
drmargarit
Offline

Member

Posts: 184
Threads: 49
Joined: Sep 2013
#4
2015-09-27, 03:01 PM
sub Wrote:Whenever it tries to load the recording list from the database, if it notices the file missing from disk, then it removes it from the database on the assumption you've manually deleted the file.

To move them to another location, you can copy them to the new location, then run:

nscripthelper.exe -rename <sourcefile> <destfile>

then delete the origina file. This -rename step updates the database to reflect the new location of the file.

Great, will do. Does nscripthelper.exe return any exit codes that indicate success or failure of the call?

Jim
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,661
Threads: 767
Joined: Nov 2003
#5
2015-09-27, 05:33 PM
No, it doesn't.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Import/export recordings via API? whurlston 4 3,762 2019-02-19, 11:48 AM
Last Post: Graham
  Conflict recordings scJohn 1 2,569 2018-03-23, 07:43 PM
Last Post: sub
  API / web call for setting recordings Pbathuk 2 3,271 2018-01-13, 05:17 AM
Last Post: Pbathuk
  API access to artwork and deleting recordings cncb 29 15,411 2016-11-06, 02:20 AM
Last Post: mvallevand
  Best approach to creating recurring recordings from c# drmargarit 0 2,595 2015-09-27, 01:32 AM
Last Post: drmargarit
  Changing the recording priority on recurring recordings cbgifford 4 3,749 2014-08-17, 03:13 PM
Last Post: Kiwi
  How does NextPVR group recordings for XBMC? spinnaker 2 2,269 2013-11-21, 01:33 AM
Last Post: spinnaker
  Web API call for Ready recordings? bgowland 2 1,866 2013-11-03, 12:43 AM
Last Post: bgowland
  Delete recordings from database but not from disk? spinnaker 8 3,764 2013-10-26, 10:51 PM
Last Post: spinnaker
  getting recurring recordings from service?method API? reven 2 1,928 2013-08-03, 10:50 PM
Last Post: reven

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

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

Linear Mode
Threaded Mode