summaryrefslogtreecommitdiff
path: root/marks.cpp
diff options
context:
space:
mode:
authorJochen Dolze <vdr@dolze.de>2010-03-23 21:22:09 +0100
committerJochen Dolze <vdr@dolze.de>2010-03-23 21:22:09 +0100
commit2536e2274be47a822eb6034d5f359070c4c7270b (patch)
tree960f2a2bef50b90be9a27f2d6736fe3bc202ba0c /marks.cpp
parent616e154c45b6d30233375c0d5f53027b47975bc9 (diff)
downloadvdr-plugin-markad-2536e2274be47a822eb6034d5f359070c4c7270b.tar.gz
vdr-plugin-markad-2536e2274be47a822eb6034d5f359070c4c7270b.tar.bz2
Added more marktypes, added initial mark rating
Diffstat (limited to 'marks.cpp')
-rw-r--r--marks.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/marks.cpp b/marks.cpp
index 5a59b2e..3d4b81a 100644
--- a/marks.cpp
+++ b/marks.cpp
@@ -42,6 +42,22 @@ clMarks::~clMarks()
}
+int clMarks::Count(int Type)
+{
+ if (Type==0xFF) return count;
+
+ if (!first) return 0;
+
+ int ret=0;
+ clMark *mark=first;
+ while (mark)
+ {
+ if (mark->type==Type) ret++;
+ mark=mark->Next();
+ }
+ return ret;
+}
+
void clMarks::Del(int Type)
{
if (!first) return; // no elements yet
@@ -115,7 +131,7 @@ clMark *clMarks::GetNext(int Position)
clMark *mark=first;
while (mark)
{
- if (Position>mark->position) break;
+ if (Position>=mark->position) break;
mark=mark->Next();
}
return mark->Next();