about summary refs log tree commit diff stats
path: root/pkgs/by-name/mp/mpdpopm/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--pkgs/by-name/mp/mpdpopm/src/lib.rs46
1 files changed, 1 insertions, 45 deletions
diff --git a/pkgs/by-name/mp/mpdpopm/src/lib.rs b/pkgs/by-name/mp/mpdpopm/src/lib.rs
index 4fe523ea..d5db57b4 100644
--- a/pkgs/by-name/mp/mpdpopm/src/lib.rs
+++ b/pkgs/by-name/mp/mpdpopm/src/lib.rs
@@ -35,7 +35,6 @@
 pub mod clients;
 pub mod config;
 pub mod filters_ast;
-pub mod messages;
 pub mod playcounts;
 pub mod storage;
 pub mod vars;
@@ -52,8 +51,6 @@ pub mod filters {
 use crate::{
     clients::{Client, IdleClient, IdleSubSystem},
     config::{Config, Connection},
-    filters_ast::FilterStickerNames,
-    messages::MessageProcessor,
     playcounts::PlayState,
 };
 
@@ -70,8 +67,6 @@ use tracing::{debug, error, info};
 pub async fn mpdpopm(cfg: Config) -> std::result::Result<(), Error> {
     info!("mpdpopm {} beginning.", vars::VERSION);
 
-    let filter_stickers = FilterStickerNames::new();
-
     let mut client =
         match cfg.conn {
             Connection::Local { ref path } => Client::open(path)
@@ -110,12 +105,9 @@ pub async fn mpdpopm(cfg: Config) -> std::result::Result<(), Error> {
     let tick = sleep(Duration::from_millis(cfg.poll_interval_ms)).fuse();
     pin_mut!(ctrl_c, sighup, sigkill, tick);
 
-    let mproc = MessageProcessor::new();
-
     let mut done = false;
     while !done {
         debug!("selecting...");
-        let mut msg_check_needed = false;
         {
             // `idle_client' mutably borrowed here
             let mut idle = Box::pin(idle_client.idle().fuse());
@@ -142,24 +134,6 @@ pub async fn mpdpopm(cfg: Config) -> std::result::Result<(), Error> {
                                 .await
                                 .context("PlayState update failed")?
                     },
-                    // next = cmds.next() => match next {
-                    //     Some(out) => {
-                    //         debug!("output status is {:#?}", out.out);
-                    //         match out.upd {
-                    //             Some(uri) => {
-                    //                 debug!("{} needs to be updated", uri);
-                    //                 client.update(&uri).await.map_err(|err| Error::Client {
-                    //                     source: err,
-                    //                     back: Backtrace::new(),
-                    //                 })?;
-                    //             },
-                    //             None => debug!("No database update needed"),
-                    //         }
-                    //     },
-                    //     None => {
-                    //         debug!("No more commands to process.");
-                    //     }
-                    // },
                     res = idle => match res {
                         Ok(subsys) => {
                             debug!("subsystem {} changed", subsys);
@@ -168,7 +142,7 @@ pub async fn mpdpopm(cfg: Config) -> std::result::Result<(), Error> {
                                     .await
                                     .context("PlayState update failed")?
                             } else if subsys == IdleSubSystem::Message {
-                                msg_check_needed = true;
+                                error!("Message handling is not supported!");
                             }
                             break;
                         },
@@ -181,24 +155,6 @@ pub async fn mpdpopm(cfg: Config) -> std::result::Result<(), Error> {
                 }
             }
         }
-
-        if msg_check_needed {
-            // Check for any messages that have come in; if there's an error there's not a lot we
-            // can do about it (suppose some client fat-fingers a command name, e.g.)-- just log it
-            // & move on.
-            if let Err(err) = mproc
-                .check_messages(
-                    &mut client,
-                    &mut idle_client,
-                    state.last_status(),
-                    &cfg.commands_chan,
-                    &filter_stickers,
-                )
-                .await
-            {
-                error!("Error while processing messages: {err:#?}");
-            }
-        }
     }
 
     info!("mpdpopm exiting.");