style: replace separator line with blank line in Telegram notifications
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -176,7 +176,6 @@ pub async fn send_test_message(config: &TelegramConfig) -> Result<()> {
|
|||||||
send_telegram(
|
send_telegram(
|
||||||
config,
|
config,
|
||||||
"🔔 <b>Stripstream Librarian</b>\n\
|
"🔔 <b>Stripstream Librarian</b>\n\
|
||||||
━━━━━━━━━━━━━━━━━━━━\n\
|
|
||||||
✅ Test notification — connection OK!",
|
✅ Test notification — connection OK!",
|
||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
@@ -305,7 +304,7 @@ fn format_event(event: &NotificationEvent) -> String {
|
|||||||
let duration = format_duration(*duration_seconds);
|
let duration = format_duration(*duration_seconds);
|
||||||
let mut lines = vec![
|
let mut lines = vec![
|
||||||
format!("✅ <b>Scan completed</b>"),
|
format!("✅ <b>Scan completed</b>"),
|
||||||
format!("━━━━━━━━━━━━━━━━━━━━"),
|
String::new(),
|
||||||
format!("📂 <b>Library:</b> {lib}"),
|
format!("📂 <b>Library:</b> {lib}"),
|
||||||
format!("🏷 <b>Type:</b> {job_type}"),
|
format!("🏷 <b>Type:</b> {job_type}"),
|
||||||
format!("⏱ <b>Duration:</b> {duration}"),
|
format!("⏱ <b>Duration:</b> {duration}"),
|
||||||
@@ -330,7 +329,7 @@ fn format_event(event: &NotificationEvent) -> String {
|
|||||||
let err = truncate(error, 200);
|
let err = truncate(error, 200);
|
||||||
[
|
[
|
||||||
format!("🚨 <b>Scan failed</b>"),
|
format!("🚨 <b>Scan failed</b>"),
|
||||||
format!("━━━━━━━━━━━━━━━━━━━━"),
|
String::new(),
|
||||||
format!("📂 <b>Library:</b> {lib}"),
|
format!("📂 <b>Library:</b> {lib}"),
|
||||||
format!("🏷 <b>Type:</b> {job_type}"),
|
format!("🏷 <b>Type:</b> {job_type}"),
|
||||||
String::new(),
|
String::new(),
|
||||||
@@ -345,7 +344,7 @@ fn format_event(event: &NotificationEvent) -> String {
|
|||||||
let lib = library_name.as_deref().unwrap_or("All libraries");
|
let lib = library_name.as_deref().unwrap_or("All libraries");
|
||||||
[
|
[
|
||||||
format!("⏹ <b>Scan cancelled</b>"),
|
format!("⏹ <b>Scan cancelled</b>"),
|
||||||
format!("━━━━━━━━━━━━━━━━━━━━"),
|
String::new(),
|
||||||
format!("📂 <b>Library:</b> {lib}"),
|
format!("📂 <b>Library:</b> {lib}"),
|
||||||
format!("🏷 <b>Type:</b> {job_type}"),
|
format!("🏷 <b>Type:</b> {job_type}"),
|
||||||
]
|
]
|
||||||
@@ -360,7 +359,7 @@ fn format_event(event: &NotificationEvent) -> String {
|
|||||||
let duration = format_duration(*duration_seconds);
|
let duration = format_duration(*duration_seconds);
|
||||||
[
|
[
|
||||||
format!("✅ <b>Thumbnails completed</b>"),
|
format!("✅ <b>Thumbnails completed</b>"),
|
||||||
format!("━━━━━━━━━━━━━━━━━━━━"),
|
String::new(),
|
||||||
format!("📂 <b>Library:</b> {lib}"),
|
format!("📂 <b>Library:</b> {lib}"),
|
||||||
format!("🏷 <b>Type:</b> {job_type}"),
|
format!("🏷 <b>Type:</b> {job_type}"),
|
||||||
format!("⏱ <b>Duration:</b> {duration}"),
|
format!("⏱ <b>Duration:</b> {duration}"),
|
||||||
@@ -376,7 +375,7 @@ fn format_event(event: &NotificationEvent) -> String {
|
|||||||
let err = truncate(error, 200);
|
let err = truncate(error, 200);
|
||||||
[
|
[
|
||||||
format!("🚨 <b>Thumbnails failed</b>"),
|
format!("🚨 <b>Thumbnails failed</b>"),
|
||||||
format!("━━━━━━━━━━━━━━━━━━━━"),
|
String::new(),
|
||||||
format!("📂 <b>Library:</b> {lib}"),
|
format!("📂 <b>Library:</b> {lib}"),
|
||||||
format!("🏷 <b>Type:</b> {job_type}"),
|
format!("🏷 <b>Type:</b> {job_type}"),
|
||||||
String::new(),
|
String::new(),
|
||||||
@@ -393,7 +392,7 @@ fn format_event(event: &NotificationEvent) -> String {
|
|||||||
let title = book_title.as_deref().unwrap_or("Unknown");
|
let title = book_title.as_deref().unwrap_or("Unknown");
|
||||||
[
|
[
|
||||||
format!("✅ <b>CBR → CBZ conversion completed</b>"),
|
format!("✅ <b>CBR → CBZ conversion completed</b>"),
|
||||||
format!("━━━━━━━━━━━━━━━━━━━━"),
|
String::new(),
|
||||||
format!("📂 <b>Library:</b> {lib}"),
|
format!("📂 <b>Library:</b> {lib}"),
|
||||||
format!("📖 <b>Book:</b> {title}"),
|
format!("📖 <b>Book:</b> {title}"),
|
||||||
]
|
]
|
||||||
@@ -410,7 +409,7 @@ fn format_event(event: &NotificationEvent) -> String {
|
|||||||
let err = truncate(error, 200);
|
let err = truncate(error, 200);
|
||||||
[
|
[
|
||||||
format!("🚨 <b>CBR → CBZ conversion failed</b>"),
|
format!("🚨 <b>CBR → CBZ conversion failed</b>"),
|
||||||
format!("━━━━━━━━━━━━━━━━━━━━"),
|
String::new(),
|
||||||
format!("📂 <b>Library:</b> {lib}"),
|
format!("📂 <b>Library:</b> {lib}"),
|
||||||
format!("📖 <b>Book:</b> {title}"),
|
format!("📖 <b>Book:</b> {title}"),
|
||||||
String::new(),
|
String::new(),
|
||||||
@@ -425,7 +424,7 @@ fn format_event(event: &NotificationEvent) -> String {
|
|||||||
} => {
|
} => {
|
||||||
[
|
[
|
||||||
format!("✅ <b>Metadata linked</b>"),
|
format!("✅ <b>Metadata linked</b>"),
|
||||||
format!("━━━━━━━━━━━━━━━━━━━━"),
|
String::new(),
|
||||||
format!("📚 <b>Series:</b> {series_name}"),
|
format!("📚 <b>Series:</b> {series_name}"),
|
||||||
format!("🔗 <b>Provider:</b> {provider}"),
|
format!("🔗 <b>Provider:</b> {provider}"),
|
||||||
]
|
]
|
||||||
@@ -439,7 +438,7 @@ fn format_event(event: &NotificationEvent) -> String {
|
|||||||
let lib = library_name.as_deref().unwrap_or("All libraries");
|
let lib = library_name.as_deref().unwrap_or("All libraries");
|
||||||
[
|
[
|
||||||
format!("✅ <b>Metadata batch completed</b>"),
|
format!("✅ <b>Metadata batch completed</b>"),
|
||||||
format!("━━━━━━━━━━━━━━━━━━━━"),
|
String::new(),
|
||||||
format!("📂 <b>Library:</b> {lib}"),
|
format!("📂 <b>Library:</b> {lib}"),
|
||||||
format!("📊 <b>Processed:</b> {processed}/{total_series} series"),
|
format!("📊 <b>Processed:</b> {processed}/{total_series} series"),
|
||||||
]
|
]
|
||||||
@@ -453,7 +452,7 @@ fn format_event(event: &NotificationEvent) -> String {
|
|||||||
let err = truncate(error, 200);
|
let err = truncate(error, 200);
|
||||||
[
|
[
|
||||||
format!("🚨 <b>Metadata batch failed</b>"),
|
format!("🚨 <b>Metadata batch failed</b>"),
|
||||||
format!("━━━━━━━━━━━━━━━━━━━━"),
|
String::new(),
|
||||||
format!("📂 <b>Library:</b> {lib}"),
|
format!("📂 <b>Library:</b> {lib}"),
|
||||||
String::new(),
|
String::new(),
|
||||||
format!("💬 <code>{err}</code>"),
|
format!("💬 <code>{err}</code>"),
|
||||||
@@ -469,7 +468,7 @@ fn format_event(event: &NotificationEvent) -> String {
|
|||||||
let lib = library_name.as_deref().unwrap_or("All libraries");
|
let lib = library_name.as_deref().unwrap_or("All libraries");
|
||||||
let mut lines = vec![
|
let mut lines = vec![
|
||||||
format!("✅ <b>Metadata refresh completed</b>"),
|
format!("✅ <b>Metadata refresh completed</b>"),
|
||||||
format!("━━━━━━━━━━━━━━━━━━━━"),
|
String::new(),
|
||||||
format!("📂 <b>Library:</b> {lib}"),
|
format!("📂 <b>Library:</b> {lib}"),
|
||||||
String::new(),
|
String::new(),
|
||||||
format!("📊 <b>Results</b>"),
|
format!("📊 <b>Results</b>"),
|
||||||
@@ -489,7 +488,7 @@ fn format_event(event: &NotificationEvent) -> String {
|
|||||||
let err = truncate(error, 200);
|
let err = truncate(error, 200);
|
||||||
[
|
[
|
||||||
format!("🚨 <b>Metadata refresh failed</b>"),
|
format!("🚨 <b>Metadata refresh failed</b>"),
|
||||||
format!("━━━━━━━━━━━━━━━━━━━━"),
|
String::new(),
|
||||||
format!("📂 <b>Library:</b> {lib}"),
|
format!("📂 <b>Library:</b> {lib}"),
|
||||||
String::new(),
|
String::new(),
|
||||||
format!("💬 <code>{err}</code>"),
|
format!("💬 <code>{err}</code>"),
|
||||||
@@ -504,7 +503,7 @@ fn format_event(event: &NotificationEvent) -> String {
|
|||||||
let lib = library_name.as_deref().unwrap_or("All libraries");
|
let lib = library_name.as_deref().unwrap_or("All libraries");
|
||||||
[
|
[
|
||||||
format!("✅ <b>Reading status match completed</b>"),
|
format!("✅ <b>Reading status match completed</b>"),
|
||||||
format!("━━━━━━━━━━━━━━━━━━━━"),
|
String::new(),
|
||||||
format!("📂 <b>Library:</b> {lib}"),
|
format!("📂 <b>Library:</b> {lib}"),
|
||||||
String::new(),
|
String::new(),
|
||||||
format!("📊 <b>Results</b>"),
|
format!("📊 <b>Results</b>"),
|
||||||
@@ -520,7 +519,7 @@ fn format_event(event: &NotificationEvent) -> String {
|
|||||||
let err = truncate(error, 200);
|
let err = truncate(error, 200);
|
||||||
[
|
[
|
||||||
format!("🚨 <b>Reading status match failed</b>"),
|
format!("🚨 <b>Reading status match failed</b>"),
|
||||||
format!("━━━━━━━━━━━━━━━━━━━━"),
|
String::new(),
|
||||||
format!("📂 <b>Library:</b> {lib}"),
|
format!("📂 <b>Library:</b> {lib}"),
|
||||||
String::new(),
|
String::new(),
|
||||||
format!("💬 <code>{err}</code>"),
|
format!("💬 <code>{err}</code>"),
|
||||||
@@ -535,7 +534,7 @@ fn format_event(event: &NotificationEvent) -> String {
|
|||||||
let lib = library_name.as_deref().unwrap_or("All libraries");
|
let lib = library_name.as_deref().unwrap_or("All libraries");
|
||||||
[
|
[
|
||||||
format!("✅ <b>Reading status push completed</b>"),
|
format!("✅ <b>Reading status push completed</b>"),
|
||||||
format!("━━━━━━━━━━━━━━━━━━━━"),
|
String::new(),
|
||||||
format!("📂 <b>Library:</b> {lib}"),
|
format!("📂 <b>Library:</b> {lib}"),
|
||||||
String::new(),
|
String::new(),
|
||||||
format!("📊 <b>Results</b>"),
|
format!("📊 <b>Results</b>"),
|
||||||
@@ -551,7 +550,7 @@ fn format_event(event: &NotificationEvent) -> String {
|
|||||||
let err = truncate(error, 200);
|
let err = truncate(error, 200);
|
||||||
[
|
[
|
||||||
format!("🚨 <b>Reading status push failed</b>"),
|
format!("🚨 <b>Reading status push failed</b>"),
|
||||||
format!("━━━━━━━━━━━━━━━━━━━━"),
|
String::new(),
|
||||||
format!("📂 <b>Library:</b> {lib}"),
|
format!("📂 <b>Library:</b> {lib}"),
|
||||||
String::new(),
|
String::new(),
|
||||||
format!("💬 <code>{err}</code>"),
|
format!("💬 <code>{err}</code>"),
|
||||||
|
|||||||
Reference in New Issue
Block a user