Skip to content

Commit

Permalink
VLC: Clear song info before checking if a vlc source can be found
Browse files Browse the repository at this point in the history
Otherwise it'll rewrite the cover placeholder on each refresh
  • Loading branch information
univrsal committed Jan 4, 2023
1 parent 75d3580 commit 1efbe24
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/query/vlc_obs_source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ static play_state from_obs_state(obs_media_state s)

void vlc_obs_source::refresh()
{
begin_refresh();
m_current.clear();
if (!reload())
return;

Expand All @@ -187,8 +189,6 @@ void vlc_obs_source::refresh()
if (!src)
return;

begin_refresh();
m_current.clear();
m_current.set(meta::STATUS, from_obs_state(obs_source_media_get_state(src)));

/* Prevent polling when vlc is stopped, which otherwise could cause a crash
Expand Down

0 comments on commit 1efbe24

Please sign in to comment.