Get the current "artist - title" and return it.
180738
def spotify(self):
        
        (text, color) = self._get_text()
        response = {
            "cached_until": self.py3.time_in(self.cache_timeout),
            "color": color,
            "full_text": text,
        }
        return response
1253118
private String getExtraArtistName() {
        Bundle extras = getIntent().getExtras();
        if (extras == null || !extras.containsKey(BUNDLE_KEY_ARTIST_NAME)) {
            return ""; // activity started through the notification pending intent
        }
        return extras.getString(BUNDLE_KEY_ARTIST_NAME);
    }
826083
def get_artist_songs(self, id_, sort='title', per_page=20, page=1):
        """"""
        endpoint = "artists/{id}/songs".format(id=id_)
        params = {'sort': sort, 'per_page': per_page, 'page': page}
        return self._make_request(endpoint, params_=params)
606497
def title(self, txt=None):
        '''
        if txt:
            System.Console.Title = txt
        else:
            return System.Console.Title
192713
def getTracksForArtistInCollection(artist,user=nil,extras=nil)
      method = 'getTracksForArtistInCollection'
      type = Track
      args = {:artist=>artist}
      args[:user] = user if user
      args[:extras] = extras if extras
      return_object type,method,args
    end
1065200
def item(self, current_item):
        
        return {
            'value': text(getattr(current_item, self.get_field_name())),
            'label': self.label(current_item)
        }
153423
def get_title_voice(self, item):
        
        view = True
        if item.get('perms', None):
            view = self.check_user_permission(item.get('perms', []))
        elif item.get('apps', None):
            view = self.check_apps_permission(item.get('apps', []))
        if view:
            return {
                'type': 'title',
                'label': item.get('label', ''),
                'icon': item.get('icon', None)
            }
        return None
1149601
def extract_listing(pid):
    """"""
    print("Extracting tracklisting...")
    listing_etree = open_listing_page(pid + '/segments.inc')
    track_divs = listing_etree.xpath('//div[@class="segment__track"]')

    listing = []
    for track_div in track_divs:
        try:
            artist_names = track_div.xpath('.//span[@property="byArtist"]'
                                           '//span[@class="artist"]/text()')
        except ValueError:
            artist_names = ['']

        if not artist_names:
            artist_names = ['']

        if len(artist_names) > 1:
            artists = ', '.join(artist_names[:-1]) + ' & ' + artist_names[-1]
        else:
            artists = artist_names[0]

        try:
            title, = track_div.xpath('.//p/span[@property="name"]/text()')
        except ValueError:
            title = ''

        try:
            label, = track_div.xpath('.//abbr[@title="Record Label"]'
                                     '/span[@property="name"]/text()')
        except ValueError:
            label = ''
        listing.append((artists, title, label))
    return listing
856819
def _get_text(self):
        
        bus = dbus.SessionBus()
        try:
            self.__bus = bus.get_object(
                "org.mpris.MediaPlayer2.spotify", "/org/mpris/MediaPlayer2"
            )
            self.player = dbus.Interface(self.__bus, "org.freedesktop.DBus.Properties")

            try:
                metadata = self.player.Get("org.mpris.MediaPlayer2.Player", "Metadata")
                album = metadata.get("xesam:album")
                artist = metadata.get("xesam:artist")[0]
                microtime = metadata.get("mpris:length")
                rtime = str(timedelta(microseconds=microtime))[:-7]
                title = metadata.get("xesam:title")
                if self.sanitize_titles:
                    album = self._sanitize_title(album)
                    title = self._sanitize_title(title)

                playback_status = self.player.Get(
                    "org.mpris.MediaPlayer2.Player", "PlaybackStatus"
                )
                if playback_status.strip() == "Playing":
                    color = self.py3.COLOR_PLAYING or self.py3.COLOR_GOOD
                else:
                    color = self.py3.COLOR_PAUSED or self.py3.COLOR_DEGRADED
            except Exception:
                return (
                    self.format_stopped,
                    self.py3.COLOR_PAUSED or self.py3.COLOR_DEGRADED,
                )

            return (
                self.py3.safe_format(
                    self.format,
                    dict(title=title, artist=artist, album=album, time=rtime),
                ),
                color,
            )
        except Exception:
            return (self.format_down, self.py3.COLOR_OFFLINE or self.py3.COLOR_BAD)
454447
def getSearchUrl(self, album, artist):
    
    # build request url
    params = collections.OrderedDict()
    params["method"] = "album.getinfo"
    params["api_key"] = __class__.API_KEY
    params["album"] = album
    params["artist"] = artist

    return __class__.assembleUrl(__class__.BASE_URL, params)
755101
def getClientTitle(self):
        
        request = self.getRequest()
        if request:
            client = request.getClient()
            if client:
                return client.Title()
99651
def get_artist(self, object_id, relation=None, **kwargs):
        
        return self.get_object("artist", object_id, relation=relation, **kwargs)
1177231
def full_title(self):
        """"""
        cancelled_str = " (Cancelled)" if self.cancelled else ""
        act_name = self.activity.name + cancelled_str
        if self.special and not self.activity.special:
            act_name = "Special: " + act_name
        return act_name if not self.title else "{} - {}".format(act_name, self.title)
813358
public String getTitle()    // Standard file maint for this record (returns new record)
    {
        String windowName = "Maintenance"; // Default
        Record query = this.getMainRecord();
        if (query != null)
            windowName = query.getRecordName() + ' ' + windowName;  // xxx Maintenance.
        return windowName;
    }
841564
def get_art(cache_dir, size, client):
    """"""
    song = client.currentsong()

    if len(song) < 2:
        print("album: Nothing currently playing.")
        return

    file_name = f"{song['artist']}_{song['album']}_{size}.jpg".replace("/", "")
    file_name = cache_dir / file_name

    if file_name.is_file():
        shutil.copy(file_name, cache_dir / "current.jpg")
        print("album: Found cached art.")

    else:
        print("album: Downloading album art...")

        brainz.init()
        album_art = brainz.get_cover(song, size)

        if album_art:
            util.bytes_to_file(album_art, cache_dir / file_name)
            util.bytes_to_file(album_art, cache_dir / "current.jpg")

            print(f"album: Swapped art to {song['artist']}, {song['album']}.")
759322
def get_og_title(self):
        
        if hasattr(self, 'meta_title') and self.meta_title:
            return self.meta_title
        return self.get_title()
796572
def lookup_track(self, track):
        
        tracks = Track.objects.filter(title__iexact=track.title)
        for track_obj in tracks:
            for contributor in track_obj.get_primary_contributors(permitted=False):
                if contributor.title == track.artist:
                    return track_obj
        return None