#NEWLINE# def get_local_track( self , artist = None , title = None , album = None , length = None ) : #NEWLINE# #INDENT# '\n        Get :class:`Track` for a local track.\n\n        Spotify\'s official clients supports adding your local music files to\n        Spotify so they can be played in the Spotify client. These are not\n        synced with Spotify\'s servers or between your devices and there is not\n        trace of them in your Spotify user account. The exception is when you\n        add one of these local tracks to a playlist or mark them as starred.\n        This creates a "local track" which pyspotify also will be able to\n        observe.\n\n        "Local tracks" can be recognized in several ways:\n\n        - The track\'s URI will be of the form\n          ``spotify:local:ARTIST:ALBUM:TITLE:LENGTH_IN_SECONDS``. Any of the\n          parts in all caps can be left out if there is no information\n          available. That is, ``spotify:local::::`` is a valid local track URI.\n\n        - :attr:`Link.type` will be :class:`LinkType.LOCALTRACK` for the\n          track\'s link.\n\n        - :attr:`Track.is_local` will be :class:`True` for the track.\n\n        This method can be used to create local tracks that can be starred or\n        added to playlists.\n\n        ``artist`` may be an artist name. ``title`` may be a track name.\n        ``album`` may be an album name. ``length`` may be a track length in\n        milliseconds.\n\n        Note that when creating a local track you provide the length in\n        milliseconds, while the local track URI contains the length in seconds.\n        ' #NEWLINE# if ( artist is None ) : #NEWLINE# #INDENT# artist = '' #NEWLINE# #UNINDENT# if ( title is None ) : #NEWLINE# #INDENT# title = '' #NEWLINE# #UNINDENT# if ( album is None ) : #NEWLINE# #INDENT# album = '' #NEWLINE# #UNINDENT# if ( length is None ) : #NEWLINE# #INDENT# length = ( - 1 ) #NEWLINE# #UNINDENT# artist = utils . to_char ( artist ) #NEWLINE# title = utils . to_char ( title ) #NEWLINE# album = utils . to_char ( album ) #NEWLINE# sp_track = lib . sp_localtrack_create ( artist , title , album , length ) #NEWLINE# return spotify . Track ( self , sp_track = sp_track , add_ref = False )