NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 4 5 6 7 8 … 93 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,522
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
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: 53,112
Threads: 957
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
  Custom recording tomx 2 710 2025-02-07, 09:14 AM
Last Post: tomx
  API call for Recording Complete linustorvalds 1 474 2025-01-19, 02:11 PM
Last Post: mvallevand
  Manual recording API mvallevand 2 1,137 2023-11-09, 02:14 PM
Last Post: mvallevand
  Way to tell programmatically if channel load in from NPVR has finished... gdogg371 3 2,452 2021-03-11, 03:59 PM
Last Post: mvallevand
  Recording direct to GPhotos API rgonzalez 0 1,523 2020-06-29, 04:45 AM
Last Post: rgonzalez
  Recurring Recording URL Parameters jcole998 2 3,077 2019-09-19, 01:08 PM
Last Post: jcole998
  Get recording length from stream skogl 46 14,541 2019-08-15, 09:34 PM
Last Post: sub
  Unexpected result when deleting a pending recording scJohn 5 3,883 2018-05-06, 10:09 PM
Last Post: sub
  How to best verify success when adding a recurring recording drmargarit 1 2,880 2017-03-02, 03:13 PM
Last Post: mvallevand
  Scheduled_Recordings - Filename field limited to 50 characters? JavaWiz 6 4,572 2015-10-28, 10:46 PM
Last Post: JavaWiz

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

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

Linear Mode
Threaded Mode