Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Empty value is treated as not empty (Read 2327 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Empty value is treated as not empty

I often listen to this radio:
http://stream-dc1.radioparadise.com/rp_96m.ogg
And I always encounter the same problem: empty value of %artist% is not treated as empty.

For example, for this title format string:
Code: [Select]
[%artist% - ]%title%
And for this data:
Code: [Select]
ARTIST=
TITLE=Emancipator - Anthem
I get this:
Code: [Select]
 - Emancipator - Anthem
It is possible to resolve this problem using this trick:
Code: [Select]
$iflonger($trim(%artist%),0,%artist% - ,)%title%
But it is not very convenient to put similar code everywhere. It would be much better to make the [...] construction a bit smarter :)

Re: Empty value is treated as not empty

Reply #1
Maybe because you use foo_ui_hacks (as mentioned in topic about ESC key usage)? You may want to wait for answer from someone from mods or closer to development, but I can answer rather the same thing as they would say - stop using banned components (entirely) and check thoroughly if problem still persist. Banned components can be responsible for uncontrollable output in any part of processing (audio output, string output, etc.). Foo_ui_hacks targets GUI, which is component responsible for strings processing, so don't be surprised that plugin is faulting that aspect of foobar's functionality.

Re: Empty value is treated as not empty

Reply #2
I'm quite sure that the problem is not caused by any plugin. You can reproduce it easily on your copy of the player. Just try to listen the radio and open settings where you can change title formatting:
http://veg.by/z/2017-11-24-21-39-35-e06d055d.png

Re: Empty value is treated as not empty

Reply #3
This is just bad tagging. If there is no artist, there should not be ARTIST= in file.

 

Re: Empty value is treated as not empty

Reply #4
I agree, but I can't force the Radio Paradise to fix their tags. foobar2000 could handle this case properly by default.

Re: Empty value is treated as not empty

Reply #5
I agree, but I can't force the Radio Paradise to fix their tags. foobar2000 could handle this case properly by default.

Foobar2000 is displaying what  Radio Paradise  is sending.

If StreamTitle exists , it is converted to %artist%  - %title%
Code: [Select]
 ffprobe -hide_banner  http://stream-uk1.radioparadise.com/mp3-128
[mp3 @ 00000256c96edb00] Skipping 0 bytes of junk at 0.
Input #0, mp3, from 'http://stream-uk1.radioparadise.com/mp3-128':
  Metadata:
    icy-br          : 128
    icy-genre       : eclectic rock
    icy-name        : Radio Paradise - DJ-mixed modern & classic rock, world, electronica & more - info: radioparadise.com
    icy-notice1     : <BR>This stream requires <a href="http://www.winamp.com/">Winamp</a><BR>
    icy-notice2     : SHOUTcast Distributed Network Audio Server/Linux v1.9.8<BR>
    icy-pub         : 0
    icy-url         : http://www.radioparadise.com
    StreamTitle     : Jason Isbell - White Man's World
    StreamUrl       : http://www.radioparadise.com/graphics/covers/m/B06XR7KH96.jpg
  Duration: N/A, start: 0.000000, bitrate: 128 kb/s
    Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s

The ogg stream only sends TITLE metadata and foobar2000 displays it as %title%.

Code: [Select]
 ffprobe -hide_banner  http://stream-dc1.radioparadise.com/rp_96m.ogg
Input #0, ogg, from 'http://stream-dc1.radioparadise.com/rp_96m.ogg':
  Metadata:
    icy-br          : 96
    icy-description : Music & station info at radioparadise.com
    icy-genre       : eclectic rock
    icy-name        : Radio Paradise - DJ-mixed modern & classic rock, world, electronica & more
    icy-pub         : 1
    icy-url         : http://www.radioparadise.com
  Duration: N/A, start: 48.018866, bitrate: 96 kb/s
    Stream #0:0: Audio: vorbis, 44100 Hz, stereo, fltp, 96 kb/s
    Metadata:
      TITLE           : Jason Isbell - White Man's World
      SERVER          : Icecast 2.3.3-kh9


Re: Empty value is treated as not empty

Reply #6
The ogg stream only sends TITLE metadata and foobar2000 displays it as %title%.
It also adds " - " before the %title%, because for some reason the player thinks that %artist% is not empty.

Re: Empty value is treated as not empty

Reply #7
The ogg stream only sends TITLE metadata and foobar2000 displays it as %title%.
It also adds " - " before the %title%, because for some reason the player thinks that %artist% is not empty.

Reproduced.

Maybe this extract from debug log from streamripper can help as it seems that in the streams vorbis comments the artist= is defined.

Code: [Select]
streamripper.exe http://stream-dc1.radioparadise.com/rp_96m.ogg --debug

Code: [Select]
Vorbis headers parsed for stream 0, information follows...
Version: 0
Vendor: Xiph.Org libVorbis I 20070622
Channels: 2
Rate: 44100

Nominal bitrate: 96,000000 kb/s
Upper bitrate not set
Lower bitrate not set
User comments section follows...
artist=
cur=0, btc=1, br=1, bw=1 (b1=0x00)
Successful conversion: 1 bytes read
convert_string_with_replacement || -> || (CP1252 -> UTF-8)
title=The Waifs - Beautiful You
cur=0, btc=26, br=26, bw=26 (b1=0x54)
Successful conversion: 26 bytes read
convert_string_with_replacement |The Waifs - Beautiful You| -> |The Waifs - Beautiful You| (CP1252 -> UTF-8)
server=Icecast 2.3.3-kh9

Maybe its due to the fact that they use Icecast 2.3.3-kh9 which is from 16/08/2013.