summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Wieninger <cwieninger (at) gmx (dot) de>2008-01-25 22:35:48 (GMT)
committerChristian Wieninger <cwieninger (at) gmx (dot) de>2008-01-25 22:35:48 (GMT)
commit81db819a3d93b57dd77ad7ee2c654a607abd99c9 (patch)
tree7d32e906739166dcff6489ba305c4fc5e17869a6
parent8b07facae8d4cb6cf75258b46cdd77866ab60cb4 (diff)
downloadvdr-plugin-live-81db819a3d93b57dd77ad7ee2c654a607abd99c9.tar.gz
vdr-plugin-live-81db819a3d93b57dd77ad7ee2c654a607abd99c9.tar.bz2
- tadi's update
-rw-r--r--Makefile32
-rw-r--r--doc/ChangeLog33
-rw-r--r--i18n-generated.h156
-rw-r--r--pages/Makefile4
-rw-r--r--pages/pageelems.ecpp3
-rw-r--r--pages/recordings.ecpp63
-rw-r--r--pages/schedule.ecpp2
-rw-r--r--po/ca_ES.po12
-rw-r--r--po/cs_CZ.po12
-rw-r--r--po/da_DK.po12
-rw-r--r--po/de_DE.po28
-rw-r--r--po/el_GR.po12
-rw-r--r--po/es_ES.po12
-rw-r--r--po/et_EE.po12
-rw-r--r--po/fi_FI.po18
-rw-r--r--po/fr_FR.po16
-rw-r--r--po/hr_HR.po12
-rw-r--r--po/hu_HU.po12
-rw-r--r--po/it_IT.po16
-rw-r--r--po/nl_NL.po14
-rw-r--r--po/nn_NO.po12
-rw-r--r--po/pl_PL.po12
-rw-r--r--po/pt_PT.po12
-rw-r--r--po/ro_RO.po12
-rw-r--r--po/ru_RU.po12
-rw-r--r--po/sl_SI.po12
-rw-r--r--po/sv_SE.po12
-rw-r--r--po/tr_TR.po12
-rw-r--r--recman.cpp26
-rw-r--r--recman.h11
-rw-r--r--tasks.cpp23
-rw-r--r--tasks.h15
32 files changed, 595 insertions, 57 deletions
diff --git a/Makefile b/Makefile
index ebc6592..d3bfa06 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,6 @@
#
# Makefile for a Video Disk Recorder plugin
#
-# $Id: Makefile,v 1.60 2008/01/04 12:18:08 tadi Exp $
# The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin.
@@ -68,6 +67,8 @@ ifneq ($(TNTVERS7),yes)
SUBDIRS += httpd
endif
+VERSIONSUFFIX = gen_version_suffix.h
+
### The object files (add further files here):
PLUGINOBJS = $(PLUGIN).o thread.o tntconfig.o setup.o i18n.o timers.o \
@@ -78,10 +79,10 @@ WEBLIBS = pages/libpages.a css/libcss.a javascript/libjavascript.a
### Default rules:
-.PHONY: all dist clean SUBDIRS
-
all: libvdr-$(PLUGIN).so $(I18NTARG)
+.PHONY: all dist clean subdirs $(SUBDIRS) PAGES
+
### Implicit rules:
%.o: %.cpp
@@ -94,7 +95,9 @@ DEPFILE = .dependencies
$(DEPFILE): Makefile
@$(MAKEDEP) $(DEFINES) $(INCLUDES) $(PLUGINOBJS:%.o=%.cpp) > $@
+ifneq ($(MAKECMDGOALS),clean)
-include $(DEPFILE)
+endif
### Internationalization (I18N):
@@ -130,15 +133,18 @@ generate-i18n: i18n-template.h $(I18Npot) $(I18Npo) buildutil/pot2i18n.pl
### Targets:
-SUBDIRS:
- @for dir in $(SUBDIRS); do \
- make -C $$dir CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" || exit 1; \
- done
+subdirs: $(SUBDIRS)
+
+$(SUBDIRS):
+ $(MAKE) -C $@ CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" $(MAKECMDGOALS)
PAGES:
- make -C pages CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" .dependencies || exit 1;
+ $(MAKE) -C pages CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" .dependencies
+
+$(VERSIONSUFFIX): FORCE
+ ./buildutil/version-util $(VERSIONSUFFIX) || ./buildutil/version-util -F $(VERSIONSUFFIX)
-libvdr-$(PLUGIN).so: SUBDIRS $(PLUGINOBJS)
+libvdr-$(PLUGIN).so: $(VERSIONSUFFIX) $(SUBDIRS) $(PLUGINOBJS)
$(CXX) $(LDFLAGS) -shared -o $@ $(PLUGINOBJS) -Wl,--whole-archive $(WEBLIBS) -Wl,--no-whole-archive $(LIBS)
@cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION)
ifneq ($(TNTVERS7),yes)
@@ -172,11 +178,11 @@ dist: clean
@-rm -rf $(TMPDIR)/$(ARCHIVE)
@echo Distribution package created as $(PACKAGE).tgz
-clean:
+clean: $(SUBDIRS)
@-rm -f $(PODIR)/*.mo $(PODIR)/*.pot
@-rm -f $(PLUGINOBJS) $(DEPFILE) *.so *.tgz core* *~
- @for dir in $(SUBDIRS); do \
- make -C $$dir clean ; \
- done
+ @-rm -f $(VERSIONSUFFIX)
.PRECIOUS: $(I18Npo)
+
+FORCE:
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 60341f1..20f25b5 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,10 +1,39 @@
+2008-01-25 Dieter Hametner <dh+vdr at gekrumbel dot de>
+
+ * recman.cpp: Fixed memory leak, which resulted through the use of
+ circular references by using tr1::shared_ptr, where a
+ tr1::weak_ptr would have been needed.
+
+ * pages/recordings.ecpp: Added button to delete that single
+ recording. This feature is somehow limited in usability and
+ should be used only for occasional deletion of recordings,
+ because the page reloads when a recording is
+ deleted. Unfortunately there is currently no way to remember the
+ position to where the user navigated before he hit the delete
+ button. In order to delete an other recording in the same
+ subdirectory he will need to navigate there again after the page
+ reloaded.
+
+2008-01-18 Dieter Hametner <dh+vdr at gekrumbel dot de>
+
+ * buildutil/version-util*: Added a shell and an awk script to
+ calculate a version suffix string out of CVS current working dir
+ status. This was a request bei jo01 and helps distinguish if
+ newer versions are awailable. It should not break builds if
+ something goes wrong in the script. At least it was my
+ intention. The script also supports git repositories. But it
+ has not been tested if it determines the correct git commit id
+ based on current workdir contents. The caluculated version
+ suffix is appended to the LIVE version string visible in the
+ about box (?-Menu entry).
+
2008-01-15 Christian Wieninger <cwieninger at gmx dot de>
- * whats_on.ecpp: added listing 'Favorites', that lists all search
+ * whats_on.ecpp: added listing 'Favorites', that lists all search
results of search timers with setting 'Use in favorites menu'
* Makefile: reversed Makefile changes that avoided commit conflicts,
but caused compile time problems
* po/*.po: added "translation team" since msgfmt complains about that
-
+
2008-01-04 Dieter Hametner <dh+vdr at gekrumbel dot de>
* Makefile: Thanks to user 'ernie' in vdr-portal.de, who pointed
diff --git a/i18n-generated.h b/i18n-generated.h
index 372f338..120605d 100644
--- a/i18n-generated.h
+++ b/i18n-generated.h
@@ -502,7 +502,7 @@ const tI18nPhrase Phrases[] = {
#endif
},
{ "Couldn't find channel or no channels available.",
- "",
+ "Kann das Programm nicht finden oder keine vorhanden.",
"",
"Impossibile trovare canale o canali disponibili.",
"",
@@ -537,7 +537,7 @@ const tI18nPhrase Phrases[] = {
#endif
},
{ "Couldn't switch to channel.",
- "",
+ "Kann nicht zu dem Programm umschalten.",
"",
"Impossibile cambiare canale.",
"",
@@ -572,7 +572,7 @@ const tI18nPhrase Phrases[] = {
#endif
},
{ "Couldn't find recording or no recordings available.",
- "",
+ "Kann die Aufnahme nicht finden oder keine Aufnahmen vorhanden.",
"",
"Impossibile trovare registrazione o registrazioni non disponibili.",
"",
@@ -607,7 +607,7 @@ const tI18nPhrase Phrases[] = {
#endif
},
{ "Cannot control playback!",
- "",
+ "Kann die Wiedergabe nicht steuern.",
"",
"Impossibile controllare riproduzione!",
"",
@@ -642,7 +642,7 @@ const tI18nPhrase Phrases[] = {
#endif
},
{ "Not playing a recording.",
- "",
+ "Es wird keine Aufnahme abgespielt.",
"",
"Nessuna registrazione in riproduzione.",
"",
@@ -677,7 +677,7 @@ const tI18nPhrase Phrases[] = {
#endif
},
{ "Not playing the same recording as from request.",
- "",
+ "Es wird nicht die selbe Aufnahme abgespielt.",
"",
"Riproduzione di una registrazione diversa da quella richiesta.",
"",
@@ -711,6 +711,41 @@ const tI18nPhrase Phrases[] = {
"",
#endif
},
+ { "Attempt to delete recording currently in playback.",
+ "Versuch die gerade abgepielte Aufnahme zu löschen.",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+#if VDRVERSNUM >= 10302
+ "",
+#endif
+#if VDRVERSNUM >= 10307
+ "",
+#endif
+#if VDRVERSNUM >= 10313
+ "",
+#endif
+#if VDRVERSNUM >= 10316
+ "",
+#endif
+#if VDRVERSNUM >= 10342
+ "",
+#endif
+#if VDRVERSNUM >= 10502
+ "",
+#endif
+ },
{ "Epg error",
"EPG Fehler",
"",
@@ -817,7 +852,7 @@ const tI18nPhrase Phrases[] = {
#endif
},
{ "Wrong event id",
- "",
+ "Fehlerhafte Sendungs Id",
"",
"ID evento errato",
"",
@@ -6381,6 +6416,76 @@ const tI18nPhrase Phrases[] = {
"",
#endif
},
+ { "ERROR:",
+ "FEHLER:",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+#if VDRVERSNUM >= 10302
+ "",
+#endif
+#if VDRVERSNUM >= 10307
+ "",
+#endif
+#if VDRVERSNUM >= 10313
+ "",
+#endif
+#if VDRVERSNUM >= 10316
+ "",
+#endif
+#if VDRVERSNUM >= 10342
+ "",
+#endif
+#if VDRVERSNUM >= 10502
+ "",
+#endif
+ },
+ { "Deleted recording:",
+ "Gelöschte Aufnahme:",
+ "",
+ "Registrazione serie",
+ "Serie's opnemen",
+ "",
+ "Enregistrement de série",
+ "",
+ "Sarjatallennus",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+#if VDRVERSNUM >= 10302
+ "",
+#endif
+#if VDRVERSNUM >= 10307
+ "",
+#endif
+#if VDRVERSNUM >= 10313
+ "",
+#endif
+#if VDRVERSNUM >= 10316
+ "",
+#endif
+#if VDRVERSNUM >= 10342
+ "",
+#endif
+#if VDRVERSNUM >= 10502
+ "",
+#endif
+ },
{ "List of recordings",
"Liste der Aufnahmen",
"",
@@ -6486,6 +6591,41 @@ const tI18nPhrase Phrases[] = {
"",
#endif
},
+ { "Delete this recording from hard disc!",
+ "Diese Aufnahme von der Festplatte löschen!",
+ "",
+ "Cancella registrazione dopo ... giorni",
+ "",
+ "",
+ "Effacer l'enregistrement après ... jours",
+ "",
+ "Poista tallenteet ... päivän jälkeen",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+#if VDRVERSNUM >= 10302
+ "",
+#endif
+#if VDRVERSNUM >= 10307
+ "",
+#endif
+#if VDRVERSNUM >= 10313
+ "",
+#endif
+#if VDRVERSNUM >= 10316
+ "",
+#endif
+#if VDRVERSNUM >= 10342
+ "",
+#endif
+#if VDRVERSNUM >= 10502
+ "",
+#endif
+ },
{ "play this recording.",
"Diese Aufnahme abspielen.",
"",
@@ -8244,7 +8384,7 @@ const tI18nPhrase Phrases[] = {
"",
"",
"",
- "",
+ "Suosikit",
"",
"",
"",
diff --git a/pages/Makefile b/pages/Makefile
index 11b7ebe..8f718fe 100644
--- a/pages/Makefile
+++ b/pages/Makefile
@@ -41,10 +41,12 @@ all: libpages.a
MAKEDEP = $(CXX) -MM -MG
DEPFILE = .dependencies
-$(DEPFILE): Makefile $(OBJS:%.o=%.cpp) $(OBJS:%.o=%.ecpp)
+$(DEPFILE): Makefile $(OBJS:%.o=%.cpp) $(OBJS:%.o=%.ecpp)
@$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.cpp) > $@
+ifneq ($(MAKECMDGOALS),clean)
-include $(DEPFILE)
+endif
### Targets:
diff --git a/pages/pageelems.ecpp b/pages/pageelems.ecpp
index b61e663..34cfbf8 100644
--- a/pages/pageelems.ecpp
+++ b/pages/pageelems.ecpp
@@ -9,6 +9,7 @@
#include "timers.h"
#include "tools.h"
#include "epg_events.h"
+#include "gen_version_suffix.h"
using namespace std;
using namespace vdrlive;
@@ -334,7 +335,7 @@ int update_status(1);
<div class="about_right">Michael Brückner (skiller2k1)</div>
<div class="about_head"><div><div><$ tr("Information") $></div></div></div>
<div class="about_left"><$ tr("LIVE version") $>:</div>
- <div class="about_right"><$ LIVEVERSION $></div>
+ <div class="about_right"><$ LIVEVERSION $><$ VERSION_SUFFIX $></div>
<div class="about_left"><$ tr("VDR version") $>:</div>
<div class="about_right"><$ VDRVERSION $></div>
<div class="about_head"><div><div><$ tr("Features") $></div></div></div>
diff --git a/pages/recordings.ecpp b/pages/recordings.ecpp
index 2acfdc4..11b20a6 100644
--- a/pages/recordings.ecpp
+++ b/pages/recordings.ecpp
@@ -1,4 +1,6 @@
<%pre>
+#include <string>
+
#include <vdr/plugin.h>
#include <vdr/config.h>
@@ -6,26 +8,39 @@
#include "tools.h"
#include "epg_events.h"
-#include "recman.h"
#include "setup.h"
+#include "tasks.h"
+#include "tools.h"
+
+#include "recman.h"
using namespace vdrlive;
using namespace std;
</%pre>
<%args>
+ string todel;
</%args>
<%session scope="global">
bool logged_in(false);
</%session>
<%request scope="page">
- RecordingsTreePtr recordingsTree(LiveRecordingsManager()->GetRecordingsTree());
+ string deleteResult;
</%request>
<%include>page_init.eh</%include>
<%cpp>
- if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
+if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
+
+pageTitle = tr("Recordings");
- pageTitle = tr("Recordings");
+if (!todel.empty()) {
+ RemoveRecordingTask task(todel);
+ LiveTaskManager().Execute(task);
+ if (!task.Result())
+ deleteResult = string() + tr("ERROR:") + " " + task.Error();
+ else
+ deleteResult = string() + tr("Deleted recording:") + " " + StringReplace(task.RecName(), "~", "/");
+}
</%cpp>
<& pageelems.doc_type &>
<html>
@@ -37,18 +52,34 @@ using namespace std;
</head>
<body>
<& pageelems.logo &>
+<%cpp>
+if (! deleteResult.empty()) {
+</%cpp>
+ <& menu active=("recordings") component=("recordings.delete_error") &>
+<%cpp>
+} else {
+</%cpp>
<& menu active=("recordings") &>
+<%cpp>
+}
+</%cpp>
<div class="inhalt">
<div class="boxheader"><div><div><$ tr("List of recordings") $></div></div></div>
-% if (Recordings.Count() == 0) {
+<%cpp>
+ if (Recordings.Count() == 0) {
+</%cpp>
<$ tr("No recordings found") $>
-% } else {
+<%cpp>
+ } else {
+</%cpp>
<div class="recordings">
<ul class="recordingslist" style="display: block;">
<& recordings.recordings_item &>
</ul>
</div>
-% }
+<%cpp>
+ }
+</%cpp>
</div>
</body>
</html>
@@ -62,6 +93,7 @@ using namespace std;
int level = 0;
</%args>
<%cpp>
+RecordingsTreePtr recordingsTree(LiveRecordingsManager()->GetRecordingsTree());
RecordingsMap::iterator iter;
RecordingsMap::iterator end = recordingsTree->end(path);
@@ -113,6 +145,15 @@ for (iter = recordingsTree->begin(path); iter != end; ++iter) {
<# ---------------------------------------------------------------------- #>
+<%def del_rec>
+<%args>
+ string id;
+</%args>
+<%cpp> { </%cpp><a href="recordings.html?todel=<$ id $>" <& tooltip.hint text=(tr("Delete this recording from hard disc!")) &>><img src="<$ LiveSetup().GetThemedLink("img", "del.png") $>" alt="" /></a><%cpp> } </%cpp>
+</%def>
+
+<# ---------------------------------------------------------------------- #>
+
<%def rec_tools>
<%args>
string id;
@@ -120,6 +161,7 @@ for (iter = recordingsTree->begin(path); iter != end; ++iter) {
</%args>
<& pageelems.ajax_action_href action="play_recording" param=(id) tip=(tr("play this recording.")) image="play.png" alt="" &>
<& pageelems.imdb_info_href title=(title) &>
+<& recordings.del_rec id=(id) &>
</%def>
<# ---------------------------------------------------------------------- #>
@@ -189,7 +231,6 @@ for (iter = recordingsTree->begin(path); iter != end; ++iter) {
</%cpp>
<!-- not supported yet ...
<img src="<$ LiveSetup().GetThemedLink("img", "edit.png") $>" alt="" />
- <img src="<$ LiveSetup().GetThemedLink("img", "del.png") $>" alt="" />
-->
</div>
<%cpp>
@@ -201,3 +242,9 @@ for (iter = recordingsTree->begin(path); iter != end; ++iter) {
</%cpp>
</div>
</%def>
+
+<# ---------------------------------------------------------------------- #>
+
+<%def delete_error>
+<%cpp> { </%cpp><$ deleteResult $><%cpp> } </%cpp>
+</%def>
diff --git a/pages/schedule.ecpp b/pages/schedule.ecpp
index 7896f6f..35b892b 100644
--- a/pages/schedule.ecpp
+++ b/pages/schedule.ecpp
@@ -64,7 +64,7 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
</head>
<body>
<& pageelems.logo &>
- <& menu active=("schedule") component=("schedule.channel_selection")>
+ <& menu active=("schedule") component=("schedule.channel_selection") &>
<div class="inhalt">
<%cpp>
if ( Schedule == 0 ) {
diff --git a/po/ca_ES.po b/po/ca_ES.po
index 39fcc3b..3fb8738 100644
--- a/po/ca_ES.po
+++ b/po/ca_ES.po
@@ -77,6 +77,9 @@ msgstr ""
msgid "Not playing the same recording as from request."
msgstr ""
+msgid "Attempt to delete recording currently in playback."
+msgstr ""
+
msgid "Epg error"
msgstr ""
@@ -563,6 +566,12 @@ msgstr ""
msgid "If you encounter any bugs or would like to suggest new features, please use our bugtracker"
msgstr ""
+msgid "ERROR:"
+msgstr ""
+
+msgid "Deleted recording:"
+msgstr ""
+
msgid "List of recordings"
msgstr ""
@@ -572,6 +581,9 @@ msgstr ""
msgid "Click to view details."
msgstr ""
+msgid "Delete this recording from hard disc!"
+msgstr ""
+
msgid "play this recording."
msgstr ""
diff --git a/po/cs_CZ.po b/po/cs_CZ.po
index 2338354..d241bce 100644
--- a/po/cs_CZ.po
+++ b/po/cs_CZ.po
@@ -75,6 +75,9 @@ msgstr ""
msgid "Not playing the same recording as from request."
msgstr ""
+msgid "Attempt to delete recording currently in playback."
+msgstr ""
+
msgid "Epg error"
msgstr ""
@@ -561,6 +564,12 @@ msgstr ""
msgid "If you encounter any bugs or would like to suggest new features, please use our bugtracker"
msgstr ""
+msgid "ERROR:"
+msgstr ""
+
+msgid "Deleted recording:"
+msgstr ""
+
msgid "List of recordings"
msgstr ""
@@ -570,6 +579,9 @@ msgstr ""
msgid "Click to view details."
msgstr ""
+msgid "Delete this recording from hard disc!"
+msgstr ""
+
msgid "play this recording."
msgstr ""
diff --git a/po/da_DK.po b/po/da_DK.po
index f971c80..1c6b18c 100644
--- a/po/da_DK.po
+++ b/po/da_DK.po
@@ -75,6 +75,9 @@ msgstr ""
msgid "Not playing the same recording as from request."
msgstr ""
+msgid "Attempt to delete recording currently in playback."
+msgstr ""
+
msgid "Epg error"
msgstr ""
@@ -561,6 +564,12 @@ msgstr ""
msgid "If you encounter any bugs or would like to suggest new features, please use our bugtracker"
msgstr ""
+msgid "ERROR:"
+msgstr ""
+
+msgid "Deleted recording:"
+msgstr ""
+
msgid "List of recordings"
msgstr ""
@@ -570,6 +579,9 @@ msgstr ""
msgid "Click to view details."
msgstr ""
+msgid "Delete this recording from hard disc!"
+msgstr ""
+
msgid "play this recording."
msgstr ""
diff --git a/po/de_DE.po b/po/de_DE.po
index 9a97d89..10373d3 100644
--- a/po/de_DE.po
+++ b/po/de_DE.po
@@ -60,22 +60,25 @@ msgid "On archive DVD No."
msgstr "Auf Archiv-DVD Nr."
msgid "Couldn't find channel or no channels available."
-msgstr ""
+msgstr "Kann das Programm nicht finden oder keine vorhanden."
msgid "Couldn't switch to channel."
-msgstr ""
+msgstr "Kann nicht zu dem Programm umschalten."
msgid "Couldn't find recording or no recordings available."
-msgstr ""
+msgstr "Kann die Aufnahme nicht finden oder keine Aufnahmen vorhanden."
msgid "Cannot control playback!"
-msgstr ""
+msgstr "Kann die Wiedergabe nicht steuern."
msgid "Not playing a recording."
-msgstr ""
+msgstr "Es wird keine Aufnahme abgespielt."
msgid "Not playing the same recording as from request."
-msgstr ""
+msgstr "Es wird nicht die selbe Aufnahme abgespielt."
+
+msgid "Attempt to delete recording currently in playback."
+msgstr "Versuch die gerade abgepielte Aufnahme zu löschen."
msgid "Epg error"
msgstr "EPG Fehler"
@@ -87,7 +90,7 @@ msgid "Channel has no schedule"
msgstr "Kanal hat keine Programminfos"
msgid "Wrong event id"
-msgstr ""
+msgstr "Fehlerhafte Sendungs Id"
msgid "Required minimum version of epgsearch: "
msgstr "Benötigte Mindestversion von epgsearch: "
@@ -563,6 +566,12 @@ msgstr "Fehlerberichte und Vorschläge"
msgid "If you encounter any bugs or would like to suggest new features, please use our bugtracker"
msgstr "Für Fehler oder Verbesserungsvorschläge steht unser Bugtracker bereit"
+msgid "ERROR:"
+msgstr "FEHLER:"
+
+msgid "Deleted recording:"
+msgstr "Gelöschte Aufnahme:"
+
msgid "List of recordings"
msgstr "Liste der Aufnahmen"
@@ -572,6 +581,9 @@ msgstr "Keine Aufnahmen vorhanden"
msgid "Click to view details."
msgstr "Für Details klicken."
+msgid "Delete this recording from hard disc!"
+msgstr "Diese Aufnahme von der Festplatte löschen!"
+
msgid "play this recording."
msgstr "Diese Aufnahme abspielen."
@@ -748,5 +760,3 @@ msgstr "Ausführliche Ansicht"
msgid "List view"
msgstr "Listenansicht"
-
-
diff --git a/po/el_GR.po b/po/el_GR.po
index 42121f7..e554e28 100644
--- a/po/el_GR.po
+++ b/po/el_GR.po
@@ -75,6 +75,9 @@ msgstr ""
msgid "Not playing the same recording as from request."
msgstr ""
+msgid "Attempt to delete recording currently in playback."
+msgstr ""
+
msgid "Epg error"
msgstr ""
@@ -561,6 +564,12 @@ msgstr ""
msgid "If you encounter any bugs or would like to suggest new features, please use our bugtracker"
msgstr ""
+msgid "ERROR:"
+msgstr ""
+
+msgid "Deleted recording:"
+msgstr ""
+
msgid "List of recordings"
msgstr ""
@@ -570,6 +579,9 @@ msgstr ""
msgid "Click to view details."
msgstr ""
+msgid "Delete this recording from hard disc!"
+msgstr ""
+
msgid "play this recording."
msgstr ""
diff --git a/po/es_ES.po b/po/es_ES.po
index 32fea29..89d6e51 100644
--- a/po/es_ES.po
+++ b/po/es_ES.po
@@ -75,6 +75,9 @@ msgstr ""
msgid "Not playing the same recording as from request."
msgstr ""
+msgid "Attempt to delete recording currently in playback."
+msgstr ""
+
msgid "Epg error"
msgstr ""
@@ -561,6 +564,12 @@ msgstr ""
msgid "If you encounter any bugs or would like to suggest new features, please use our bugtracker"
msgstr ""
+msgid "ERROR:"
+msgstr ""
+
+msgid "Deleted recording:"
+msgstr ""
+
msgid "List of recordings"
msgstr ""
@@ -570,6 +579,9 @@ msgstr ""
msgid "Click to view details."
msgstr ""
+msgid "Delete this recording from hard disc!"
+msgstr ""
+
msgid "play this recording."
msgstr ""
diff --git a/po/et_EE.po b/po/et_EE.po
index ed429dc..d228a6c 100644
--- a/po/et_EE.po
+++ b/po/et_EE.po
@@ -75,6 +75,9 @@ msgstr ""
msgid "Not playing the same recording as from request."
msgstr ""
+msgid "Attempt to delete recording currently in playback."
+msgstr ""
+
msgid "Epg error"
msgstr ""
@@ -561,6 +564,12 @@ msgstr ""
msgid "If you encounter any bugs or would like to suggest new features, please use our bugtracker"
msgstr ""
+msgid "ERROR:"
+msgstr ""
+
+msgid "Deleted recording:"
+msgstr ""
+
msgid "List of recordings"
msgstr ""
@@ -570,6 +579,9 @@ msgstr ""
msgid "Click to view details."
msgstr ""
+msgid "Delete this recording from hard disc!"
+msgstr ""
+
msgid "play this recording."
msgstr ""
diff --git a/po/fi_FI.po b/po/fi_FI.po
index b3784aa..4368f34 100644
--- a/po/fi_FI.po
+++ b/po/fi_FI.po
@@ -75,6 +75,9 @@ msgstr "Tallennetta ei toisteta."
msgid "Not playing the same recording as from request."
msgstr "Pyydettyä tallennetta ei toisteta."
+msgid "Attempt to delete recording currently in playback."
+msgstr ""
+
msgid "Epg error"
msgstr "Ohjelmaoppaan virhe"
@@ -561,6 +564,13 @@ msgstr "Virheraportoinnit ja parannusehdotukset"
msgid "If you encounter any bugs or would like to suggest new features, please use our bugtracker"
msgstr "Voit raportoida sekä virheet että parannusehdotukset suoraan havaintotietokantaan"
+msgid "ERROR:"
+msgstr ""
+
+#, fuzzy
+msgid "Deleted recording:"
+msgstr "Sarjatallennus"
+
msgid "List of recordings"
msgstr "Tallennelistaus"
@@ -570,6 +580,10 @@ msgstr "Tallenteita ei löydy"
msgid "Click to view details."
msgstr "Napsauta katsoaksesi lisätietoja."
+#, fuzzy
+msgid "Delete this recording from hard disc!"
+msgstr "Poista tallenteet ... päivän jälkeen"
+
msgid "play this recording."
msgstr "Toista tallenne"
@@ -721,7 +735,7 @@ msgid "%a, %b %d"
msgstr "%a, %d.%m."
msgid "Favorites"
-msgstr ""
+msgstr "Suosikit"
msgid "View the schedule of this channel"
msgstr "Näytä ohjelmisto kanavalta"
@@ -747,3 +761,5 @@ msgstr "Ruudukkonäkymä"
msgid "List view"
msgstr "Listanäkymä"
+#~ msgid "channels"
+#~ msgstr "kanavat"
diff --git a/po/fr_FR.po b/po/fr_FR.po
index 64c71c8..de6d1f6 100644
--- a/po/fr_FR.po
+++ b/po/fr_FR.po
@@ -79,6 +79,9 @@ msgstr ""
msgid "Not playing the same recording as from request."
msgstr ""
+msgid "Attempt to delete recording currently in playback."
+msgstr ""
+
msgid "Epg error"
msgstr ""
@@ -565,6 +568,13 @@ msgstr "Bogues et suggestions"
msgid "If you encounter any bugs or would like to suggest new features, please use our bugtracker"
msgstr "Si vous rencontrez n'importe quels bogue ou voudriez suggérer de nouveaux dispositifs, employer notre bugtracker svp"
+msgid "ERROR:"
+msgstr ""
+
+#, fuzzy
+msgid "Deleted recording:"
+msgstr "Enregistrement de série"
+
msgid "List of recordings"
msgstr "Liste des enregistrements"
@@ -574,6 +584,10 @@ msgstr "Pas d'enregistrement"
msgid "Click to view details."
msgstr "Clic pour voire les détails."
+#, fuzzy
+msgid "Delete this recording from hard disc!"
+msgstr "Effacer l'enregistrement après ... jours"
+
msgid "play this recording."
msgstr "lire cette enregistrement."
@@ -751,5 +765,3 @@ msgstr "Vue détailée"
msgid "List view"
msgstr "Vue en liste"
-
-
diff --git a/po/hr_HR.po b/po/hr_HR.po
index 90897ca..952adab 100644
--- a/po/hr_HR.po
+++ b/po/hr_HR.po
@@ -76,6 +76,9 @@ msgstr ""
msgid "Not playing the same recording as from request."
msgstr ""
+msgid "Attempt to delete recording currently in playback."
+msgstr ""
+
msgid "Epg error"
msgstr ""
@@ -562,6 +565,12 @@ msgstr ""
msgid "If you encounter any bugs or would like to suggest new features, please use our bugtracker"
msgstr ""
+msgid "ERROR:"
+msgstr ""
+
+msgid "Deleted recording:"
+msgstr ""
+
msgid "List of recordings"
msgstr ""
@@ -571,6 +580,9 @@ msgstr ""
msgid "Click to view details."
msgstr ""
+msgid "Delete this recording from hard disc!"
+msgstr ""
+
msgid "play this recording."
msgstr ""
diff --git a/po/hu_HU.po b/po/hu_HU.po
index c10fb6c..4395b9a 100644
--- a/po/hu_HU.po
+++ b/po/hu_HU.po
@@ -76,6 +76,9 @@ msgstr ""
msgid "Not playing the same recording as from request."
msgstr ""
+msgid "Attempt to delete recording currently in playback."
+msgstr ""
+
msgid "Epg error"
msgstr ""
@@ -562,6 +565,12 @@ msgstr ""
msgid "If you encounter any bugs or would like to suggest new features, please use our bugtracker"
msgstr ""
+msgid "ERROR:"
+msgstr ""
+
+msgid "Deleted recording:"
+msgstr ""
+
msgid "List of recordings"
msgstr ""
@@ -571,6 +580,9 @@ msgstr ""
msgid "Click to view details."
msgstr ""
+msgid "Delete this recording from hard disc!"
+msgstr ""
+
msgid "play this recording."
msgstr ""
diff --git a/po/it_IT.po b/po/it_IT.po
index bb221a5..a1f6328 100644
--- a/po/it_IT.po
+++ b/po/it_IT.po
@@ -77,6 +77,9 @@ msgstr "Nessuna registrazione in riproduzione."
msgid "Not playing the same recording as from request."
msgstr "Riproduzione di una registrazione diversa da quella richiesta."
+msgid "Attempt to delete recording currently in playback."
+msgstr ""
+
msgid "Epg error"
msgstr "Errore EPG"
@@ -563,6 +566,13 @@ msgstr "Rapporto errori e proposte"
msgid "If you encounter any bugs or would like to suggest new features, please use our bugtracker"
msgstr "Se riscontri degli errori o vuoi chiedere nuove funzioni utilizza il nostro bugtracker"
+msgid "ERROR:"
+msgstr ""
+
+#, fuzzy
+msgid "Deleted recording:"
+msgstr "Registrazione serie"
+
msgid "List of recordings"
msgstr "Lista registrazioni"
@@ -572,6 +582,10 @@ msgstr "Nessuna registrazione"
msgid "Click to view details."
msgstr "Clicca per vedere i dettagli."
+#, fuzzy
+msgid "Delete this recording from hard disc!"
+msgstr "Cancella registrazione dopo ... giorni"
+
msgid "play this recording."
msgstr "Riproduci questa registrazione."
@@ -748,5 +762,3 @@ msgstr "Vedi come dettagli"
msgid "List view"
msgstr "Vedi come elenco"
-
-
diff --git a/po/nl_NL.po b/po/nl_NL.po
index a51766c..f8ffd58 100644
--- a/po/nl_NL.po
+++ b/po/nl_NL.po
@@ -78,6 +78,9 @@ msgstr ""
msgid "Not playing the same recording as from request."
msgstr ""
+msgid "Attempt to delete recording currently in playback."
+msgstr ""
+
msgid "Epg error"
msgstr ""
@@ -564,6 +567,13 @@ msgstr ""
msgid "If you encounter any bugs or would like to suggest new features, please use our bugtracker"
msgstr ""
+msgid "ERROR:"
+msgstr ""
+
+#, fuzzy
+msgid "Deleted recording:"
+msgstr "Serie's opnemen"
+
msgid "List of recordings"
msgstr ""
@@ -573,6 +583,9 @@ msgstr ""
msgid "Click to view details."
msgstr ""
+msgid "Delete this recording from hard disc!"
+msgstr ""
+
msgid "play this recording."
msgstr ""
@@ -750,4 +763,3 @@ msgstr ""
msgid "List view"
msgstr ""
-
diff --git a/po/nn_NO.po b/po/nn_NO.po
index dcc1125..399bf83 100644
--- a/po/nn_NO.po
+++ b/po/nn_NO.po
@@ -76,6 +76,9 @@ msgstr ""
msgid "Not playing the same recording as from request."
msgstr ""
+msgid "Attempt to delete recording currently in playback."
+msgstr ""
+
msgid "Epg error"
msgstr ""
@@ -562,6 +565,12 @@ msgstr ""
msgid "If you encounter any bugs or would like to suggest new features, please use our bugtracker"
msgstr ""
+msgid "ERROR:"
+msgstr ""
+
+msgid "Deleted recording:"
+msgstr ""
+
msgid "List of recordings"
msgstr ""
@@ -571,6 +580,9 @@ msgstr ""
msgid "Click to view details."
msgstr ""
+msgid "Delete this recording from hard disc!"
+msgstr ""
+
msgid "play this recording."
msgstr ""
diff --git a/po/pl_PL.po b/po/pl_PL.po
index 9ba7158..1e65b2d 100644
--- a/po/pl_PL.po
+++ b/po/pl_PL.po
@@ -75,6 +75,9 @@ msgstr ""
msgid "Not playing the same recording as from request."
msgstr ""
+msgid "Attempt to delete recording currently in playback."
+msgstr ""
+
msgid "Epg error"
msgstr ""
@@ -561,6 +564,12 @@ msgstr ""
msgid "If you encounter any bugs or would like to suggest new features, please use our bugtracker"
msgstr ""
+msgid "ERROR:"
+msgstr ""
+
+msgid "Deleted recording:"
+msgstr ""
+
msgid "List of recordings"
msgstr ""
@@ -570,6 +579,9 @@ msgstr ""
msgid "Click to view details."
msgstr ""
+msgid "Delete this recording from hard disc!"
+msgstr ""
+
msgid "play this recording."
msgstr ""
diff --git a/po/pt_PT.po b/po/pt_PT.po
index 40e911e..21f07c0 100644
--- a/po/pt_PT.po
+++ b/po/pt_PT.po
@@ -75,6 +75,9 @@ msgstr ""
msgid "Not playing the same recording as from request."
msgstr ""
+msgid "Attempt to delete recording currently in playback."
+msgstr ""
+
msgid "Epg error"
msgstr ""
@@ -561,6 +564,12 @@ msgstr ""
msgid "If you encounter any bugs or would like to suggest new features, please use our bugtracker"
msgstr ""
+msgid "ERROR:"
+msgstr ""
+
+msgid "Deleted recording:"
+msgstr ""
+
msgid "List of recordings"
msgstr ""
@@ -570,6 +579,9 @@ msgstr ""
msgid "Click to view details."
msgstr ""
+msgid "Delete this recording from hard disc!"
+msgstr ""
+
msgid "play this recording."
msgstr ""
diff --git a/po/ro_RO.po b/po/ro_RO.po
index 1e60598..8201ce1 100644
--- a/po/ro_RO.po
+++ b/po/ro_RO.po
@@ -76,6 +76,9 @@ msgstr ""
msgid "Not playing the same recording as from request."
msgstr ""
+msgid "Attempt to delete recording currently in playback."
+msgstr ""
+
msgid "Epg error"
msgstr ""
@@ -562,6 +565,12 @@ msgstr ""
msgid "If you encounter any bugs or would like to suggest new features, please use our bugtracker"
msgstr ""
+msgid "ERROR:"
+msgstr ""
+
+msgid "Deleted recording:"
+msgstr ""
+
msgid "List of recordings"
msgstr ""
@@ -571,6 +580,9 @@ msgstr ""
msgid "Click to view details."
msgstr ""
+msgid "Delete this recording from hard disc!"
+msgstr ""
+
msgid "play this recording."
msgstr ""
diff --git a/po/ru_RU.po b/po/ru_RU.po
index 7158092..1936684 100644
--- a/po/ru_RU.po
+++ b/po/ru_RU.po
@@ -75,6 +75,9 @@ msgstr ""
msgid "Not playing the same recording as from request."
msgstr ""
+msgid "Attempt to delete recording currently in playback."
+msgstr ""
+
msgid "Epg error"
msgstr ""
@@ -561,6 +564,12 @@ msgstr ""
msgid "If you encounter any bugs or would like to suggest new features, please use our bugtracker"
msgstr ""
+msgid "ERROR:"
+msgstr ""
+
+msgid "Deleted recording:"
+msgstr ""
+
msgid "List of recordings"
msgstr ""
@@ -570,6 +579,9 @@ msgstr ""
msgid "Click to view details."
msgstr ""
+msgid "Delete this recording from hard disc!"
+msgstr ""
+
msgid "play this recording."
msgstr ""
diff --git a/po/sl_SI.po b/po/sl_SI.po
index 87be461..1ed3282 100644
--- a/po/sl_SI.po
+++ b/po/sl_SI.po
@@ -76,6 +76,9 @@ msgstr ""
msgid "Not playing the same recording as from request."
msgstr ""
+msgid "Attempt to delete recording currently in playback."
+msgstr ""
+
msgid "Epg error"
msgstr ""
@@ -562,6 +565,12 @@ msgstr ""
msgid "If you encounter any bugs or would like to suggest new features, please use our bugtracker"
msgstr ""
+msgid "ERROR:"
+msgstr ""
+
+msgid "Deleted recording:"
+msgstr ""
+
msgid "List of recordings"
msgstr ""
@@ -571,6 +580,9 @@ msgstr ""
msgid "Click to view details."
msgstr ""
+msgid "Delete this recording from hard disc!"
+msgstr ""
+
msgid "play this recording."
msgstr ""
diff --git a/po/sv_SE.po b/po/sv_SE.po
index c97fce4..95b7e80 100644
--- a/po/sv_SE.po
+++ b/po/sv_SE.po
@@ -76,6 +76,9 @@ msgstr ""
msgid "Not playing the same recording as from request."
msgstr ""
+msgid "Attempt to delete recording currently in playback."
+msgstr ""
+
msgid "Epg error"
msgstr ""
@@ -562,6 +565,12 @@ msgstr ""
msgid "If you encounter any bugs or would like to suggest new features, please use our bugtracker"
msgstr ""
+msgid "ERROR:"
+msgstr ""
+
+msgid "Deleted recording:"
+msgstr ""
+
msgid "List of recordings"
msgstr ""
@@ -571,6 +580,9 @@ msgstr ""
msgid "Click to view details."
msgstr ""
+msgid "Delete this recording from hard disc!"
+msgstr ""
+
msgid "play this recording."
msgstr ""
diff --git a/po/tr_TR.po b/po/tr_TR.po
index 356a3f1..de0c029 100644
--- a/po/tr_TR.po
+++ b/po/tr_TR.po
@@ -76,6 +76,9 @@ msgstr ""
msgid "Not playing the same recording as from request."
msgstr ""
+msgid "Attempt to delete recording currently in playback."
+msgstr ""
+
msgid "Epg error"
msgstr ""
@@ -562,6 +565,12 @@ msgstr ""
msgid "If you encounter any bugs or would like to suggest new features, please use our bugtracker"
msgstr ""
+msgid "ERROR:"
+msgstr ""
+
+msgid "Deleted recording:"
+msgstr ""
+
msgid "List of recordings"
msgstr ""
@@ -571,6 +580,9 @@ msgstr ""
msgid "Click to view details."
msgstr ""
+msgid "Delete this recording from hard disc!"
+msgstr ""
+
msgid "play this recording."
msgstr ""
diff --git a/recman.cpp b/recman.cpp
index 153e9dd..26d78d9 100644
--- a/recman.cpp
+++ b/recman.cpp
@@ -90,6 +90,16 @@ namespace vdrlive {
return 0;
}
+ void RecordingsManager::DeleteRecording(cRecording const * recording) const
+ {
+ if (!recording)
+ return;
+
+ string name(recording->FileName());
+ const_cast<cRecording *>(recording)->Delete();
+ Recordings.DelByName(name.c_str());
+ }
+
bool RecordingsManager::IsArchived(cRecording const * recording)
{
string filename = recording->FileName();
@@ -151,7 +161,7 @@ namespace vdrlive {
// StateChanged must be executed every time, so not part of
// the short cut evaluation in the if statement below.
bool stateChanged = Recordings.StateChanged(m_recordingsState);
- if ((!m_recTree) || (!m_recList) || stateChanged) {
+ if (stateChanged || (!m_recTree) || (!m_recList)) {
if (stateChanged) {
m_recTree.reset();
m_recList.reset();
@@ -197,12 +207,12 @@ namespace vdrlive {
RecordingsItem(name, parent),
m_level(level)
{
- esyslog("REC: C: dir %s -> %s", name.c_str(), parent ? parent->Name().c_str() : "ROOT");
+ // dsyslog("REC: C: dir %s -> %s", name.c_str(), parent ? parent->Name().c_str() : "ROOT");
}
RecordingsItemDir::~RecordingsItemDir()
{
- esyslog("REC: D: dir %s", Name().c_str());
+ // dsyslog("REC: D: dir %s", Name().c_str());
}
@@ -214,12 +224,12 @@ namespace vdrlive {
m_recording(recording),
m_id(id)
{
- esyslog("REC: C: rec %s -> %s", name.c_str(), parent->Name().c_str());
+ // dsyslog("REC: C: rec %s -> %s", name.c_str(), parent->Name().c_str());
}
RecordingsItemRec::~RecordingsItemRec()
{
- esyslog("REC: D: rec %s", Name().c_str());
+ // dsyslog("REC: D: rec %s", Name().c_str());
}
time_t RecordingsItemRec::StartTime() const
@@ -340,6 +350,12 @@ namespace vdrlive {
/**
* Implementation of class RecordingsTreePtr:
*/
+ RecordingsTreePtr::RecordingsTreePtr() :
+ shared_ptr<RecordingsTree>(),
+ m_recManPtr()
+ {
+ }
+
RecordingsTreePtr::RecordingsTreePtr(RecordingsManagerPtr recManPtr, std::tr1::shared_ptr< RecordingsTree > recTree) :
shared_ptr<RecordingsTree>(recTree),
m_recManPtr(recManPtr)
diff --git a/recman.h b/recman.h
index 0f8b8c5..45265b3 100644
--- a/recman.h
+++ b/recman.h
@@ -25,7 +25,7 @@ namespace vdrlive {
typedef std::tr1::shared_ptr< RecordingsManager > RecordingsManagerPtr;
typedef std::tr1::shared_ptr< RecordingsItem > RecordingsItemPtr;
- // typedef std::tr1::weak_ptr< RecordingsItem > RecordingsItemWeakPtr;
+ typedef std::tr1::weak_ptr< RecordingsItem > RecordingsItemWeakPtr;
typedef std::multimap< std::string, RecordingsItemPtr > RecordingsMap;
@@ -69,6 +69,12 @@ namespace vdrlive {
cRecording const* GetByMd5Hash(std::string const & hash) const;
/**
+ * Delete a recording with the given hash according to
+ * VDRs recording deletion mechanisms.
+ */
+ void DeleteRecording(cRecording const * recording) const;
+
+ /**
* Determine wether the recording has been archived on
* removable media (e.g. DVD-ROM)
*/
@@ -127,7 +133,7 @@ namespace vdrlive {
private:
std::string m_name;
RecordingsMap m_entries;
- RecordingsItemPtr m_parent;
+ RecordingsItemWeakPtr m_parent;
};
@@ -217,6 +223,7 @@ namespace vdrlive {
RecordingsTreePtr(RecordingsManagerPtr recManPtr, std::tr1::shared_ptr< RecordingsTree > recTree);
public:
+ RecordingsTreePtr();
virtual ~RecordingsTreePtr();
private:
diff --git a/tasks.cpp b/tasks.cpp
index d7acaf3..9f20190 100644
--- a/tasks.cpp
+++ b/tasks.cpp
@@ -161,7 +161,7 @@ void BackwardRecordingTask::Action()
RecordingsManagerPtr recordings = LiveRecordingsManager();
cRecording const* recording = recordings->GetByMd5Hash( m_recording );
if ( recording == 0 ) {
- SetError( tr("Couldn't find recording or no recordings available.") );
+ SetError(tr("Couldn't find recording or no recordings available."));
return;
}
@@ -186,6 +186,27 @@ void BackwardRecordingTask::Action()
replayControl->Backward();
}
+
+void RemoveRecordingTask::Action()
+{
+ RecordingsManagerPtr recordings = LiveRecordingsManager();
+ cRecording const * recording = recordings->GetByMd5Hash( m_recording );
+ if ( recording == 0 ) {
+ SetError( tr("Couldn't find recording or no recordings available.") );
+ return;
+ }
+
+ m_recName = recording->Name();
+
+ const char *current = NowReplaying();
+ if (current && (0 == strcmp(current, recording->FileName()))) {
+ SetError(tr("Attempt to delete recording currently in playback."));
+ return;
+ }
+
+ recordings->DeleteRecording(recording);
+}
+
TaskManager::TaskManager()
{
}
diff --git a/tasks.h b/tasks.h
index 2a269fd..787be96 100644
--- a/tasks.h
+++ b/tasks.h
@@ -139,6 +139,21 @@ public:
virtual void Action();
};
+class RemoveRecordingTask: public RecordingTask
+{
+public:
+ explicit RemoveRecordingTask( std::string const& recording )
+ : RecordingTask(recording)
+ {}
+
+ virtual void Action();
+
+ std::string const & RecName() const { return m_recName; }
+
+private:
+ std::string m_recName;
+};
+
TaskManager& LiveTaskManager();