mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-27 08:15:50 +03:00
[GH-ISSUE #1320] Updating docs for struct fields #603
Labels
No labels
A-Alsa
SpotifyAPI
Tokio 1.0
audio
bug
can't reproduce
compilation
dependencies
duplicate
enhancement
good first issue
help wanted
high priority
imported
imported
invalid
new api
pull-request
question
reverse engineering
wiki
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/librespot#603
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @x528491x on GitHub (Aug 31, 2024).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/1320
These are the actual fields returned by spotify but the docs list way fewer fields.
Track
Track { id: SpotifyId("spotify:track:5Sg09MvHqNWPWsYeuY2toY"), name: "Blinding Lights", album: Album { id: SpotifyId("spotify:album:6YlDIxqEjvY63ffH6AwCjd"), name: "After Hours (Deluxe)", artists: Artists([Artist { id: SpotifyId("spotify🧑🎨1Xyo4u8uXC1ZmMpatF05PJ"), name: "The Weeknd", popularity: 0, top_tracks: CountryTopTracks([]), albums: AlbumGroups([]), singles: AlbumGroups([]), compilations: AlbumGroups([]), appears_on_albums: AlbumGroups([]), genre: [], external_ids: ExternalIds([]), portraits: Images([]), biographies: Biographies([]), activity_periods: ActivityPeriods([]), restrictions: Restrictions([]), related: Artists([]), is_portrait_album_cover: false, portrait_group: Images([]), sales_periods: SalePeriods([]), availabilities: Availabilities([]) }]), album_type: ALBUM, label: "Republic Records", date: Date(2020-04-03 0:00:00.0 +00:00:00), popularity: 0, genres: [], covers: Images([Image { id: FileId(Ok("ab67616d00001e0280880b62143e819e901d8465")), size: DEFAULT, width: 300, height: 300 }, Image { id: FileId(Ok("ab67616d0000485180880b62143e819e901d8465")), size: SMALL, width: 64, height: 64 }, Image { id: FileId(Ok("ab67616d0000b27380880b62143e819e901d8465")), size: LARGE, width: 640, height: 640 }]), external_ids: ExternalIds([]), discs: Discs([]), reviews: [], copyrights: Copyrights([]), restrictions: Restrictions([]), related: Albums([]), sale_periods: SalePeriods([]), cover_group: Images([Image { id: FileId(Ok("ab67616d00001e0280880b62143e819e901d8465")), size: DEFAULT, width: 300, height: 300 }, Image { id: FileId(Ok("ab67616d0000485180880b62143e819e901d8465")), size: SMALL, width: 64, height: 64 }, Image { id: FileId(Ok("ab67616d0000b27380880b62143e819e901d8465")), size: LARGE, width: 640, height: 640 }]), original_title: "", version_title: "", type_str: "", availability: Availabilities([]) }, artists: Artists([Artist { id: SpotifyId("spotify🧑🎨1Xyo4u8uXC1ZmMpatF05PJ"), name: "The Weeknd", popularity: 0, top_tracks: CountryTopTracks([]), albums: AlbumGroups([]), singles: AlbumGroups([]), compilations: AlbumGroups([]), appears_on_albums: AlbumGroups([]), genre: [], external_ids: ExternalIds([]), portraits: Images([]), biographies: Biographies([]), activity_periods: ActivityPeriods([]), restrictions: Restrictions([]), related: Artists([]), is_portrait_album_cover: false, portrait_group: Images([]), sales_periods: SalePeriods([]), availabilities: Availabilities([]) }]), number: 9, disc_number: 1, duration: 200045, popularity: 46, is_explicit: false, external_ids: ExternalIds([ExternalId { external_type: "isrc", id: "USUG11904206" }]), restrictions: Restrictions([]), files: AudioFiles({OGG_VORBIS_160: FileId(Ok("9439a52027a072e86af7cf35cd79d40e303fad57")), OGG_VORBIS_320: FileId(Ok("4d3054dfdf575152b70be0b47176ed9e7d4be8b0")), AAC_24: FileId(Ok("2f1b6e39b771a2772e1ad98ff47b93ba50f70441")), OGG_VORBIS_96: FileId(Ok("5dd5bbc228392112fd4e8d5e2830fc9b5fdea4a5"))}), alternatives: Tracks([]), sale_periods: SalePeriods([]), previews: AudioFiles({MP3_96: FileId(Ok("4282069f4014a345b945c0fde1c1bb36b944670d"))}), tags: [], earliest_live_timestamp: Date(1970-01-19 8:31:26.4 +00:00:00), has_lyrics: true, availability: Availabilities([]), licensor: fe358ea9-87e2-424d-9021-c2665a0667b7, language_of_performance: ["en"], content_ratings: ContentRatings([]), original_title: "Blinding Lights", version_title: "", artists_with_role: ArtistsWithRole([ArtistWithRole { id: SpotifyId("spotify🧑🎨1Xyo4u8uXC1ZmMpatF05PJ"), name: "The Weeknd", role: ARTIST_ROLE_MAIN_ARTIST }]) }Album
Album { id: SpotifyId("spotify:album:6YlDIxqEjvY63ffH6AwCjd"), name: "After Hours (Deluxe)", artists: Artists([Artist { id: SpotifyId("spotify🧑🎨1Xyo4u8uXC1ZmMpatF05PJ"), name: "The Weeknd", popularity: 0, top_tracks: CountryTopTracks([]), albums: AlbumGroups([]), singles: AlbumGroups([]), compilations: AlbumGroups([]), appears_on_albums: AlbumGroups([]), genre: [], external_ids: ExternalIds([]), portraits: Images([]), biographies: Biographies([]), activity_periods: ActivityPeriods([]), restrictions: Restrictions([]), related: Artists([]), is_portrait_album_cover: false, portrait_group: Images([]), sales_periods: SalePeriods([]), availabilities: Availabilities([]) }]), album_type: ALBUM, label: "Republic Records", date: Date(2020-04-03 0:00:00.0 +00:00:00), popularity: 57, genres: [], covers: Images([Image { id: FileId(Ok("ab67616d00001e0280880b62143e819e901d8465")), size: DEFAULT, width: 300, height: 300 }, Image { id: FileId(Ok("ab67616d0000485180880b62143e819e901d8465")), size: SMALL, width: 64, height: 64 }, Image { id: FileId(Ok("ab67616d0000b27380880b62143e819e901d8465")), size: LARGE, width: 640, height: 640 }]), external_ids: ExternalIds([ExternalId { external_type: "upc", id: "00602508987236" }]), discs: Discs([Disc { number: 1, name: "", tracks: Tracks([SpotifyId("spotify:track:3KQ1KVG2F8qAospksegrmZ"), SpotifyId("spotify:track:0zzc5kYkzTmWmwrn3CTk5v"), SpotifyId("spotify:track:6t5zloC7h0EQllwYph9brV"), SpotifyId("spotify:track:10HsXXmKdge6ugPcTolceY"), SpotifyId("spotify:track:1hzVfz7XfL6rnRAk3LGgC2"), SpotifyId("spotify:track:5aFoXADqE288FAlbXYmcy6"), SpotifyId("spotify:track:28dQlavHTyrEkmI7w7Nivp"), SpotifyId("spotify:track:2QIbiBkgr2pepvCkmWi3Vn"), SpotifyId("spotify:track:5Sg09MvHqNWPWsYeuY2toY"), SpotifyId("spotify:track:3XnkZylcAZ86QAiGVnRVy8"), SpotifyId("spotify:track:2ExKb6Ag2WXob6FpkSeXhE"), SpotifyId("spotify:track:22mFHi2NBoZbj9oOoMJgcG"), SpotifyId("spotify:track:31bmr5SE0qrrIPhjGbnwKP"), SpotifyId("spotify:track:6D3XrPrsF6IUzWiEILNLkq"), SpotifyId("spotify:track:5ciyqWW5YuGqF4Avu7uwry"), SpotifyId("spotify:track:38uNCW1do0LKfMIt4MDkPo"), SpotifyId("spotify:track:6rhbL6MhAej39S8KupwjrC")]) }]), reviews: [], copyrights: Copyrights([Copyright { copyright_type: C, text: "© 2020 The Weeknd XO, Inc., marketed by Republic Records, a division of UMG Recordings, Inc." }, Copyright { copyright_type: P, text: "℗ 2020 The Weeknd XO, Inc., marketed by Republic Records, a division of UMG Recordings, Inc." }]), restrictions: Restrictions([]), related: Albums([]), sale_periods: SalePeriods([]), cover_group: Images([Image { id: FileId(Ok("ab67616d00001e0280880b62143e819e901d8465")), size: DEFAULT, width: 300, height: 300 }, Image { id: FileId(Ok("ab67616d0000485180880b62143e819e901d8465")), size: SMALL, width: 64, height: 64 }, Image { id: FileId(Ok("ab67616d0000b27380880b62143e819e901d8465")), size: LARGE, width: 640, height: 640 }]), original_title: "After Hours", version_title: "Deluxe", type_str: "", availability: Availabilities([]) }@kingosticks commented on GitHub (Sep 7, 2024):
Just to be clear, you're talking about the auto-generated docs which are created for the librespot library structures, right? And there's a mismatch between what's available in the protobuf and what we have decided is worth exposing (so far). In the interests of usability we might rename fields or combine them or omit them entirely so there will always be an intentional discrepancy. I think the idea is, if you find a field you want access to, you add support for it, and then the docs get generated. The docs are for users of librespot. If you're working on your own fork: read the protobuf (or extract new ones or whatever reverse engineering is required).