Page 1 of 1

Renaming Mixed results

Posted: 04 Jul 2016, 08:25
by Draik
I use the following format for renaming TV Shows:

{n.replaceAll(/[`´‘’ʻ"]/, "'").replace(':'," -").replace('?',".")} {episode.special ? '[Special] ':''}[{s.pad(2)}x{es*.pad(2).join('-').replaceAll('null',{episode.special ? special.pad(2):''})}] {t.replaceAll(/[`´‘’ʻ"]/, "'").replace(':'," -").replace('?',".")} [{try{"$source "}catch(e){'XQ '}}{vf.match(/720[pP]|1080[pP]|2160[PP]/)+' '}{try{"$ac"}catch(e){'UA'}}{" $group"}]

My main issues lie with the ending part:
[{try{"$source "}catch(e){'XQ '}}{vf.match(/720[pP]|1080[pP]|2160[PP]/)+' '}{try{"$ac"}catch(e){'UA'}}...

1.
When Renaming TV Shows that are simply "WEB" (not WEB-DL or WEBRip), the "{try{"$source "}catch(e){'XQ '}}" does not get anything out of it.

2.
When renaming subtitles, "{vf.match(/720[pP]|1080[pP]|2160[PP]/)+' '}" does not corrolate to the actual value in the name of the subtitle, where when I have both 720p and 1080p of the same episode subtitles, both are marked as 1080p. Sometimes when I only have 720p, it marks it as 720p.
This is inconsistent. Sometimes it gets it right, sometimes it doesn't, on the same files.

P.S. I do not necessarily rename the episode and subtitle at the same time.

3.
Also for renaming subtitles, "{try{"$ac"}catch(e){'UA'}}" audio format is not obtained correctly. (Giving me the result UA)


Is there a way to make the app compare subtitles names to previously renamed episodes/movies/etc and if a match is found, rename it to the same name without having to go through the online databases and restructuring the name from scratch?

Edit: I don't know if this matters for these specific issues, but I'm using the App Store Version (Version 4.7 (3930)) on MacOS 10.11.5.

Image

Image

Re: Renaming Mixed results

Posted: 05 Jul 2016, 05:03
by rednoah
1.
"WEB" is not part of the source pattern at this point. Not sure if this is a thing but it's not the "standard" way of naming things.


2.
MediaInfo bindings will not work unless you process video files and subtitle files at the same time.


Note that source is based on the filename while vf and ac are based on the media file content. You don't have to use vf/ac if you can grep that info from the file name.

Re: Renaming Mixed results

Posted: 24 Sep 2016, 14:48
by Draik
rednoah wrote:Note that source is based on the filename while vf and ac are based on the media file content. You don't have to use vf/ac if you can grep that info from the file name.
How can I do that?

Re: Renaming Mixed results

Posted: 24 Sep 2016, 15:43
by rednoah
The usual fn.match(/.../) approach should work just fine.