Commit d276f755 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: provide an helper to open items

parent e3fa3a21
...@@ -182,3 +182,23 @@ void Open::openMRL( intf_thread_t *p_intf, ...@@ -182,3 +182,23 @@ void Open::openMRL( intf_thread_t *p_intf,
if( b_start && b_playlist ) if( b_start && b_playlist )
RecentsMRL::getInstance( p_intf )->addRecent( mrl ); RecentsMRL::getInstance( p_intf )->addRecent( mrl );
} }
int Open::openInput( intf_thread_t* p_intf,
input_item_t *p_item,
const QString &mrl,
bool b_start,
bool b_playlist)
{
int i_ret = playlist_AddInput( THEPL, p_item,
PLAYLIST_APPEND | (b_start ? PLAYLIST_GO : PLAYLIST_PREPARSE),
PLAYLIST_END,
b_playlist,
pl_Unlocked );
if( i_ret == VLC_SUCCESS && b_start && b_playlist )
RecentsMRL::getInstance( p_intf )->addRecent( mrl );
return i_ret;
}
...@@ -42,6 +42,12 @@ public: ...@@ -42,6 +42,12 @@ public:
const QString &, const QString &,
bool b_start = true, bool b_start = true,
bool b_playlist = true); bool b_playlist = true);
int static openInput( intf_thread_t*,
input_item_t *,
const QString &,
bool b_start = true,
bool b_playlist = true);
}; };
class RecentsMRL : public QObject, public Singleton<RecentsMRL> class RecentsMRL : public QObject, public Singleton<RecentsMRL>
......
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