diff --git a/src/UI/DocumentViews/MpvContainer.cc b/src/UI/DocumentViews/MpvContainer.cc
index c3f4776280050d6c6992c5792d983b5895e23bcf..2930a7d91b8681c4735e391341341b1ced7794a4 100644
--- a/src/UI/DocumentViews/MpvContainer.cc
+++ b/src/UI/DocumentViews/MpvContainer.cc
@@ -176,33 +176,36 @@ MpvContainer::handleMpvEvent(mpv_event *event) noexcept
     }
 }
 
+int
+MpvContainer::getAssSid() const noexcept
+{
+    bool conversionOk  = false;
+    const char *result = mpv_get_property_string(mpv, "sid");
+    const int ret      = QString(result).toInt(&conversionOk);
+    return (result == nullptr || !conversionOk) ? -1 : ret;
+}
+
 void
 MpvContainer::handleMpvEventCommandReply(const AsyncCmdType type) noexcept
 {
-    int rc;
-
     switch (type) {
     case AsyncCmdType::None:
         break;
 
     case AsyncCmdType::LoadAssFile:
     case AsyncCmdType::ReloadAss:
-        mpv_get_property(mpv, "sid", MPV_FORMAT_INT64, &sid);
+        sid = getAssSid();
         qDebug() << "Load ASS file with id:" << sid;
         break;
     case AsyncCmdType::UnloadAss:
-        rc = mpv_get_property(mpv, "sid", MPV_FORMAT_INT64, &sid);
-        qDebug() << "Unloaded Ass, rc =" << rc << "and sid =" << sid;
-        if (rc != MPV_ERROR_SUCCESS) {
-            printMpvError(rc);
-            sid = -1;
-        } else {
+        sid = getAssSid();
+        qDebug().nospace() << "Unload Ass, rc = " << sid;
+        if (sid != -1)
             unloadAssFile();
-        }
         break;
 
     case AsyncCmdType::LoadFile:
-        mpv_get_property(mpv, "sid", MPV_FORMAT_INT64, &sid);
+        sid = getAssSid();
         qDebug() << "MPV - CMD: File loaded by mpv, sid =" << sid;
         isPlaybackPaused = false;
         mpvPause();
diff --git a/src/UI/DocumentViews/MpvContainer.hh b/src/UI/DocumentViews/MpvContainer.hh
index b6ab1d9fd4d5cb6e9776a88e3d8e49689f5de5cf..1c1b46160bceeae94e94e90f07fc5e2398402533 100644
--- a/src/UI/DocumentViews/MpvContainer.hh
+++ b/src/UI/DocumentViews/MpvContainer.hh
@@ -56,6 +56,7 @@ private:
     void asyncCommand(const AsyncCmdType, std::initializer_list<const char *>) noexcept;
     void unloadAssFile() noexcept;
     void handleMpvEventCommandReply(const AsyncCmdType) noexcept;
+    int getAssSid() const noexcept;
 
     // Must be static to be passed as a function ptr
     static void mpvEventWakeUpCB(void *) noexcept;