Opened 13 years ago

Closed 11 years ago

#5379 closed enhancement (fixed)

enhancement to to rename a single recording

Reported by: johan@… Owned by: sphery
Priority: minor Milestone: 0.23
Component: Contributed Scripts & Apps Version: 0.21
Severity: low Keywords:
Cc: Ticket locked: no


I have enhanced the script so it can be called with the --file <FILENAME> option to rename only a single file in stead of a complete directory.

This is useful if you want to have recordings available for multiple mediaplayers and want a meaningful name for the recording.

I have set up the following userjob which is automatically run after each recording (The directory where recordings are stored is /MediaFiles/Capture?): /usr/local/bin/ --link /MediaFiles/Recordings? --format "%pY-%pm-%pd %pH:%pi - %T - %S" --file "%FILE%"

Attached is the patch for the enhancement.

I hope this enhancement is useful for others as well.

Greetinx Johan Godfried

Attachments (1)

mythrename.patch (3.5 KB) - added by johan@… 13 years ago.
Patch file for enhancements to

Download all attachments as: .zip

Change History (6)

Changed 13 years ago by johan@…

Attachment: mythrename.patch added

Patch file for enhancements to

comment:1 Changed 13 years ago by Rob Smith

Component: mythtvcontrib
Owner: changed from Isaac Richards to Rob Smith
Status: newaccepted

comment:2 Changed 12 years ago by stuartm

Component: contribContributed Scripts & Apps

comment:3 Changed 12 years ago by Rob Smith

Milestone: unknown0.23

comment:4 Changed 11 years ago by sphery

Owner: changed from Rob Smith to sphery

comment:5 Changed 11 years ago by sphery

Resolution: fixed
Status: acceptedclosed

(In [23479]) Modify to allow creating a symlink for a specific recording file using the --filename or --chanid and --starttime arguments. This allows the script to be used as a proper user job or--even better--to be used in conjunction with the "Recording started" event in the new event-driven notification system so links are created as soon as the recordings start.

Note that when specifying --filename or --chanid and --starttime, deletion of old symlinks (other than the one for the specific file) is suppressed. Therefore, anyone using this script in a user job or with the event system should still run the script occasionally without the --filename or --chanid and --starttime arguments to allow removal of links that referred to recordings since deleted.

The --filename argument can use either the absolute path of the file or the recording file's basename. The --starttime argument can use either the MythTV time format (yyyy-MM-ddThh:mm:ss), the ISO time format (yyyy-MM-dd hh:mm:ss), or the "job queue" time format (yyyyMMddhhmmss). The --chanid uses the channel ID format.

Thanks to Johan Godfried for the initial patch. Fixes #5379 with a slightly modified version of the patch on the ticket.

Note: See TracTickets for help on using tickets.