fix issues with some song info not appearing

custom
jacqueline 1 year ago
parent 52f5e95acb
commit 200a43fad3
  1. 18
      src/audio/audio_decoder.cpp
  2. 2
      src/lua/property.cpp

@ -139,17 +139,13 @@ auto Decoder::BeginDecoding(std::shared_ptr<TaggedStream> stream) -> bool {
}
stream->SetPreambleFinished();
if (open_res->total_samples) {
timer_.reset(new Timer(std::shared_ptr<Track>{new Track{
.tags = stream->tags(),
.db_info = {},
.bitrate_kbps = 0,
.encoding = stream->type(),
}},
open_res.value()));
} else {
timer_.reset();
}
timer_.reset(new Timer(std::shared_ptr<Track>{new Track{
.tags = stream->tags(),
.db_info = {},
.bitrate_kbps = open_res->sample_rate_hz,
.encoding = stream->type(),
}},
open_res.value()));
current_sink_format_ = IAudioOutput::Format{
.sample_rate = open_res->sample_rate_hz,

@ -183,7 +183,7 @@ static auto pushTagValue(lua_State* L, const database::TagValue& val) -> void {
for (const auto& i : arg) {
lua_pushlstring(L, i.data(), i.size());
lua_pushboolean(L, true);
lua_rawset(L, -2);
lua_rawset(L, -3);
}
} else if constexpr (std::is_same_v<T, uint32_t>) {
lua_pushinteger(L, arg);

Loading…
Cancel
Save