diff src/beefweb.rs @ 3:18f743c980fa

make this a bit more sane
author Paper <paper@tflc.us>
date Sat, 04 Apr 2026 17:03:22 -0400
parents 594c0f9d7972
children 26f695129c86
line wrap: on
line diff
--- a/src/beefweb.rs	Sat Apr 04 16:04:31 2026 -0400
+++ b/src/beefweb.rs	Sat Apr 04 17:03:22 2026 -0400
@@ -384,7 +384,7 @@
 	}
 */
 
-	pub async fn playlist_items(&self, playlist_id: &str, offset: i64, count: i64, columns: Vec<&str>) -> Result<PlaylistItems, anyhow::Error>
+	pub async fn playlist_items(&self, playlist_id: &str, offset: i64, count: i64, columns: &Vec<&str>) -> Result<PlaylistItems, anyhow::Error>
 	{
 		return Ok(self.client
 			.get(format!("{}/playlists/{}/items/{}:{}", self.base_url, playlist_id, offset, count))
@@ -396,6 +396,11 @@
 			.playlist_items);
 	}
 
+	pub async fn playlist_item(&self, playlist_id: &str, index: i64, columns: &Vec<&str>) -> Result<PlaylistItems, anyhow::Error>
+	{
+		return self.playlist_items(playlist_id, index, 1, columns).await;
+	}
+
 	pub async fn artwork(&self, playlist_id: &str, index: i64) -> Result<bytes::Bytes, anyhow::Error>
 	{
 		return Ok(self.client