unexpected "Undefined" Values

Any questions? Need some help?
Post Reply
Eye
Posts: 37
Joined: 07 Oct 2014, 21:22

unexpected "Undefined" Values

Post by Eye »

since the changes i now use

{n.take(40)} - {s.pad(2)+'x'}{e.pad(2)}{' Special '+special.pad(2)} - {t.take(40)} - [{any{group}{'NoGroup'}}] {source} [{resolution}] {video.codecID.join('-').replace('/', ' ')} {[vc, VF, af]} [{video.bitdepth.join('-')} {'Bit'}] {[audio.language].findAll{[null] != it}.join (", ")}​{'; ' +[text.language.join (", ")]}
due to Rednoahs help

For most of it It works like a charm
Giving something like:
Series - 11x01 - Episode - [NoGroup] HDTV [720x404] avc1 [x264, 480p, 2ch] [8 Bit] [8 Bit] [en, es]​; [en].mp4

And sometimes i get funy results like
series- 036 - episode - [[NoGroup] [640x480] XVID [XviD, 480p, 2ch] [8 Bit] [Undefined]​.avi

It seems some ppl Put "Undefined" or [Undefined]" in to an undefined Filed...

I tried Now to filter them Out adding || and && clauses or cascading to the {[audio.language].findAll{[null] != it}.join (", ") but i am not versed enough To make it work - most times it dosent give out anything anymore as subtitle Information ;)

The null or undefined Filter may also be needed with the Bit part and the subtitles but baby steps
did someone have that fun already?
i didnt find it in the forum

anny tipp would be appreciated
User avatar
rednoah
The Source
Posts: 22994
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: unexpected "Undefined" Values

Post by rednoah »

e.g. remove null / Undefined:

Code: Select all

{(['Hello', 'World', null, 'Undefined'] - [null, 'Undefined']).join(', ')}
:idea: Please read the FAQ and How to Request Help.
Eye
Posts: 37
Joined: 07 Oct 2014, 21:22

Re: unexpected "Undefined" Values

Post by Eye »

{(audio.language.findAll() - [null] - ['Undefined'] - ['[Undefined]'].join(", "))}


That above seems working but Leaves again [] the moment t had to remove something of the undesired values

i did not get any working audio languages list as i trid To put all in one list to remove like [null, 'Undefined']

is there a way to define the output a string and use replace on that?
User avatar
rednoah
The Source
Posts: 22994
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: unexpected "Undefined" Values

Post by rednoah »

Mind your parentheses:

Code: Select all

{(audio.language - [null, 'Undefined']).join(', ')}
:idea: Please read the FAQ and How to Request Help.
Eye
Posts: 37
Joined: 07 Oct 2014, 21:22

Re: unexpected "Undefined" Values

Post by Eye »

Thanks; i Git the substractions at once now running

{n.take(40)} - {s.pad(2)+'x'}{e.pad(2)}{' Special '+special.pad(2)} - {t.take(40)} - [{any{group}{'NoGroup'}}] {source} [{resolution}] {video.codecID.join('-').replace('/', ' ')} {[vc, VF, af]} [{video.bitdepth.join('-') - null}{' Bit'}] {'[' + {(audio.language - [null, 'Undefined']).join(', ')} + ']'}{'; ' +[(text.language - [null, 'Undefined']).join(', ')]}

Or

{n.take(40)} - {s.pad(2)+'x'}{e.pad(2)}{' Special '+special.pad(2)} - {t.take(40)} - [{any{group}{'NoGroup'}}] {source} [{resolution}] {video.codecID.join('-').replace('/', ' ')} {[vc, VF, af]} [{video.bitdepth.join('-') - null}{' Bit'}] [{(audio.language - [null, 'Undefined']).join(', ')}]{'; ' +[(text.language - [null, 'Undefined']).join(', ')]}


I tried different wasys But each time if there WAS something to take out of the listing I get []
Like ,,,[640x480] XVID [XviD, 480p, 2ch] [8 Bit] [] ​.avi

Its like an empty list is still a true for the Filter Purposses
Eye
Posts: 37
Joined: 07 Oct 2014, 21:22

Re: unexpected "Undefined" Values

Post by Eye »

someone in the Spork release group found it necessary to put 'Undefined / ja' in audio.language
I put that one inthe filter too but is there a Way to say " look over all and take Out all /?
User avatar
rednoah
The Source
Posts: 22994
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: unexpected "Undefined" Values

Post by rednoah »

Something like this? Just drop everything that doesn't look like a language code:

Code: Select all

{[null, 'Undefined', 'ja', 'Undefined / ja'].findAll{ it ==~ /\w{2,3}/ }}
:idea: Please read the FAQ and How to Request Help.
Post Reply