Check if the mediainfo has duration before using it.
This commit is contained in:
parent
817c30635e
commit
ac0ac19bf1
1 changed files with 7 additions and 2 deletions
|
@ -155,8 +155,13 @@ MainDisplay::setMediainfo (const Xmms::PropDict &info)
|
||||||
} else {
|
} else {
|
||||||
m_stereo->setStereoMono (0, 1);
|
m_stereo->setStereoMono (0, 1);
|
||||||
}
|
}
|
||||||
m_slider->setMax (info.get<int32_t> ("duration"));
|
|
||||||
m_slider->hideBar (false);
|
if (info.contains ("duration")) {
|
||||||
|
m_slider->setMax (info.get<int32_t> ("duration"));
|
||||||
|
m_slider->hideBar (false);
|
||||||
|
} else {
|
||||||
|
m_slider->hideBar (true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue