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 … 92 Next »
Change recording filename programmatically immediately before recording starts?

 
  • 0 Vote(s) - 0 Average
Change recording filename programmatically immediately before recording starts?
craigrs84
Offline

Member

Posts: 131
Threads: 27
Joined: Jan 2014
#1
2015-01-18, 08:10 PM
I was just wondering if there is an event or hook that allows dynamically changing either the recording filename or file path immediately before the recording actually starts?

I would like to automatically split the recordings into 2 separate directories based on the EGP genre: one directory for movies and another for tv shows.

I'd like this to happen before the recording starts rather than after it is finished so that the file doesn't have to wait to be renamed an hour later when the show is completed.

I might experiment with the idea of a SQLite DB trigger but wondered if there was better support available via the plugin framework.

Thanks.
JavaWiz
Offline

Posting Freak

Jacksonville, FL. USA
Posts: 2,513
Threads: 141
Joined: Dec 2006
#2
2015-01-18, 08:36 PM
You can somewhat do this when you schedule a recordings. By default my shows go to TvShows directory, however, at the time you schedule a recording, you can change the target directory in the Recordings dialog.

1) in config program, Recordings section, create a "Movies" entry and map to your target directory
2) at time of scheduling the recording, arrow down to "Directory:", use right/left arrow key to select the "Movies" mapping.

Additionally, you can automate renaming with the ImageGrab Lite tool IGLite with a line in the PostProcessing.bat
Mine (scaled down version) looks like:

Set IGLite="C:\Program Files\NPVR\imageGrabLite.exe"
Set Oid=%3
%IGLite% --oid %Oid% --rename --subtitle --zap2it --nfo --extra
NPVR Server: Win10 / AMD Phenom II X4 965 / 8gRAM / ATI Radeon 7700 Series / Hauppauge 2250
Misc: HDHR Prime, rPI LibreElec & Amazon FireStick Kodi clients
craigrs84
Offline

Member

Posts: 131
Threads: 27
Joined: Jan 2014
#3
2015-01-18, 08:58 PM
JavaWiz Wrote:You can somewhat do this when you schedule a recordings. By default my shows go to TvShows directory, however, at the time you schedule a recording, you can change the target directory in the Recordings dialog.

1) in config program, Recordings section, create a "Movies" entry and map to your target directory
2) at time of scheduling the recording, arrow down to "Directory:", use right/left arrow key to select the "Movies" mapping.

Additionally, you can automate renaming with the ImageGrab Lite tool IGLite with a line in the PostProcessing.bat
Mine (scaled down version) looks like:

Set IGLite="C:\Program Files\NPVR\imageGrabLite.exe"
Set Oid=%3
%IGLite% --oid %Oid% --rename --subtitle --zap2it --nfo --extra

Thanks, that's what I want to do but I'd like to do it programatically based on EPG data, I'm afraid my wife will forget to set the directory when she schedules recordings.

Also if possible I'd like to do it do it before the recording starts rather than after. This is just so that the file will show up in XBMC Movies/TV Shows sections while the recording is occurring rather than after.
craigrs84
Offline

Member

Posts: 131
Threads: 27
Joined: Jan 2014
#4
2015-01-19, 05:23 PM
I had some success with a SQlite database trigger; although sort of hacky it seems to work:

Code:
CREATE TRIGGER path_trigger AFTER INSERT ON scheduled_recording
BEGIN
UPDATE scheduled_recording
SET filename = (case when NEW.event_details like '%<Genre>Movie%' then '[Movies]' else '[Tv]' end)
WHERE oid = NEW.oid;
END;
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 36,323
Threads: 722
Joined: May 2006
#5
2015-01-20, 12:47 PM
Interesting some of the use cases that I would test

- recording live tv in regular and epg mode with ctrl-k
- restarting the service while recording to get the .0 file
- recording a show that has started

Martin
patco444
Offline

Junior Member

Posts: 1
Threads: 0
Joined: Jul 2015
#6
2015-07-13, 09:28 PM
JavaWiz Wrote:You can somewhat do this when you schedule a recordings. By default my shows go to TvShows directory, however, at the time you schedule a recording, you can change the target directory in the Recordings dialog.

1) in config program, Recordings section, create a "Movies" entry and map to your target directory
2) at time of scheduling the recording, arrow down to "Directory:", use right/left arrow key to select the "Movies" mapping.

Additionally, you can automate renaming with the ImageGrab Lite tool IGLite with a line in the PostProcessing.bat
Mine (scaled down version) looks like:

Set IGLite="C:\Program Files\NPVR\imageGrabLite.exe"
Set Oid=%3
%IGLite% --oid %Oid% --rename --subtitle --zap2it --nfo --extra

Thank you. This is a good guide! Smile
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Recording direct to GPhotos API rgonzalez 0 284 2020-06-29, 04:45 AM
Last Post: rgonzalez
  Recurring Recording URL Parameters jcole998 2 1,567 2019-09-19, 01:08 PM
Last Post: jcole998
  Get recording length from stream skogl 46 6,203 2019-08-15, 09:34 PM
Last Post: sub
  Unexpected result when deleting a pending recording scJohn 5 2,025 2018-05-06, 10:09 PM
Last Post: sub
  How to best verify success when adding a recurring recording drmargarit 1 1,790 2017-03-02, 03:13 PM
Last Post: mvallevand
  Scheduled_Recordings - Filename field limited to 50 characters? JavaWiz 6 2,839 2015-10-28, 10:46 PM
Last Post: JavaWiz
  Recording a specific episode based on season and episode number cbgifford 26 5,588 2014-12-19, 10:28 PM
Last Post: cbgifford
  Custom recording rules mvallevand 58 12,951 2014-12-08, 03:28 AM
Last Post: mvallevand
  Extending recording time mvallevand 2 1,387 2014-09-14, 01:04 AM
Last Post: sub
  Changing the recording priority on recurring recordings cbgifford 4 2,020 2014-08-17, 03:13 PM
Last Post: Kiwi

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

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

Linear Mode
Threaded Mode