mirror of
https://github.com/alexpasmantier/television.git
synced 2025-06-07 03:55:23 +00:00

* fix(entry): preserve raw input * chore(version): bump workspace crates and television * test: add tests for replace_non_printable and cleanup commented out code * chore(changelog): update changelog (auto) * chore(deps): update cargo dependencies --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
29 lines
690 B
Rust
29 lines
690 B
Rust
use std::sync::Arc;
|
|
|
|
use crate::previewers::{Preview, PreviewContent};
|
|
use television_channels::entry::Entry;
|
|
|
|
#[derive(Debug, Default)]
|
|
pub struct BasicPreviewer {
|
|
_config: BasicPreviewerConfig,
|
|
}
|
|
|
|
#[derive(Debug, Default)]
|
|
pub struct BasicPreviewerConfig {}
|
|
|
|
impl BasicPreviewer {
|
|
pub fn new(config: Option<BasicPreviewerConfig>) -> Self {
|
|
BasicPreviewer {
|
|
_config: config.unwrap_or_default(),
|
|
}
|
|
}
|
|
|
|
pub fn preview(&self, entry: &Entry) -> Arc<Preview> {
|
|
Arc::new(Preview {
|
|
title: entry.name.clone(),
|
|
content: PreviewContent::PlainTextWrapped(entry.name.clone()),
|
|
icon: entry.icon,
|
|
})
|
|
}
|
|
}
|