summaryrefslogtreecommitdiffstats
path: root/xbmc/video/Bookmark.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xbmc/video/Bookmark.cpp')
-rw-r--r--xbmc/video/Bookmark.cpp39
1 files changed, 39 insertions, 0 deletions
diff --git a/xbmc/video/Bookmark.cpp b/xbmc/video/Bookmark.cpp
new file mode 100644
index 0000000..d18c00e
--- /dev/null
+++ b/xbmc/video/Bookmark.cpp
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2005-2018 Team Kodi
+ * This file is part of Kodi - https://kodi.tv
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ * See LICENSES/README.md for more information.
+ */
+
+#include "Bookmark.h"
+
+CBookmark::CBookmark()
+{
+ Reset();
+}
+
+void CBookmark::Reset()
+{
+ episodeNumber = 0;
+ seasonNumber = 0;
+ timeInSeconds = 0.0;
+ totalTimeInSeconds = 0.0;
+ partNumber = 0;
+ type = STANDARD;
+}
+
+bool CBookmark::IsSet() const
+{
+ return totalTimeInSeconds > 0.0;
+}
+
+bool CBookmark::IsPartWay() const
+{
+ return totalTimeInSeconds > 0.0 && timeInSeconds > 0.0;
+}
+
+bool CBookmark::HasSavedPlayerState() const
+{
+ return !playerState.empty();
+}