#148 open
mcp

move_files_enable/--move does not honour output_filename_replacements

Reported by mcp | February 13th, 2015 @ 09:23 PM

I've got the following set as output_filename_replacements:

{
   "output_filename_replacements":[
      {
         "is_regex":false,
         "match":" ",
         "replacement":"_"
      },
      {
         "is_regex":false,
         "match":",",
         "replacement":""
      },
      {
         "is_regex":false,
         "match":"'",
         "replacement":""
      },
      {
         "is_regex":false,
         "match":":",
         "replacement":""
      },
      {
         "is_regex":false,
         "match":"!",
         "replacement":""
      },
      {
         "is_regex":false,
         "match":"?",
         "replacement":""
      },
      {
         "is_regex":false,
         "match":"&",
         "replacement":"and"
      }
   ]
}

When using tvnamer with move_files_enabled: true and "move_files_destination": "/just/a/random/path/%(seriesname)s/" the filenames are being properly sanitised as per the rules I've defined. Unfortunately there does not appear to be a way to do the same for move_files_destination:

$ tvnamer "Jerrie's Musings s01e01.avi"
Loading config: $HOME/.tvnamer.json
####################
# Starting tvnamer
# Found 1 episode
####################
# Processing file: Jerrie's Musings s01e01.avi
# Detected series: Jerrie's Musings (season: 1, episode: 1)
####################
Old filename: Jerrie's Musings s01e01.avi
Before custom output replacements: Jerrie's Musings 01x01 What.avi
New filename: Jerries_Musings-01x01-What.avi
New path: /just/a/random/path/Jerries_Musings-01x01-What.avi
rename /just/a/random/path/Jerrie's Musings s01e01.avi to /just/a/random/path/Jerries_Musings-01x01-What.avi
New path: /just/a/random/path/Jerrie's Musings/Jerries_Musings-01x01-What.avi
Created directory /just/a/random/path/Jerrie's Musings
rename /just/a/random/path/Jerries_Musings-01x01-What.avi to /just/a/random/path/Jerrie's Musings/Jerries_Musings-01x01-What.avi

Would it be possible to have output_filename_replacements - or some other mechanism - also work for moving files?

Comments and changes to this ticket

  • dbr/Ben

    dbr/Ben March 29th, 2015 @ 04:28 PM

    • State changed from “new” to “open”

    There is the move_files_fullpath_replacements option which should do this, although it means you have to duplicate the replacements which is a bit messy

    Ideally you could do the replacements on the chunks of data from TVDB (e.g the series name), rather than on the entire output.. but there's no option currently for that

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Shared Ticket Bins

People watching this ticket

Pages