Modify

Ticket #5379 (closed enhancement: fixed)

Opened 4 years ago

Last modified 2 years ago

enhancement to mythrename.pl to rename a single recording

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

Description

I have enhanced the mythrename.pl 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/mythrename.pl --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

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

Change History

Changed 4 years ago by johan@…

Patch file for enhancements to mythrename.pl

comment:1 Changed 4 years ago by kormoc

  • Owner changed from ijr to kormoc
  • Status changed from new to accepted
  • Component changed from mythtv to contrib

comment:2 Changed 3 years ago by stuartm

  • Component changed from contrib to Contributed Scripts & Apps

comment:3 Changed 3 years ago by kormoc

  • Milestone changed from unknown to 0.23

comment:4 Changed 2 years ago by mdean

  • Owner changed from kormoc to mdean

comment:5 Changed 2 years ago by mdean

  • Status changed from accepted to closed
  • Resolution set to fixed

(In [23479]) Modify mythlink.pl 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.

View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.