Page 1 of 1
path issues
Posted: 02 Nov 2020, 15:28
by jchh
Hi,
I have only just joined this forum, so apologise if this is in the wrong place.
I dowloaded, tried and registered Filebot only a few hours ago, so this is no doubt a newbie question.
My renaming format (after researching on this forum) is as follows:
Code: Select all
{ny}/{episode.special ? 'Special' : 'Season '+s.pad(2)}/{n} ({y}) - {episode.special ? 's00e'+special.pad(2) : 's'+s.pad(2)+'e'+e.pad(2)} - {hd.matches(/SD/) ? " [SD]":""}{vf.matches(/720p/) ? " [HD]":""}{vf.matches(/1080p/) ? " [FHD]":""}{" [$resolution]”}{“ [$af]"} - {t}
The TV series I wish to rename on on my QNAP at:
/volumes/media/TV/ABC/<name of show>...
2 problems/questions:
- Matching is getting hung up on the /ABC/ folder that I keep all my TV shows that start with A,B or C. The show in question exists on "TheTVDB" and I have the right spelling and year etc. However, Filebot thinks the show is literally called ABC and it is trying to match it to shows like "The ABC Murders". How can I get Filebot to ignore the folder hierarchy above the show level?
- I guess this question is related: Filebot is trying to move the renamed show to /volumes/media/TV/ (i.e. above the /ABC/ directory). How can I get Filebot to simply rename the episodes in the <show> directory and not worry about where the <show> directory is?
thanks!
Re: path issues
Posted: 02 Nov 2020, 16:22
by rednoah
1.
You can use folders named
A,
B and
C, but not folders named
ABC. The easiest way to get FileBot to ignore
ABC is to just change the folder name to just
A I suppose.
If you're using the CLI, then you may be able to write your own
--q query expression though and extract the series name from the file path with your own custom code:
viewtopic.php?t=12043
2.
FileBot will simply rename files in place by default, unless you override things with your custom format. If you're using a custom format, then you'll want your custom format to generate absolute file paths, so that FileBot then moves files to that exact absolute file path. If you use a relative custom format, then FileBot will resolve the destination path relatively.
e.g.
Re: path issues
Posted: 02 Nov 2020, 16:52
by jchh
> You can use folders named A, B and C, but not folders named ABC
got it - thanks! ...I don't want to add 26 different folders to Plex though (and I don't want a single massive directory either). Would A-C work?
Re: path issues
Posted: 02 Nov 2020, 16:53
by jchh
>If you use a relative custom format, then FileBot will resolve the destination path relatively.
..was my format relative? (it feels relative to me).
Re: path issues
Posted: 03 Nov 2020, 03:56
by rednoah
jchh wrote: ↑02 Nov 2020, 16:52
got it - thanks! ...I don't want to add 26 different folders to Plex though (and I don't want a single massive directory either). Would A-C work?
A-C might work, assuming there's no TV Show titled
(or alias titled) literally A-C.
jchh wrote: ↑02 Nov 2020, 16:53
..was my format relative? (it feels relative to me).
This is a relative file path:
This is a relative format:
This is an absolute file path:
Code: Select all
/volumes/media/Avatar/Avatar.2009.mkv
This is an absolute format:
Re: path issues
Posted: 03 Nov 2020, 08:49
by jchh
OK,
so my code starts with
but it still moved the files to a new location that I hadn't specified: /volumes/media/TV/. ...but I guess that may have been the /abc/ confusing it still. I'll try again with a different folder.
Re: path issues
Posted: 03 Nov 2020, 08:56
by jchh
Hi Rednoah,
OK, so tried
Code: Select all
/volumes/media/TV/DEF/Dad's Army (1968)/Season OO/....
No problems with matching this time, so I guess there is no show called "DEF"!
However, the renamed shows still moved up a level to
even with the
renaming format.
I am somewhat confused. The path is in various colours if that helps explain this?
Re: path issues
Posted: 03 Nov 2020, 09:07
by jchh
so it works providing I remove the renamed show and season folders from the rename format, so this is removed:
Code: Select all
{ny}/{episode.special ? 'Season 00' : 'Season '+s.pad(2)}/
leaving only this:
Code: Select all
{ny} - {episode.special ? 's00e'+special.pad(2) : 's'+s.pad(2)+'e'+e.pad(2)} - {hd.matches(/SD/) ? " [SD]":""}{vf.matches(/720p/) ? " [HD]":""}{vf.matches(/1080p/) ? " [FHD]":""}{" [$resolution]"} - {t}
Does this mean I cannot rename the show and season folders if I want to keep the location?
Re: path issues
Posted: 03 Nov 2020, 09:19
by rednoah
How can FileBot know that you want to restructure your files at
/volumes/media/TV/DEF as opposed to
/volumes/media/TV? It can't. The latter would be the natural choice for most humans, so that's choice that it will make.
The solution is to specify exactly where you want files to go, using absolute paths. However, your ABC/DEF structure is designed to be human-friendly, not machine-friendly, and so generating absolute that fit your desired structure will be somewhat difficult.
You have many options, here's a few that come to mind:
* copy the first 4 levels from the original path using
{f} (assuming consistent /volumes/media/TV/DEF structure)
* copy the original
{folder} and
../ to go up a few folder levels
(assuming consistent Series/Season/Episode structure)
* use custom format code to generate ABC / DEF folder structure in your custom format
(non-trivial coding skill required)
That being said, the easiest solution is to just ditch your ABC / DEF folder structure and stick to the standard instead:
If you're very keen on A-Z folders, then this will do:
Code: Select all
/volumes/media/TV/{az}/{plex.tail}
Re: path issues
Posted: 03 Nov 2020, 09:25
by rednoah
jchh wrote: ↑03 Nov 2020, 09:07
Does this mean I cannot rename the show and season folders if I want to keep the location?
Not at all. A file name is just a relative path. A relative path is resolved against its current location as usual.
This is a relative file path:
This is a relative format:
This is an absolute format that integrates the original folder into destination path:
This is what happens by default if the format defines just the file name
(i.e. a relative path that consists of the file name part only) which is naturally resolved against the current file location.
You can of course organize files relatively to the absolute original folder, but keep in mind that
{folder} may be different for different files:
The problem is that when you say
"location" you mean
/volumes/media/TV/DEF or
/volumes/media/TV/ABC or something else depending on the situation. FileBot knows the
{folder} (e.g. /volumes/media/TV/DEF/Dad's Army (1968)/Season OO) so it can do things relative to that, FileBot does not know or work with the
"location" that you have in mind though.
EDIT:
TL;DR Your requirements are somewhat complicated. If you simplify your requirements, and stick to the standard naming scheme, then everything will fall in place much more easily:
Re: path issues
Posted: 03 Nov 2020, 09:50
by jchh
got it - thanks for you're patience!
I was trying to avoid a massive
/volumes/media/TV/ directory, but I guess it's easier to give in
thanks for your help!