Renaming Mixed results

Any questions? Need some help?
Post Reply
Draik
Donor
Posts: 19
Joined: 12 Apr 2014, 07:51

Renaming Mixed results

Post 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
User avatar
rednoah
The Source
Posts: 23930
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Renaming Mixed results

Post 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.
:idea: Please read the FAQ and How to Request Help.
Draik
Donor
Posts: 19
Joined: 12 Apr 2014, 07:51

Re: Renaming Mixed results

Post 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?
User avatar
rednoah
The Source
Posts: 23930
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Renaming Mixed results

Post by rednoah »

The usual fn.match(/.../) approach should work just fine.
:idea: Please read the FAQ and How to Request Help.
Post Reply