]> git.sesse.net Git - vlc/blobdiff - modules/services_discovery/shout.c
udev: handle "change" action properly, fix disc ejection/insertion
[vlc] / modules / services_discovery / shout.c
index c6148bac272ab5a390da620f81c116c2e492c181..2103a4fda7bee4b6ba496a353b2eccb5b5ac04ef 100644 (file)
@@ -100,6 +100,8 @@ OPEN( ShoutTV )
 OPEN( Freebox )
 OPEN( FrenchTV )
 
+#undef OPEN
+
 vlc_module_begin ()
     set_category( CAT_PLAYLIST )
     set_subcategory( SUBCAT_PLAYLIST_SD )
@@ -153,7 +155,6 @@ struct services_discovery_sys_t
 static int Open( vlc_object_t *p_this, enum type_e i_type )
 {
     services_discovery_t *p_sd = ( services_discovery_t* )p_this;
-    services_discovery_SetLocalizedName( p_sd, _(p_items[i_type].psz_name) );
 
     p_sd->p_sys = malloc (sizeof (*(p_sd->p_sys)));
     if (p_sd->p_sys == NULL)
@@ -187,14 +188,13 @@ static input_item_t * CreateInputItemFromShoutItem( services_discovery_t *p_sd,
 {
     int i;
     /* Create the item */
-    input_item_t *p_input = input_item_NewExt( p_sd,
-                    p_item->psz_url, _(p_item->psz_name),
-                    0, NULL, -1 );
+    input_item_t *p_input = input_item_New( p_sd, p_item->psz_url,
+                                            vlc_gettext(p_item->psz_name) );
 
     /* Copy options */
     for( i = 0; p_item->ppsz_options[i] != NULL; i++ )
-        input_item_AddOption( p_input, p_item->ppsz_options[i] );
-    input_item_AddOption( p_input, "no-playlist-autostart" );
+        input_item_AddOption( p_input, p_item->ppsz_options[i], VLC_INPUT_OPTION_TRUSTED );
+    input_item_AddOption( p_input, "no-playlist-autostart", VLC_INPUT_OPTION_TRUSTED );
 
     return p_input;
 }
@@ -214,7 +214,7 @@ static void AddSubitemsOfShoutItemURL( services_discovery_t *p_sd,
     /* Read every subitems, and add them in ItemAdded */
     vlc_event_attach( &p_input->event_manager, vlc_InputItemSubItemAdded,
                       ItemAdded, &category );
-    input_Read( p_sd, p_input, true );
+    input_Read( p_sd, p_input );
     vlc_event_detach( &p_input->event_manager, vlc_InputItemSubItemAdded,
                       ItemAdded, &category );