Commit 3f2ef26a authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: factorize code of opening MRL

parent 2f1adbff
......@@ -167,19 +167,12 @@ void RecentsMRL::playMRL( const QString &mrl )
Open::openMRL( p_intf, mrl );
}
void Open::openMRL( intf_thread_t *p_intf,
int Open::openMRL( intf_thread_t *p_intf,
const QString &mrl,
bool b_start,
bool b_playlist)
{
playlist_Add( THEPL, qtu(mrl), NULL,
PLAYLIST_APPEND | (b_start ? PLAYLIST_GO : PLAYLIST_PREPARSE),
PLAYLIST_END,
b_playlist,
pl_Unlocked );
if( b_start && b_playlist )
RecentsMRL::getInstance( p_intf )->addRecent( mrl );
return openMRLwithOptions( p_intf, mrl, NULL, b_start, b_playlist, NULL );
}
int Open::openMRLwithOptions( intf_thread_t* p_intf,
......@@ -206,7 +199,8 @@ int Open::openMRLwithOptions( intf_thread_t* p_intf,
}
}
int i_ret = playlist_AddExt( THEPL, qtu(mrl), title,
int i_ret = playlist_AddExt( THEPL,
qtu(mrl), title,
PLAYLIST_APPEND | (b_start ? PLAYLIST_GO : PLAYLIST_PREPARSE),
PLAYLIST_END,
-1,
......
......@@ -38,7 +38,7 @@ class QSignalMapper;
class Open
{
public:
void static openMRL( intf_thread_t*,
int static openMRL( intf_thread_t*,
const QString &,
bool b_start = true,
bool b_playlist = true);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment