皂液1.1比1.3 - 动态播放列表

问题描述:

场景:皂液1.1比1.3 - 动态播放列表

  • Ubuntu 17.04
  • Liquid Soap 1.1.1 installed by apt-get
  • Liquid Soap 1.3.1 installed by OPAM

1.1.1,我不能用AAC +编码器。所以我已经安装了带有AAC +支持的1.3.1。但是使用相同的.liq文件,两个版本的行为都不相同。

出于某种原因,1.1的作品,不是1.3:

def my_request_function() = 
    # Get the first line of my external process 
    result = list.hd(get_process_lines("php -q liquid.php")) 
    # Create and return a request using this result 
    request.create(result) 
end 

错误:

At line 17, char 24: 
    this value has type 
    (default:_)->_ (inferred at line 15, char 19-58) 
    but it should be a subtype of 
    string 

我想读的PHP脚本中的 “下一首歌曲”。在1.1.1上使用MP3(+ icecast2),但由于我需要AAC +,我使用1.3.1,我无法弄清楚如何读取外部脚本。

任何想法?谢谢。

1.3有另一个参数添加到​​3210和其他列表功能。 https://github.com/savonet/liquidsoap/blob/master/CHANGES#L52

您可以用新的默认值参数更新您的代码,它应该工作。

result = list.hd(default="", get_process_lines("php -q liquid.php")) 
+0

谢谢!工作正常! – Arvy