<s> from __future__ import unicode_literals <EOL> import spotify <EOL> from spotify import ffi , lib <EOL> __all__ = [ <EOL> '<STR_LIT>' , <EOL> ] <EOL> class Offline ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , session ) : <EOL> self . _session = session <EOL> @ property <EOL> def tracks_to_sync ( self ) : <EOL> """<STR_LIT>""" <EOL> return lib . sp_offline_tracks_to_sync ( self . _session . _sp_session ) <EOL> @ property <EOL> def num_playlists ( self ) : <EOL> """<STR_LIT>""" <EOL> return lib . sp_offline_num_playlists ( self . _session . _sp_session ) <EOL> @ property <EOL> def sync_status ( self ) : <EOL> """<STR_LIT>""" <EOL> sp_offline_sync_status = ffi . new ( '<STR_LIT>' ) <EOL> syncing = lib . sp_offline_sync_get_status ( <EOL> self . _session . _sp_session , sp_offline_sync_status ) <EOL> if syncing : <EOL> return spotify . OfflineSyncStatus ( sp_offline_sync_status ) <EOL> @ property <EOL> def time_left ( self ) : <EOL> """<STR_LIT>""" <EOL> return lib . sp_offline_time_left ( self . _session . _sp_session ) <EOL> class OfflineSyncStatus ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , sp_offline_sync_status ) : <EOL> self . _sp_offline_sync_status = sp_offline_sync_status <EOL> @ property <EOL> def queued_tracks ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . _sp_offline_sync_status . queued_tracks <EOL> @ property <EOL> def done_tracks ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . _sp_offline_sync_status . done_tracks <EOL> @ property <EOL> def copied_tracks ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . _sp_offline_sync_status . copied_tracks <EOL> @ property <EOL> def willnotcopy_tracks ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . _sp_offline_sync_status . willnotcopy_tracks <EOL> @ property <EOL> def error_tracks ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . _sp_offline_sync_status . error_tracks <EOL> @ property <EOL> def syncing ( self ) : <EOL> """<STR_LIT>""" <EOL> return bool ( self . _sp_offline_sync_status . syncing ) </s>
