[vlc-commits] upnp: change item b_net and i_type
Thomas Guillem
git at videolan.org
Wed Mar 25 15:35:10 CET 2015
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Mar 24 16:22:17 2015 +0000| [f39dbe2a27f643b6d63f3015f3fbc485637dcad7] | committer: Jean-Baptiste Kempf
upnp: change item b_net and i_type
Set b_net to true, and set ITEM_TYPE_DIRECTORY if the item is a share of a
directory.
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f39dbe2a27f643b6d63f3015f3fbc485637dcad7
---
modules/services_discovery/upnp.cpp | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/modules/services_discovery/upnp.cpp b/modules/services_discovery/upnp.cpp
index b427cf7..221a68d 100644
--- a/modules/services_discovery/upnp.cpp
+++ b/modules/services_discovery/upnp.cpp
@@ -278,8 +278,8 @@ bool MediaServerList::addServer( MediaServerDesc* desc )
if( asprintf(&psz_mrl, "upnp://%s?ObjectID=%s", desc->location.c_str(), desc->UDN.c_str() ) < 0 )
return false;
- p_input_item = input_item_NewWithType( psz_mrl, desc->friendlyName.c_str(), 0,
- NULL, 0, -1, ITEM_TYPE_NODE );
+ p_input_item = input_item_NewWithTypeExt( psz_mrl, desc->friendlyName.c_str(), 0,
+ NULL, 0, -1, ITEM_TYPE_NODE, 1);
free( psz_mrl );
if ( !p_input_item )
return false;
@@ -549,8 +549,8 @@ void MediaServer::addItem(const char *objectID, const char *title )
}
vlc_UrlClean( &url );
- input_item_t* p_item = input_item_NewWithType( psz_url, title, 0, NULL,
- 0, -1, ITEM_TYPE_NODE );
+ input_item_t* p_item = input_item_NewWithTypeExt( psz_url, title, 0, NULL,
+ 0, -1, ITEM_TYPE_DIRECTORY, 1 );
free( psz_url);
if ( !p_item )
return;
@@ -562,7 +562,8 @@ void MediaServer::addItem(const char *objectID, const char *title )
void MediaServer::addItem(const char* title, const char*, const char*,
mtime_t duration, const char* psz_url)
{
- input_item_t* p_item = input_item_NewExt( psz_url, title, 0, NULL, 0, duration );
+ input_item_t* p_item = input_item_NewWithTypeExt( psz_url, title, 0, NULL, 0,
+ duration, ITEM_TYPE_FILE, 1 );
input_item_node_AppendItem( node_, p_item );
input_item_Release( p_item );
}
More information about the vlc-commits
mailing list