Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update protobuf files #1424

Merged
merged 7 commits into from
Dec 24, 2024
Merged

Conversation

photovoltex
Copy link
Member

@photovoltex photovoltex commented Dec 16, 2024

I'm currently trying to implement the ucs endpoint and for it a property_set_id is required. From what I discovered, the id changes in relation to the version used by the official client.

I could have searched the web for the old desktop version we use currently, or update the protobuf files. Because the last update happened three years ago I thought it would be a better move to update the files^^;

Sadly it is yet another big PR. I wanted to reduce my PR size, but with a backlog worth of three years of changes it couldn't be avoided.

Anyhow, I want to point to player.rs because I'm not sure if these changes are anywhere correct.

Additionally I added a file (conversion.rs) where I implemented From for some protobuf types because with these new files there where multiple types of the same type.

The complete protobuf dump: 1.2.52.442.g01893f92.zip

I used https://github.com/arkadiyt/protodump which doesn't output the same format we had, so I had to format a lot of it myself.

just here if anyone searches a tool and is as lost as I were at the beginning... anyhow protodump wants a file, on windows you just provided the executable of spotify

Copy link
Member

@roderickvd roderickvd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of breakfast comments.

I see you also updated the version strings to keep in sync with the protobufs; thanks!

connect/src/spirc.rs Outdated Show resolved Hide resolved
connect/src/state/context.rs Outdated Show resolved Hide resolved
connect/src/state/context.rs Show resolved Hide resolved
@photovoltex
Copy link
Member Author

photovoltex commented Dec 17, 2024

I see you also updated the version strings to keep in sync with the protobufs; thanks!

Well that is the main point of the PR (as pointed out in the PR description). The protobuf update is just a stone on the way that had to be done^^;

@roderickvd roderickvd requested a review from Copilot December 19, 2024 10:01

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 320 out of 335 changed files in this pull request and generated no comments.

Files not reviewed (15)
  • protocol/proto/apiv1.proto: Evaluated as low risk
  • playback/src/player.rs: Evaluated as low risk
  • protocol/proto/audio_files_extension.proto: Evaluated as low risk
  • CHANGELOG.md: Evaluated as low risk
  • protocol/build.rs: Evaluated as low risk
  • connect/src/model.rs: Evaluated as low risk
  • metadata/src/artist.rs: Evaluated as low risk
  • core/src/version.rs: Evaluated as low risk
  • metadata/src/album.rs: Evaluated as low risk
  • protocol/proto/audio_format.proto: Evaluated as low risk
  • connect/src/state/metadata.rs: Evaluated as low risk
  • core/src/spclient.rs: Evaluated as low risk
  • core/src/dealer/protocol/request.rs: Evaluated as low risk
  • connect/src/state.rs: Evaluated as low risk
  • connect/src/state/options.rs: Evaluated as low risk
Comments suppressed due to low confidence (3)

connect/src/state/context.rs:113

  • [nitpick] Ensure that the use of unwrap_or_default for context.uri is the intended behavior and won't cause unexpected issues if the Option is None.
let context_uri = context.uri.as_ref()?;

connect/src/state/context.rs:229

  • [nitpick] Ensure that the use of unwrap_or_default for context.url is the intended behavior and won't cause unexpected issues if the Option is None.
self.player_mut().context_url = context.url.take().unwrap_or_default();

connect/src/state/context.rs:233

  • [nitpick] Ensure that the use of unwrap_or_default for context.uri is the intended behavior and won't cause unexpected issues if the Option is None.
self.player_mut().context_uri = context.uri.take().unwrap_or_default();
@roderickvd
Copy link
Member

LGTM with the comments resolved.

@roderickvd
Copy link
Member

Go ahead and merge when you want to.

@photovoltex
Copy link
Member Author

Will do when I find the time to resolve the conflicts.

@photovoltex photovoltex merged commit 2a57426 into librespot-org:dev Dec 24, 2024
13 checks passed
@photovoltex photovoltex deleted the update-protobuf branch December 24, 2024 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants