Agents of S.H.I.E.L.D

All about user-defined episode / movie / file name format expressions
Post Reply
JrGooNer
Posts: 20
Joined: 16 Mar 2016, 15:27

Agents of S.H.I.E.L.D

Post by JrGooNer »

Hey again, been a while but I'm back lol

I've been trying to sort it out so my code removes stuff like 'marvel' from the name. Looking at all the examples above, would I need to have a separate piece of code to use for every time I'm working with a marvel show? For instance I'm trying to change Marvel's Agents of S.H.I.E.L.D. now to just agents of SHIELD.

I remember something about a manual override once but could never get it to work. I had a memory of someone saying it changes it in the database so that from then on that show will always just be the new name even if you're just using your standard code.. is that right or am i making things up?
User avatar
rednoah
The Source
Posts: 23928
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Agents of S.H.I.E.L.D

Post by rednoah »

1.
Whatever may or may not be in the database, this is just about formatting the name and does not access any database in anyway whatsoever:
viewtopic.php?f=5&t=182

The official name of that show is Agents of S.H.I.E.L.D. (according to TheTVDB) and that is fixed and unchangeable (for you).


2.
You will need a piece of code for every fix (e.g. S.H.I.E.L.D. to SHIELD) but that can all be added into a single format, and if you have a lot of that then you can put it into an external text file to be used from your format.

You can play with this code:

Code: Select all

{n.replaceAll(/(?<=\b\w)[.](?=\w\b|\s|$)/, '')}
But I recommend a simple S.H.I.E.L.D. to SHIELD replacement because I'm pretty sure that's the only show where that kind of fix will ever be necessary:

Code: Select all

{n.replace('S.H.I.E.L.D.', 'SHIELD')}
:idea: Please read the FAQ and How to Request Help.
JrGooNer
Posts: 20
Joined: 16 Mar 2016, 15:27

Re: Agents of S.H.I.E.L.D

Post by JrGooNer »

Yes sorry that must have sounded pretty stupid tbh. I didn't mean the main databases that the program uses rather the memory of the program.. but I'm confusing myself now anyway lol ignore it

but yes it makes sense that I would just make a new code with your 'SHIELD' bit in it and then save it as a preset which I use anyway because I have a web-dl preset for half my files from talking to you before.

I don't really understand what this code was though

Code: Select all

{n.replaceAll(/(?<=\b\w)[.](?=\w\b|\s|$)/, '')}


Will that be able to be tinkered and added to remove the 'marvel' ?
User avatar
rednoah
The Source
Posts: 23928
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Agents of S.H.I.E.L.D

Post by rednoah »

Just add it all:

Code: Select all

{n.removeAll(/Marvel's /).replace('S.H.I.E.L.D.', 'SHIELD').replace('S.H.I.E.L.D.', 'SHIELD').replace('Deep Space Nine', 'DS9').replace('The Walking Dead', 'Walking Dead')}
You may use an external text file to clean up this sausage fest of code.


PS: IDK~ try it and see what happens~

Code: Select all

{'Agents of S.H.I.E.L.D.'.replaceAll(/(?<=\b\w)[.](?=\w\b|\s|$)/, '')}
:idea: Please read the FAQ and How to Request Help.
JrGooNer
Posts: 20
Joined: 16 Mar 2016, 15:27

Re: Agents of S.H.I.E.L.D

Post by JrGooNer »

Thankyou very much sir. Got myself some very long and drawn out, yet effective code now then. Would be a bit tight to not post it here now after all the time and help.

Code: Select all

{n.sortName().replaceTrailingBrackets().removeAll(/Marvel's /).replace('S.H.I.E.L.D.', 'SHIELD').replace('Battlestar Galactica', 'BSG')} {sxe} {t.replaceAll(/[?.]+$/).replaceAll(/[`´‘’ʻ]/, "'").replace(':',';').lowerTrail().replacePart(' ($1)')}
Btw did you notice that lately these things don't work anymore

Code: Select all

.replacePart(' ($1)')


Image

.. I think its because the sites that the data comes from have changed their naming rules for instance most sites used to use 'Part 1' where as now they are using the thing I always changed it to anyway '(1)'. I suppose it's a good thing that it's becoming consistent but for the time being it's probably messing with programs like this one.
User avatar
rednoah
The Source
Posts: 23928
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Agents of S.H.I.E.L.D

Post by rednoah »

The current version strips away trailing parentheses when {t} is used, which breaks old behaviour. The next release will restore the old behaviour and only strip trailing parentheses for multi-episode objects.

You may use the latest revision which fixes this issue.
:idea: Please read the FAQ and How to Request Help.
JrGooNer
Posts: 20
Joined: 16 Mar 2016, 15:27

Re: Agents of S.H.I.E.L.D

Post by JrGooNer »

Oh right ok yeh I will have a look at that
Post Reply