<div dir="ltr"><div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 21 Aug 2019 16:45 Alexandre Janniaux, <<a href="mailto:ajanni@videolabs.io" rel="noreferrer noreferrer" target="_blank">ajanni@videolabs.io</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
Is there a reason why individual file types couldn't be indexed ?</blockquote></div></div><div dir="auto"><br></div><div dir="auto"></div><div>Files can have the indexed flag set if their container folder is indexed. </div><div><br></div><div>Otherwise, Both Pierre and Hugo said files are not indexible(one can not click on a file and index it)</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Regards,<br>
--<br>
Alexandre Janniaux<br>
VideoLabs<br>
<br>
On Tue, Aug 20, 2019 at 01:42:19PM +0300, Abel Tesfaye wrote:<br>
> From: Abel Tesfaye <<a href="mailto:Abeltesfaye45@gmail.com" rel="noreferrer noreferrer noreferrer" target="_blank">Abeltesfaye45@gmail.com</a>><br>
><br>
> ---<br>
> modules/gui/qt/components/mediacenter/mlnetworkmodel.cpp | 8 ++++----<br>
> modules/gui/qt/components/mediacenter/mlnetworkmodel.hpp | 2 +-<br>
> 2 files changed, 5 insertions(+), 5 deletions(-)<br>
><br>
> diff --git a/modules/gui/qt/components/mediacenter/mlnetworkmodel.cpp b/modules/gui/qt/components/mediacenter/mlnetworkmodel.cpp<br>
> index 1d3297450e..70edb5413f 100644<br>
> --- a/modules/gui/qt/components/mediacenter/mlnetworkmodel.cpp<br>
> +++ b/modules/gui/qt/components/mediacenter/mlnetworkmodel.cpp<br>
> @@ -274,7 +274,7 @@ void MLNetworkModel::refreshMediaList( MediaSourcePtr mediaSource,<br>
> QUrl::fromEncoded(QByteArray(it->psz_uri).append('/')) :<br>
> QUrl::fromEncoded(it->psz_uri);<br>
><br>
> - item.canBeIndexed = canBeIndexed( item.mainMrl );<br>
> + item.canBeIndexed = canBeIndexed( item.mainMrl , item.type );<br>
> item.mediaSource = mediaSource;<br>
><br>
> if ( item.canBeIndexed == true )<br>
> @@ -322,8 +322,8 @@ void MLNetworkModel::refreshDeviceList( MediaSourcePtr mediaSource, input_item_n<br>
> <a href="http://item.name" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">item.name</a> = qfu(children[i]->p_item->psz_name);<br>
> item.mrls.push_back( item.mainMrl );<br>
> item.indexed = false;<br>
> - item.canBeIndexed = canBeIndexed( item.mainMrl );<br>
> item.type = TYPE_SHARE;<br>
> + item.canBeIndexed = canBeIndexed( item.mainMrl , item.type );<br>
> item.protocol = item.mainMrl.scheme();<br>
> item.tree = NetworkTreeItem{ mediaSource,<br>
> children[i]->p_item,<br>
> @@ -393,7 +393,7 @@ void MLNetworkModel::SourceListener::onItemRemoved( vlc_media_tree_t *, input_it<br>
> self->model->onItemRemoved( self->source, children, count );<br>
> }<br>
><br>
> -bool MLNetworkModel::canBeIndexed(const QUrl& url)<br>
> +bool MLNetworkModel::canBeIndexed(const QUrl& url , ItemType itemType )<br>
> {<br>
> - return url.scheme() == "smb" || url.scheme() == "ftp";<br>
> + return itemType != TYPE_FILE && (url.scheme() == "smb" || url.scheme() == "ftp");<br>
> }<br>
> diff --git a/modules/gui/qt/components/mediacenter/mlnetworkmodel.hpp b/modules/gui/qt/components/mediacenter/mlnetworkmodel.hpp<br>
> index 4f4ee185b1..d09b5b9ece 100644<br>
> --- a/modules/gui/qt/components/mediacenter/mlnetworkmodel.hpp<br>
> +++ b/modules/gui/qt/components/mediacenter/mlnetworkmodel.hpp<br>
> @@ -132,7 +132,7 @@ private:<br>
> void refreshMediaList(MediaSourcePtr s, input_item_node_t* const children[], size_t count , bool clear);<br>
> void refreshDeviceList(MediaSourcePtr mediaSource, input_item_node_t* const children[], size_t count , bool clear);<br>
><br>
> - static bool canBeIndexed(const QUrl& url );<br>
> + static bool canBeIndexed(const QUrl& url , ItemType itemType );<br>
><br>
> private:<br>
> struct SourceListener<br>
> --<br>
> 2.21.0<br>
><br>
> _______________________________________________<br>
> vlc-devel mailing list<br>
> To unsubscribe or modify your subscription options:<br>
> <a href="https://mailman.videolan.org/listinfo/vlc-devel" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">https://mailman.videolan.org/listinfo/vlc-devel</a><br>
_______________________________________________<br>
vlc-devel mailing list<br>
To unsubscribe or modify your subscription options:<br>
<a href="https://mailman.videolan.org/listinfo/vlc-devel" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">https://mailman.videolan.org/listinfo/vlc-devel</a></blockquote></div></div></div>
</div>