Changeset 391

Show
Ignore:
Timestamp:
08/19/06 17:32:38 (2 years ago)
Author:
nicfit
Message:

Use gnomevfs.URI instead of homegrown implementation (#200) which also
fixes playlists like "Comp #1" (#181)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/po/POTFILES.in

    r390 r391  
    1919src/mesk/common/i18n.py 
    2020src/mesk/common/__init__.py 
    21 src/mesk/common/uri.py 
    2221src/mesk/gtk_utils.py 
    2322src/mesk/info.py 
     
    2928src/mesk/plugin/plugin.py 
    3029src/mesk/plugin/provider.py 
     30src/mesk/uri.py 
    3131src/mesk/utils.py 
    3232src/mesk/window.py 
  • trunk/po/es.po

    r390 r391  
    88"Project-Id-Version: 0.1.1\n" 
    99"Report-Msgid-Bugs-To: \n" 
    10 "POT-Creation-Date: 2006-08-18 20:14-0600\n" 
     10"POT-Creation-Date: 2006-08-19 17:25-0600\n" 
    1111"PO-Revision-Date: 2006-04-15 17:38-0600\n" 
    1212"Last-Translator: Travis Shirk <travis@pobox.com>\n" 
     
    275275msgstr "Formato audio sin apoyo: %s" 
    276276 
    277 #: ../src/mesk/audio/mp3.py:109 
     277#: ../src/mesk/audio/mp3.py:80 
     278#, fuzzy, python-format 
     279msgid "Error loading ID3 tag for '%s': %s" 
     280msgstr "Metadata de la fuente de la lectura de error en '%s': %s" 
     281 
     282#: ../src/mesk/audio/mp3.py:113 
    278283#, fuzzy, python-format 
    279284msgid "Error reading mp3 source for '%s': %s" 
    280285msgstr "Metadata de la fuente de la lectura de error en '%s': %s" 
    281286 
    282 #: ../src/mesk/audio/oggvorbis.py:71 
     287#: ../src/mesk/audio/oggvorbis.py:74 
    283288#, fuzzy, python-format 
    284289msgid "Error reading ogg/vorbis source for '%s': %s" 
     
    459464msgstr "Tipo inválido para '%s'plugin: %s" 
    460465 
    461 #: ../src/mesk/utils.py:49 
     466#: ../src/mesk/utils.py:50 
    462467msgid "KB" 
    463468msgstr "KB" 
    464469 
    465 #: ../src/mesk/utils.py:50 
     470#: ../src/mesk/utils.py:51 
    466471msgid "MB" 
    467472msgstr "MB" 
    468473 
    469 #: ../src/mesk/utils.py:51 
     474#: ../src/mesk/utils.py:52 
    470475msgid "GB" 
    471476msgstr "GB" 
    472477 
    473 #: ../src/mesk/utils.py:54 
     478#: ../src/mesk/utils.py:55 
    474479msgid "Bytes" 
    475480msgstr "Octetos" 
    476481 
    477482#. Text columns 
    478 #: ../src/playlist_control.py:172 
     483#: ../src/playlist_control.py:171 
    479484msgid "Title" 
    480485msgstr "Título" 
    481486 
    482 #: ../src/playlist_control.py:173 
     487#: ../src/playlist_control.py:172 
    483488msgid "Artist" 
    484489msgstr "Artista" 
    485490 
    486 #: ../src/playlist_control.py:174 
     491#: ../src/playlist_control.py:173 
    487492msgid "Album" 
    488493msgstr "Álbum" 
    489494 
    490 #: ../src/playlist_control.py:175 
     495#: ../src/playlist_control.py:174 
    491496msgid "#" 
    492497msgstr "#" 
    493498 
    494 #: ../src/playlist_control.py:176 
     499#: ../src/playlist_control.py:175 
    495500msgid "Year" 
    496501msgstr "Año" 
    497502 
    498 #: ../src/playlist_control.py:177 
     503#: ../src/playlist_control.py:176 
    499504msgid "Time" 
    500505msgstr "Tiempo" 
    501506 
    502 #: ../src/playlist_control.py:453 
     507#: ../src/playlist_control.py:454 
    503508#, python-format 
    504509msgid "Are you sure you want to delete playlist '%s'?" 
    505510msgstr "" 
    506511 
    507 #: ../src/playlist_control.py:455 
     512#: ../src/playlist_control.py:456 
    508513msgid "All playlist data will be lost." 
    509514msgstr "" 
    510515 
    511 #: ../src/playlist_control.py:633 
     516#: ../src/playlist_control.py:634 
    512517msgid "tracks" 
    513518msgstr "pistas" 
    514519 
    515 #: ../src/playlist_control.py:983 
     520#: ../src/playlist_control.py:986 
    516521#, fuzzy, python-format 
    517522msgid "" 
     
    521526msgstr "Fuente que cae del error: %s" 
    522527 
    523 #: ../src/playlist_control.py:991 
     528#: ../src/playlist_control.py:994 
    524529#, fuzzy, python-format 
    525530msgid "" 
     
    531536"%s" 
    532537 
    533 #: ../src/playlist_control.py:1046 
     538#: ../src/playlist_control.py:1049 
    534539msgid "Add Music" 
    535540msgstr "Agregue La Música" 
    536541 
    537 #: ../src/playlist_control.py:1063 
     542#: ../src/playlist_control.py:1066 
    538543msgid "All" 
    539544msgstr "" 
    540545 
    541 #: ../src/playlist_control.py:1065 
     546#: ../src/playlist_control.py:1068 
    542547msgid "Audio" 
    543548msgstr "" 
    544549 
    545 #: ../src/playlist_control.py:1066 
     550#: ../src/playlist_control.py:1069 
    546551msgid "Playlists" 
    547552msgstr "Playlists" 
     
    550555#. the checkbox is toggles and files when not since this is not 
    551556#. possible by default 
    552 #: ../src/playlist_control.py:1071 
     557#: ../src/playlist_control.py:1074 
    553558msgid "Make the _dialog be able/unable to select directories" 
    554559msgstr "Haga que el _diálogo es able/unable para seleccionar directorios" 
    555560 
    556 #: ../src/playlist_control.py:1194 
     561#: ../src/playlist_control.py:1197 
    557562#, python-format 
    558563msgid "'%s' string not found" 
  • trunk/po/mesk.pot

    r390 r391  
    99"Project-Id-Version: PACKAGE VERSION\n" 
    1010"Report-Msgid-Bugs-To: \n" 
    11 "POT-Creation-Date: 2006-08-18 20:14-0600\n" 
     11"POT-Creation-Date: 2006-08-19 17:25-0600\n" 
    1212"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 
    1313"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 
     
    265265msgstr "" 
    266266 
    267 #: ../src/mesk/audio/mp3.py:109 
     267#: ../src/mesk/audio/mp3.py:80 
     268#, python-format 
     269msgid "Error loading ID3 tag for '%s': %s" 
     270msgstr "" 
     271 
     272#: ../src/mesk/audio/mp3.py:113 
    268273#, python-format 
    269274msgid "Error reading mp3 source for '%s': %s" 
    270275msgstr "" 
    271276 
    272 #: ../src/mesk/audio/oggvorbis.py:71 
     277#: ../src/mesk/audio/oggvorbis.py:74 
    273278#, python-format 
    274279msgid "Error reading ogg/vorbis source for '%s': %s" 
     
    443448msgstr "" 
    444449 
    445 #: ../src/mesk/utils.py:49 
     450#: ../src/mesk/utils.py:50 
    446451msgid "KB" 
    447452msgstr "" 
    448453 
    449 #: ../src/mesk/utils.py:50 
     454#: ../src/mesk/utils.py:51 
    450455msgid "MB" 
    451456msgstr "" 
    452457 
    453 #: ../src/mesk/utils.py:51 
     458#: ../src/mesk/utils.py:52 
    454459msgid "GB" 
    455460msgstr "" 
    456461 
    457 #: ../src/mesk/utils.py:54 
     462#: ../src/mesk/utils.py:55 
    458463msgid "Bytes" 
    459464msgstr "" 
    460465 
    461466#. Text columns 
     467#: ../src/playlist_control.py:171 
     468msgid "Title" 
     469msgstr "" 
     470 
    462471#: ../src/playlist_control.py:172 
    463 msgid "Title
     472msgid "Artist
    464473msgstr "" 
    465474 
    466475#: ../src/playlist_control.py:173 
    467 msgid "Artist
     476msgid "Album
    468477msgstr "" 
    469478 
    470479#: ../src/playlist_control.py:174 
    471 msgid "Album
     480msgid "#
    472481msgstr "" 
    473482 
    474483#: ../src/playlist_control.py:175 
    475 msgid "#
     484msgid "Year
    476485msgstr "" 
    477486 
    478487#: ../src/playlist_control.py:176 
    479 msgid "Year" 
    480 msgstr "" 
    481  
    482 #: ../src/playlist_control.py:177 
    483488msgid "Time" 
    484489msgstr "" 
    485490 
    486 #: ../src/playlist_control.py:453 
     491#: ../src/playlist_control.py:454 
    487492#, python-format 
    488493msgid "Are you sure you want to delete playlist '%s'?" 
    489494msgstr "" 
    490495 
    491 #: ../src/playlist_control.py:455 
     496#: ../src/playlist_control.py:456 
    492497msgid "All playlist data will be lost." 
    493498msgstr "" 
    494499 
    495 #: ../src/playlist_control.py:633 
     500#: ../src/playlist_control.py:634 
    496501msgid "tracks" 
    497502msgstr "" 
    498503 
    499 #: ../src/playlist_control.py:983 
     504#: ../src/playlist_control.py:986 
    500505#, python-format 
    501506msgid "" 
     
    505510msgstr "" 
    506511 
    507 #: ../src/playlist_control.py:991 
     512#: ../src/playlist_control.py:994 
    508513#, python-format 
    509514msgid "" 
     
    513518msgstr "" 
    514519 
    515 #: ../src/playlist_control.py:1046 
     520#: ../src/playlist_control.py:1049 
    516521msgid "Add Music" 
    517522msgstr "" 
    518523 
    519 #: ../src/playlist_control.py:1063 
     524#: ../src/playlist_control.py:1066 
    520525msgid "All" 
    521526msgstr "" 
    522527 
    523 #: ../src/playlist_control.py:1065 
     528#: ../src/playlist_control.py:1068 
    524529msgid "Audio" 
    525530msgstr "" 
    526531 
    527 #: ../src/playlist_control.py:1066 
     532#: ../src/playlist_control.py:1069 
    528533msgid "Playlists" 
    529534msgstr "" 
     
    532537#. the checkbox is toggles and files when not since this is not 
    533538#. possible by default 
    534 #: ../src/playlist_control.py:1071 
     539#: ../src/playlist_control.py:1074 
    535540msgid "Make the _dialog be able/unable to select directories" 
    536541msgstr "" 
    537542 
    538 #: ../src/playlist_control.py:1194 
     543#: ../src/playlist_control.py:1197 
    539544#, python-format 
    540545msgid "'%s' string not found" 
  • trunk/src/album_cover_control.py

    r384 r391  
    2222 
    2323import mesk 
    24 import mesk.gtk_utils, control 
     24import mesk.gtk_utils, mesk.uri 
    2525_ = mesk.common.i18n._ 
    2626 
     
    102102 
    103103        src = new[1] 
    104         src_dir = os.path.dirname(src.uri.path
     104        src_dir = os.path.dirname(mesk.uri.unescape(src.uri.path)
    105105 
    106106        # Compute SHA digest for source metadata 
  • trunk/src/audio_control.py

    r384 r391  
    410410    def _set_source(self, src): 
    411411        self._set_track_scale(0.0) 
    412         self._gst_bin.set_property('uri', src.uri.to_string()) 
     412        self._gst_bin.set_property('uri', str(src.uri)) 
    413413        self._current_audio_src = src 
    414414 
  • trunk/src/config.py

    r385 r391  
    2121 
    2222import mesk 
     23import mesk.uri 
    2324_ = mesk.common.i18n._ 
    24 from mesk.common.uri import Uri 
    2525 
    2626def get_playlist_uri(pl_name): 
    2727    pl_dir = mesk.config.get(mesk.CONFIG_MAIN, 'playlist_dir') 
    28     uri = Uri('file://%s/%s.m3u' % (pl_dir, pl_name)) 
     28    uri = mesk.uri.make_uri('file://%s/%s.m3u' % \ 
     29            (mesk.uri.escape_path(pl_dir), mesk.uri.escape_path(pl_name))) 
    2930    return uri 
    3031 
     
    5960        if self._section and mesk.config.has_section(self._section): 
    6061            # Initialize from config 
    61             self.uri = Uri(mesk.config.get(self._section, 'uri')) 
     62            self.uri = mesk.uri.make_uri(mesk.config.get(self._section, 'uri')) 
    6263            self.current = mesk.config.getint(self._section, 'current') 
    6364            self.repeat = mesk.config.getboolean(self._section, 'repeat') 
     
    7475            mesk.config.add_section(self._section) 
    7576            pl_dir = mesk.config.get(mesk.CONFIG_MAIN, 'playlist_dir') 
    76             self.uri = Uri('file://%s/%s.m3u' % (pl_dir, self.name)) 
     77            self.uri = mesk.uri.make_uri('file://%s/%s.m3u' % \ 
     78                                         (mesk.uri.escape_path(pl_dir), 
     79                                          mesk.uri.escape_path(self.name))) 
    7780            self.update(None) 
    7881 
    7982    def update(self, playlist): 
    8083        '''Update the config with latest playlist state''' 
    81         mesk.config.set(self._section, 'uri', 
    82                         self.uri.to_string(quoted = False)) 
     84        mesk.config.set(self._section, 'uri', str(self.uri)) 
    8385 
    8486        if playlist: 
  • trunk/src/mesk/__init__.py

    r384 r391  
    135135import mesk.log 
    136136import mesk.playlist 
    137 import mesk.utils 
    138137# FIXME 
     138#import mesk.utils 
    139139#import mesk.audio 
  • trunk/src/mesk/audio/__init__.py

    r358 r391  
    2323 
    2424import mesk 
    25 import mesk.utils 
     25import mesk.utils, mesk.uri 
    2626# At least versions 
    2727REQUIRE_GST_VERSION = (0, 10, 8) 
     
    7878    '''Thrown when a audio format is not supported''' 
    7979 
    80 from mesk.common.uri import Uri 
    8180def load(uri): 
    8281    '''Given a URI, attempt to load an AudioSource.  If this cannot be done, 
    8382    a UnsupportedFormat exception, or other related error is thrown.''' 
    84     if not isinstance(uri, Uri): 
    85         uri = Uri(uri) 
     83    if not mesk.uri.is_uri(uri): 
     84        uri = mesk.uri.make_uri(uri) 
    8685 
    87     mt = mimetypes.guess_type(uri.to_string())[0] 
     86    mt = mimetypes.guess_type(str(uri))[0] 
     87    mt = mimetypes.guess_type(str(uri))[0] 
    8888    if not mt or not supported_mimetypes.has_key(mt): 
    8989        raise UnsupportedFormat(_('Unsupported audio format: %s') % \ 
  • trunk/src/mesk/audio/mp3.py

    r365 r391  
    2020import sys 
    2121import gst 
     22 
    2223import mesk 
    23 import mesk.utils 
     24import mesk.utils, mesk.uri 
    2425_ = mesk.common.i18n._ 
    2526 
     
    6465        # Use URI if we don't have a title 
    6566        if not self.meta_data.title: 
    66             self.meta_data.title = unicode(self.uri.to_string()) 
     67            self.meta_data.title = unicode(str(self.uri)) 
    6768 
    6869    def get_native_tag(self): 
     
    7172            return None 
    7273 
     74        uri_path = mesk.uri.unescape(self.uri.path) 
    7375        try: 
    7476            tag = eyeD3.Tag() 
    75             if tag.link(self.uri.path): 
     77            if tag.link(uri_path): 
    7678                return tag 
    7779        except TagException, ex: 
     80            mesk.log.warning(_('Error loading ID3 tag for \'%s\': %s') % \ 
     81                             (uri_path, str(ex))) 
    7882            return None 
    7983 
     
    9498 
    9599from eyeD3 import TagException, InvalidAudioFormatException 
    96 from mesk.common.uri import Uri 
    97100class Mp3MetaData(AudioMetaData): 
    98101 
     
    102105        if not uri or uri.scheme != 'file': 
    103106            return 
     107        uri_path = mesk.uri.unescape(uri.path) 
    104108 
    105109        audio_file = None 
    106110        try: 
    107             audio_file = eyeD3.Mp3AudioFile(uri.path) 
     111            audio_file = eyeD3.Mp3AudioFile(uri_path) 
    108112        except (TagException, InvalidAudioFormatException), ex: 
    109113            mesk.log.warning(_('Error reading mp3 source for \'%s\': %s') % \ 
    110                              (uri.path, str(ex))) 
     114                             (uri_path, str(ex))) 
    111115        else: 
    112116            self.time_secs = audio_file.getPlayTime() 
     
    121125                self.has_images = len(tag.getImages()) > 0 
    122126                self.frozen = True 
     127 
     128# The factory class for mp3 files 
    123129factory = Mp3AudioSource 
    124130 
  • trunk/src/mesk/audio/oggvorbis.py

    r372 r391  
    2020import os, stat 
    2121import ogg.vorbis, gst 
     22 
    2223import mesk 
     24import mesk.uri 
    2325_ = mesk.common.i18n._ 
    2426 
     
    4547        # Use URI if we don't have a title 
    4648        if not self.meta_data.title: 
    47             self.meta_data.title = unicode(self.uri.to_string()) 
     49            self.meta_data.title = unicode(str(self.uri)) 
    4850 
    4951    def get_native_tag(self): 
     
    6567            return 
    6668 
     69        uri_path = mesk.uri.unescape(uri.path) 
    6770        audio_file = None 
    6871        try: 
    69             audio_file = VorbisFile(uri.path) 
     72            audio_file = VorbisFile(uri_path) 
    7073        except (VorbisError), ex: 
    7174            mesk.log.warning(_('Error reading ogg/vorbis source for \'%s\': ' 
    72                                '%s') % (uri.path, str(ex))) 
     75                               '%s') % (uri_path, str(ex))) 
    7376        else: 
    7477            self.time_secs = int(audio_file.time_total(0)) 
    75             self.size_bytes = self.fileSize = os.stat(uri.path)[stat.ST_SIZE] 
     78            self.size_bytes = self.fileSize = os.stat(uri_path)[stat.ST_SIZE] 
     79 
    7680            tag = audio_file.comment() 
    7781            if tag: 
     
    9296                                self.track_total = int(values[1]) 
    9397                self.frozen = True 
     98 
     99# Factory class for Ogg Vorbis files 
    94100factory = OggAudioSource 
  • trunk/src/mesk/audio/source.py

    r362 r391  
    2121 
    2222import mesk 
    23 from mesk.common.uri import Uri 
     23import mesk.uri 
    2424from mesk.common.i18n import _ 
    2525 
     
    4545class AudioSource: 
    4646    def __init__(self, uri): 
    47         if not isinstance(uri, Uri): 
    48             self.uri = Uri(uri) 
    49         else: 
    50             self.uri = uri 
     47        self.uri = mesk.uri.make_uri(uri) 
    5148        self.meta_data = AudioMetaData() 
    5249 
  • trunk/src/mesk/playlist.py

    r356 r391  
    2424import utils 
    2525import log 
    26 import common.uri 
    2726 
    2827# Mapping from mime types to factory classes for supported formats 
     
    105104            fp.write(src.uri.path) 
    106105        else: 
    107             fp.write(src.uri.to_string()) 
     106            fp.write(str(src.uri)) 
    108107        fp.write('\n') 
    109108    fp.close() 
  • trunk/src/mesk/utils.py

    r358 r391  
    2525_ = common.i18n._ 
    2626 
     27# Time and memory string formatting 
    2728def format_track_time(curr, total = None): 
    2829    def time_tuple(ts): 
  • trunk/src/playlist_control.py

    r384 r391  
    2424import pango 
    2525 
    26 import mesk 
     26import mesk, mesk.utils, mesk.gtk_utils, mesk.uri 
    2727_ = mesk.common.i18n._ 
    28 import mesk.gtk_utils 
    2928 
    3029import config, control 
     
    178177 
    179178        # Load playlist 
    180         pl = mesk.playlist.load(self._pl_config.uri.path
     179        pl = mesk.playlist.load(mesk.uri.unescape(self._pl_config.uri.path)
    181180        pl.set_shuffle(self._pl_config.shuffle) 
    182181        pl.set_repeat(self._pl_config.repeat) 
     
    208207    def _save_playlist(self): 
    209208        self._pl_config.update(self._playlist) 
    210         mesk.playlist.save_m3u(self._pl_config.uri.path, self._playlist) 
     209        mesk.playlist.save_m3u(mesk.uri.unescape(self._pl_config.uri.path), 
     210                               self._playlist) 
    211211        self._debug_show_playlist() 
    212212 
     
    247247    def _new_model_row(self, src): 
    248248        model_data = self._get_model_metadata(src) 
    249         return [MODEL_STATE_ACTIVE, None, None, src.uri.to_string(), 
     249        return [MODEL_STATE_ACTIVE, None, None, 
     250                str(src.uri), 
    250251                model_data[MODEL_NUM], 
    251252                model_data[MODEL_TITLE], 
     
    461462         
    462463        # Delete 
    463         os.remove(self._pl_config.uri.path
     464        os.remove(mesk.uri.unescape(self._pl_config.uri.path)
    464465        self._pl_config.delete() 
    465466        self.emit('control_request_close') 
     
    532533                                  buttons = gtk.BUTTONS_OK) 
    533534            d.set_markup('<b>%s</b>' % err_msg) 
    534             d.format_secondary_text(audio_src.uri.path
     535            d.format_secondary_text(mesk.uri.unescape(audio_src.uri.path)
    535536            d.connect('response', self._on_dialog_close) 
    536537            d.show() 
     
    919920            msg = 'Modified Playlist:\n' 
    920921            for src in self._playlist: 
    921                 msg += src.uri.to_string(quoted = False) + '\n' 
     922                msg += str(src.uri) + '\n' 
    922923            mesk.log.debug(msg) 
    923924 
     
    925926        orig_size = self._playlist.get_length() 
    926927        count = 0 
     928 
    927929        for uri in uris: 
    928             if not isinstance(uri, mesk.common.uri.Uri): 
    929                 uri = mesk.common.uri.Uri(uri) 
    930  
     930            if not mesk.uri.is_uri(uri): 
     931                uri = mesk.uri.make_uri(uri) 
     932 
     933            uri_path = mesk.uri.unescape(uri.path) 
    931934            try: 
    932935                # Handle files/directories 
    933                 if uri.scheme == 'file' and os.path.isdir(uri.path): 
     936                if uri.scheme == 'file' and os.path.isdir(uri_path): 
    934937                    # Recurse into a directory 
    935                     for (root, dirs, files) in os.walk(uri.path): 
     938                    for (root, dirs, files) in os.walk(uri_path): 
    936939                        # Add files in this directory 
    937940                        dir_files = [] 
     
    951954                        break 
    952955                else: 
    953                     # Handle a file 
     956                    # Handle local and remote URIs 
    954957                    srcs = [] 
    955                     fname = os.path.basename(uri.path) 
     958                    fname = os.path.basename(uri_path) 
    956959                    ext = os.path.splitext(fname)[1] 
    957960                    try: 
    958961                        if ext == '.m3u': 
     962                            # FIXME: This may be remote, fetching would be nice 
     963 
    959964                            # Playlists 
    960965                            pl = mesk.playlist.Playlist() 
    961                             pl = mesk.playlist.load(uri.path) 
     966                            pl = mesk.playlist.load(uri_path) 
    962967                            for src in pl: 
    963968                                srcs.append(src) 
    964969                            del pl 
    965970                        else: 
    966                             # Presumably, an audio file 
    967971                            src = mesk.audio.load(uri) 
    968972                            srcs.append(src) 
    969973                    except UnsupportedFormat, ex: 
    970                         mesk.log.info('%s - Skipping %s' % \ 
    971                                       (str(ex), uri.path)) 
     974                        mesk.log.info('%s - Skipping %s' % (str(ex), uri.path)) 
    972975                        continue 
    973976 
     
    12221225    ### Clipboard and cuty/copy/paste functions ### 
    12231226    def _clipboard_set_cb(self, clipboard, selection, info, op_info): 
    1224         # Convert Uri objects to strings 
     1227        # Convert URI objects to strings 
    12251228        uris = [] 
    12261229        for uri in op_info.uris: 
    1227             uris.append(uri.to_string()) 
     1230            uris.append(str(uri)) 
    12281231 
    12291232        selection.set_uris(uris)