[PR #875] [MERGED] Refactor main.rs #1125

Closed
opened 2026-02-27 20:01:15 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/librespot-org/librespot/pull/875
Author: @JasonLG1979
Created: 10/30/2021
Status: Merged
Merged: 11/17/2021
Merged by: @roderickvd

Base: devHead: refactor-main


📝 Commits (1)

📊 Changes

6 files changed (+935 additions, -298 deletions)

View changed files

📝 CHANGELOG.md (+13 -0)
📝 core/src/config.rs (+12 -0)
📝 playback/src/audio_backend/mod.rs (+1 -6)
📝 playback/src/config.rs (+2 -2)
📝 playback/src/mixer/mod.rs (+13 -5)
📝 src/main.rs (+894 -285)

📄 Description

  • Don't panic when parsing options. Instead list valid values and exit.
  • Get rid of needless .expect in playback/src/audio_backend/mod.rs.
  • Enforce reasonable ranges for option values (breaking).
  • Don't evaluate options that would otherwise have no effect.
  • Add pub const MIXERS to mixer/mod.rs very similar to the audio_backend's implementation. (non-breaking though)
  • Use different option descriptions and error messages based on what backends are enabled at build time.
  • Add a -q, --quiet option that changed the logging level to warn.
  • Add a short name for every flag and option.
  • Note removed options.
  • Other misc cleanups.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/librespot-org/librespot/pull/875 **Author:** [@JasonLG1979](https://github.com/JasonLG1979) **Created:** 10/30/2021 **Status:** ✅ Merged **Merged:** 11/17/2021 **Merged by:** [@roderickvd](https://github.com/roderickvd) **Base:** `dev` ← **Head:** `refactor-main` --- ### 📝 Commits (1) - [`0e9fdbe`](https://github.com/librespot-org/librespot/commit/0e9fdbe6b443c9d55dd9b9148ffc62a8e6d20c5b) Refactor main.rs ### 📊 Changes **6 files changed** (+935 additions, -298 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+13 -0) 📝 `core/src/config.rs` (+12 -0) 📝 `playback/src/audio_backend/mod.rs` (+1 -6) 📝 `playback/src/config.rs` (+2 -2) 📝 `playback/src/mixer/mod.rs` (+13 -5) 📝 `src/main.rs` (+894 -285) </details> ### 📄 Description * Don't panic when parsing options. Instead list valid values and exit. * Get rid of needless .expect in playback/src/audio_backend/mod.rs. * Enforce reasonable ranges for option values (breaking). * Don't evaluate options that would otherwise have no effect. * Add pub const MIXERS to mixer/mod.rs very similar to the audio_backend's implementation. (non-breaking though) * Use different option descriptions and error messages based on what backends are enabled at build time. * Add a -q, --quiet option that changed the logging level to warn. * Add a short name for every flag and option. * Note removed options. * Other misc cleanups. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 20:01:15 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot#1125
No description provided.