Page 1 of 1

unexpected "Undefined" Values

Posted: 08 May 2016, 11:19
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

Re: unexpected "Undefined" Values

Posted: 08 May 2016, 11:31
by rednoah
e.g. remove null / Undefined:

Code: Select all

{(['Hello', 'World', null, 'Undefined'] - [null, 'Undefined']).join(', ')}

Re: unexpected "Undefined" Values

Posted: 09 May 2016, 14:49
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?

Re: unexpected "Undefined" Values

Posted: 09 May 2016, 15:04
by rednoah
Mind your parentheses:

Code: Select all

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

Re: unexpected "Undefined" Values

Posted: 09 May 2016, 18:50
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

Re: unexpected "Undefined" Values

Posted: 12 May 2016, 10:24
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 /?

Re: unexpected "Undefined" Values

Posted: 12 May 2016, 12:12
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}/ }}

Re: unexpected "Undefined" Values

Posted: 19 Aug 2025, 07:11
by rednoah