Commit a07b3174 authored by Filip Roséen's avatar Filip Roséen Committed by Hugo Beauzée-Luyssen

addons/vorepository: use vlc_stream_NewMRL

refs: #18131
Signed-off-by: Hugo Beauzée-Luyssen's avatarHugo Beauzée-Luyssen <hugo@beauzee.fr>
parent c66a72f7
......@@ -29,6 +29,7 @@
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_stream.h>
#include <vlc_stream_extractor.h>
#include <vlc_addons.h>
#include <vlc_xml.h>
#include <vlc_fs.h>
......@@ -165,7 +166,7 @@ static int ParseManifest( addons_finder_t *p_finder, addon_entry_t *p_entry,
addon_file_t *p_file = malloc( sizeof(addon_file_t) );
p_file->e_filetype = i_filetype;
p_file->psz_filename = strdup( psz_filename );
if ( asprintf( & p_file->psz_download_uri, "%s!/%s",
if ( asprintf( & p_file->psz_download_uri, "%s#!/%s",
psz_tempfileuri, psz_filename ) > 0 )
{
ARRAY_APPEND( p_entry->files, p_file );
......@@ -423,18 +424,18 @@ static int Retrieve( addons_finder_t *p_finder, addon_entry_t *p_entry )
msg_Dbg( p_finder, "Reading manifest from %s", p_finder->p_sys->psz_tempfile );
char *psz_tempfileuri = vlc_path2uri( p_finder->p_sys->psz_tempfile, "unzip" );
char *psz_tempfileuri = vlc_path2uri( p_finder->p_sys->psz_tempfile, NULL );
if ( !psz_tempfileuri )
return VLC_ENOMEM;
char *psz_manifest_uri;
if ( asprintf( &psz_manifest_uri, "%s!/manifest.xml", psz_tempfileuri ) < 1 )
if ( asprintf( &psz_manifest_uri, "%s#!/manifest.xml", psz_tempfileuri ) < 1 )
{
free( psz_tempfileuri );
return VLC_ENOMEM;
}
p_stream = vlc_stream_NewURL( p_finder, psz_manifest_uri );
p_stream = vlc_stream_NewMRL( p_finder, psz_manifest_uri );
free( psz_manifest_uri );
if ( !p_stream )
{
......@@ -457,11 +458,11 @@ static int FindDesignated( addons_finder_t *p_finder )
char *psz_manifest;
const char *psz_path = p_finder->psz_uri + 7; // remove scheme
if ( asprintf( &psz_manifest, "unzip://%s!/manifest.xml",
if ( asprintf( &psz_manifest, "file://%s#!/manifest.xml",
psz_path ) < 1 )
return VLC_ENOMEM;
stream_t *p_stream = vlc_stream_NewURL( p_finder, psz_manifest );
stream_t *p_stream = vlc_stream_NewMRL( p_finder, psz_manifest );
free( psz_manifest );
if ( !p_stream ) return VLC_EGENERIC;
......
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