NextPVR Forums
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Linux v
« Previous 1 2 3 4 5 … 26 Next »
Post Processing and moving files

 
  • 0 Vote(s) - 0 Average
Post Processing and moving files
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 45,334
Threads: 867
Joined: May 2006
#11
2022-12-29, 04:05 PM
You can try these in config.xml

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

Martin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 102,402
Threads: 742
Joined: Nov 2003
#12
2022-12-29, 04:33 PM
(2022-12-29, 03:50 PM)ballfam Wrote:
Code:
2022-12-28 04:05:01.176 [DEBUG][37]    Got request [127.0.0.1]: /service (session.login)
2022-12-28 04:05:01.176 [DEBUG][37]    method=session.login
2022-12-28 04:05:01.176 [DEBUG][37]    parameters:
2022-12-28 04:05:01.176 [DEBUG][37]        method: session.login
2022-12-28 04:05:01.176 [DEBUG][37]        sid: 60bea8ef1a7d42328b6aea12b90e6681
2022-12-28 04:05:01.176 [DEBUG][37]        md5: 025B45B25F4A0436DFFE74D716F11C26
2022-12-28 04:05:01.176 [DEBUG][37]        client_ip: 127.0.0.1
2022-12-28 04:05:01.176 [DEBUG][37]        host_callback: ...
2022-12-28 04:05:01.176 [INFO][37]      LoginSession(sid = 60bea8ef1a7d42328b6aea12b90e6681)
2022-12-28 04:05:01.176 [DEBUG][37]    [imU1oNbN/STVuXG4qCTJq9FEzW4HKvfGMoqSJyehOH7cwyyCaiq1Eogqz9K5PytxkH+7RBenv7p7TLDdbK4c+t3gRLxxdkcZrrso6PVz9EmnGU/j66B99prjxHaN9ewiE6edC++s51eSWb2cADM9Hm4lSw8wrf0QyKL1FbTB1OX5qNVa04yy8qLjYg7eyPle18ClMIdYNpwv3T2ymQqeCJJNnzew+WVFMb0BnSHm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Vf/434baXjcKnCSVQfoE2YiQ+w1mNlhB4RJIcp1DZ1b4clV8tbjL0LM1rCIomBt9Wvj5D+Jc=]
2022-12-28 04:05:01.176 [DEBUG][37]    <?xml version="1.0" encoding="utf-8" ?>^M
<rsp stat="ok">^M
  <sid>60bea8ef1a7d42328b6aea12b90e6681</sid>^M
  <allow_settings>false</allow_settings>^M
  <allow_watch>true</allow_watch>^M
  <allow_schedule>true</allow_schedule>^M
  <allow_delete>true</allow_delete>^M
</rsp>^M

2022-12-28 04:05:01.177 [DEBUG][37]    Got request [127.0.0.1]: /services/service (recording.rename)
2022-12-28 04:05:01.178 [DEBUG][37]    method=recording.rename
2022-12-28 04:05:01.178 [DEBUG][37]    parameters:
2022-12-28 04:05:01.178 [DEBUG][37]        method: recording.rename
2022-12-28 04:05:01.178 [DEBUG][37]        from: /media/server_jj/ToRecode/SBS World News Late/Season 2022/SBS.World.News.Late.S2022E258.ts
2022-12-28 04:05:01.178 [DEBUG][37]        to: /media/server_jj/Recode/SBS World News Late/Season 2022/SBS.World.News.Late.S2022E258.ts
2022-12-28 04:05:01.178 [DEBUG][37]        sid: 60bea8ef1a7d42328b6aea12b90e6681
2022-12-28 04:05:01.178 [DEBUG][37]        client_ip: 127.0.0.1
2022-12-28 04:05:01.178 [DEBUG][37]        host_callback: ...
2022-12-28 04:05:01.178 [DEBUG][37]    Rename
2022-12-28 04:05:07.015 [ERROR][37]    Unable to find existing recording with filename: /media/server_jj/ToRecode/SBS World News Late/Season 2022/SBS.World.News.Late.S2022E258.ts
2022-12-28 04:05:07.015 [DEBUG][37]    <?xml version="1.0" encoding="utf-8" ?>^M
<rsp stat="fail">^M
  <err code="2" msg="Invalid Args" />^M
</rsp>^M
Are you sure you got the from/to parameters around the right way?

Also, are doing things in the right order? ie, safest is to copy the file to the new target destination, do the rename, then delete the file from the old location.
ballfam
Offline

Member

Australia
Posts: 57
Threads: 4
Joined: Jul 2020
#13
2022-12-29, 10:34 PM
OK, I fixed it. I moved the NscriptHelper up to before I moved the file and now it works fine. Obviously it checks for the old location when running rename, but it doesn't check if the new location exists yet; so the key is to do the rename *before* moving the file. I guess in older releases it didn't do either check, so it didn't matter.

Thanks for the hints.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 102,402
Threads: 742
Joined: Nov 2003
#14
2022-12-30, 12:45 AM
(2022-12-29, 10:34 PM)ballfam Wrote: I guess in older releases it didn't do either check, so it didn't matter.
I'm pretty sure it always worked this way, unless you'd set <AutoRemoveMissingRecordings> to false in a previous release.
ballfam
Offline

Member

Australia
Posts: 57
Threads: 4
Joined: Jul 2020
#15
2022-12-30, 02:43 PM
Thanks Sub. It could also have been a timing window. The script (old version) moves the file and then immediately runs NscriptHelper. I don't know what triggers the check, but it could have been possible in the past that I managed to do the rename before it noticed the file was gone and deleted it from the database.

The last time I actually had reason to use this script was back in v4 so it's also possible that the config may have changed over the years, although I don't remember changing <AutoRemoveMissingRecordings>. Having said that; this sounds like it could be an alternate solution. Is there a way to manually remove missing recordings periodically to clean up if I set this to false?

I know that copying it is the right approach, but that takes extra time, especially for 2-3 hour recordings, so it would be good to avoid if possible. It appears to be working currently, but if it's not reliable, I'll have to revert to a copy I guess.

Thanks again for the help.
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 45,334
Threads: 867
Joined: May 2006
#16
2022-12-30, 03:05 PM
I disagree with sub about using copy I would definitely use mv or move on Windows for this type of script moving a single file. It is probably safer than a copy when it works as a rename and unless you do a checksum verify you can't really ensure that the copy was valid.

Martin
ballfam
Offline

Member

Australia
Posts: 57
Threads: 4
Joined: Jul 2020
#17
2022-12-30, 06:59 PM
Agreed, although worth pointing out that a move across devices is the same as a copy/delete.

mv within a device just updates the directory inode entry (for both ext4 and ntfs), but across devices it may as well be a copy/delete. For a cross-device move, it's just as easy to run copy, with a checksum if you're paranoid.

For me, mv is much better; the only reason I'm moving the file after record is so that Plex doesn't see it and try to do something with it (e.g. auto transcode) before ethe recording is done. Unfortunately channel Seven seems to have gone back to a stream that doesn't play well on Plex, and now Nine has now joined the bandwagon, so I have to resort to transcoding the .ts files to an mp4 container, which seems to fix the issue.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): « Previous 1 2


Possibly Related Threads…
Thread Author Replies Views Last Post
  NextPVR Server VOD Downloads Incomplete TS Video Files nonuoha 22 207 2023-03-26, 09:09 PM
Last Post: mvallevand
  Moving NextPVR to new system (linux) cyber 17 448 2023-01-15, 04:04 PM
Last Post: cyber
  Think all the script files must've disappeared mlp78758 13 286 2022-11-25, 05:34 PM
Last Post: mvallevand
  TV Show recording broken into multiple files markosjal 2 318 2022-07-09, 04:53 AM
Last Post: markosjal
  Empty files when writing to samba share aimaim 3 311 2022-07-05, 10:31 PM
Last Post: mvallevand
  Cant get Post Padding to work jhr1948 15 553 2022-05-24, 10:43 AM
Last Post: mvallevand
  Orphaned livetv buffer files snagglewest 6 585 2021-08-09, 04:23 PM
Last Post: mvallevand
  bulk comskip processing script baj1 7 1,615 2020-11-21, 08:44 PM
Last Post: baj1
  nothing recording post upgrade. CDinger 2 574 2020-10-25, 09:45 PM
Last Post: CDinger
  NextPVR creates empty TS files motocrossmann 11 1,922 2020-06-04, 03:32 PM
Last Post: motocrossmann

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

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

Linear Mode
Threaded Mode