Skip to content

LibrarySection.search documentation does not list artist #553

Description

@cburgard

The documentation of LibrarySection.search does not list artist as a possible field to search for (proof). This seems rather odd.
Is this an oversight in the documentation, and the field is actually supported, or is this an actual shortcoming of the API or its implementation?

Activity

  1. blacktwin commented on Aug 12, 2020

    @blacktwin
    Collaborator

    The amount of search/filter fields is too large and ever changing to have documentation be 1:1 to whats available. However there is a large hardcoded list for each section (MusicLibrary).. Pending PR #518 (comment) the hardcoded part will be changed to dynamically pull all available search/filter fields for the library being searched.

    Can you please provide a code snippet for what you're attempting to search for artists?

    print(plex.library.search(**{'artist.title': 'Flaming Lips'})) this returns Artist, Album, and Track object for this artist.

  2. cburgard commented on Aug 13, 2020

    @cburgard
    Author

    Ok, that was really helpful, thanks!
    However, I am confused by the fact that with artist.title, I seem to be searching for what is the albumartist ID3 tag, whereas I'd prefer to search for artist, which is typically more helpful if you have Mix albums. Any idea how to get your hands on that one?

  3. blacktwin commented on Aug 13, 2020

    @blacktwin
    Collaborator

    So you want to find any tracks that the artist is listed on?

    plex.library.section("Music").searchTracks(**{'artist.title':myFavoriteArtist})
  4. cburgard commented on Aug 13, 2020

    @cburgard
    Author

    I'm doing this

    plexmusic = plex.library.section("Music")
    plexmusic.searchTracks(**{"track.title":title,"artist.title":artist})
    

    and it's coming back empty-handed for an artist where I have only this one track in my entire library, and it's from a mix album - the "albumartist" is set to "Various Artists" in this case. Perhaps coincidentally, if I search for the artist directly using libtype="artist", I also don't find the artist. It seems like Plex is only really using the albumartist tag. However, if I put the artists name in the GUI, I do find the track, so it must be known to Plex somehow.

    Any suggestion?

  5. blacktwin commented on Aug 13, 2020

    @blacktwin
    Collaborator

    Look at that track's xml or the webui More Info or Edit. Where is the Artist's name that you're looking for? Plex doesn't have a Contributing Artists field and it's Artist field for a Track is one string not a list. Seems like you maybe limited by how Plex handles Music libraries and it's tracks.

  6. cburgard commented on Aug 13, 2020

    @cburgard
    Author

    I do see the artist name I'm looking for in the "Artist" field in the UI, it's just the search with plexapi that doesn't seem to actually look at that field.

  7. blacktwin commented on Aug 26, 2020

    @blacktwin
    Collaborator

    When searching via the WebUI can you Inspect the browser to see what the GET command is? Also provide the XML information related to this instance?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions