mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 15:01:48 +02:00
Add episode to manual timer
This commit is contained in:
parent
5d9ed1439a
commit
b96f800240
2
config.c
2
config.c
@ -34,6 +34,7 @@ cTVGuideConfig::cTVGuideConfig() {
|
||||
channelJumpMode = eNumJump;
|
||||
jumpChannels = 0;
|
||||
blueKeyMode = 2;
|
||||
addSubtitleToTimer = 1;
|
||||
closeOnSwitch = 1;
|
||||
numkeyMode = 0;
|
||||
useRemoteTimers = 0;
|
||||
@ -295,6 +296,7 @@ bool cTVGuideConfig::SetupParse(const char *Name, const char *Value) {
|
||||
else if (strcmp(Name, "footerHeightPercent") == 0) footerHeightPercent = atoi(Value);
|
||||
else if (strcmp(Name, "instRecFolderMode") == 0) instRecFolderMode = atoi(Value);
|
||||
else if (strcmp(Name, "instRecFixedFolder") == 0) instRecFixedFolder = Value;
|
||||
else if (strcmp(Name, "addSubtitleToTimer") == 0) addSubtitleToTimer = atoi(Value);
|
||||
else if (strcmp(Name, "favWhatsOnNow") == 0) favWhatsOnNow = atoi(Value);
|
||||
else if (strcmp(Name, "favWhatsOnNext") == 0) favWhatsOnNext = atoi(Value);
|
||||
else if (strcmp(Name, "favUseTime1") == 0) favUseTime1 = atoi(Value);
|
||||
|
7
config.h
7
config.h
@ -43,6 +43,12 @@ enum eInstRecFolderMode {
|
||||
eFolderFixed
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
addSubtitleNever = 0,
|
||||
addSubtitleSmart,
|
||||
addSubtitleAlways
|
||||
} addSubtitleToTimerMode;
|
||||
|
||||
class cTVGuideConfig {
|
||||
private:
|
||||
cString checkSlashAtEnd(std::string path);
|
||||
@ -82,6 +88,7 @@ class cTVGuideConfig {
|
||||
int channelJumpMode;
|
||||
int jumpChannels;
|
||||
int blueKeyMode;
|
||||
int addSubtitleToTimer;
|
||||
int closeOnSwitch;
|
||||
int numkeyMode;
|
||||
int useRemoteTimers;
|
||||
|
14
po/ca_ES.po
14
po/ca_ES.po
@ -3,7 +3,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: vdr-tvguide 0.0.1\n"
|
||||
"Report-Msgid-Bugs-To: <see README>\n"
|
||||
"POT-Creation-Date: 2020-02-12 17:37+0100\n"
|
||||
"POT-Creation-Date: 2020-02-17 14:30+0100\n"
|
||||
"PO-Revision-Date: 2013-09-21 17:49+0200\n"
|
||||
"Last-Translator: My friend <Sampep> Thanks David <Gabychan> <gbonich@gmail.com>\n"
|
||||
"Language-Team: \n"
|
||||
@ -891,15 +891,27 @@ msgstr ""
|
||||
msgid "Use fixed folder"
|
||||
msgstr ""
|
||||
|
||||
msgid "smart"
|
||||
msgstr ""
|
||||
|
||||
msgid "Instant recording:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Folder for instant Recordings"
|
||||
msgstr ""
|
||||
|
||||
msgid "Folder"
|
||||
msgstr ""
|
||||
|
||||
msgid "Add episode to manual timers"
|
||||
msgstr ""
|
||||
|
||||
msgid "Use Remotetimers"
|
||||
msgstr "Utilitza temporitzadors remots"
|
||||
|
||||
msgid "Favorites:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Limit channels in favorites"
|
||||
msgstr ""
|
||||
|
||||
|
14
po/de_DE.po
14
po/de_DE.po
@ -3,7 +3,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: vdr-tvguide 0.0.1\n"
|
||||
"Report-Msgid-Bugs-To: <see README>\n"
|
||||
"POT-Creation-Date: 2020-02-12 17:37+0100\n"
|
||||
"POT-Creation-Date: 2020-02-17 14:30+0100\n"
|
||||
"PO-Revision-Date: 2012-08-25 17:49+0200\n"
|
||||
"Last-Translator: Horst\n"
|
||||
"Language-Team: \n"
|
||||
@ -888,15 +888,27 @@ msgstr "Verzeichnis aus Liste auswählen"
|
||||
msgid "Use fixed folder"
|
||||
msgstr "Festes Verzeichnis benutzen"
|
||||
|
||||
msgid "smart"
|
||||
msgstr "intelligent"
|
||||
|
||||
msgid "Instant recording:"
|
||||
msgstr "Sofortaufnahmen:"
|
||||
|
||||
msgid "Folder for instant Recordings"
|
||||
msgstr "Verzeichnis für Sofortaufnahmen"
|
||||
|
||||
msgid "Folder"
|
||||
msgstr "Verzeichnis"
|
||||
|
||||
msgid "Add episode to manual timers"
|
||||
msgstr "Untertitel in manuellen Timern"
|
||||
|
||||
msgid "Use Remotetimers"
|
||||
msgstr "RemoteTimers benutzen"
|
||||
|
||||
msgid "Favorites:"
|
||||
msgstr "Favoriten:"
|
||||
|
||||
msgid "Limit channels in favorites"
|
||||
msgstr "Kanäle in Favoriten beschränken"
|
||||
|
||||
|
14
po/it_IT.po
14
po/it_IT.po
@ -3,7 +3,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: vdr-tvguide 0.0.1\n"
|
||||
"Report-Msgid-Bugs-To: <see README>\n"
|
||||
"POT-Creation-Date: 2020-02-12 17:37+0100\n"
|
||||
"POT-Creation-Date: 2020-02-17 14:30+0100\n"
|
||||
"PO-Revision-Date: 2012-08-25 17:49+0200\n"
|
||||
"Last-Translator: fiveten_59\n"
|
||||
"Language-Team: \n"
|
||||
@ -888,15 +888,27 @@ msgstr "Scegli dall'elenco cartelle"
|
||||
msgid "Use fixed folder"
|
||||
msgstr "Usa cartella fissa"
|
||||
|
||||
msgid "smart"
|
||||
msgstr "intelligente"
|
||||
|
||||
msgid "Instant recording:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Folder for instant Recordings"
|
||||
msgstr "Cartella per la registrazione immediata"
|
||||
|
||||
msgid "Folder"
|
||||
msgstr "Cartella"
|
||||
|
||||
msgid "Add episode to manual timers"
|
||||
msgstr "Aggiungi episodi ai timer manuali"
|
||||
|
||||
msgid "Use Remotetimers"
|
||||
msgstr "Usa Remotetimers"
|
||||
|
||||
msgid "Favorites:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Limit channels in favorites"
|
||||
msgstr "Limite dei canali nei favoriti"
|
||||
|
||||
|
14
po/ru_RU.po
14
po/ru_RU.po
@ -3,7 +3,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: vdr-tvguide 1.0.0\n"
|
||||
"Report-Msgid-Bugs-To: <see README>\n"
|
||||
"POT-Creation-Date: 2020-02-12 17:37+0100\n"
|
||||
"POT-Creation-Date: 2020-02-17 14:30+0100\n"
|
||||
"PO-Revision-Date: 2013-09-25 17:49+0400\n"
|
||||
"Last-Translator: AmiD, ilya\n"
|
||||
"Language-Team: Russia-Cherepovets(wm.amid@gmail.com)\n"
|
||||
@ -888,15 +888,27 @@ msgstr ""
|
||||
msgid "Use fixed folder"
|
||||
msgstr ""
|
||||
|
||||
msgid "smart"
|
||||
msgstr ""
|
||||
|
||||
msgid "Instant recording:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Folder for instant Recordings"
|
||||
msgstr ""
|
||||
|
||||
msgid "Folder"
|
||||
msgstr ""
|
||||
|
||||
msgid "Add episode to manual timers"
|
||||
msgstr ""
|
||||
|
||||
msgid "Use Remotetimers"
|
||||
msgstr "RemoteTimers benutzen"
|
||||
|
||||
msgid "Favorites:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Limit channels in favorites"
|
||||
msgstr ""
|
||||
|
||||
|
14
po/sk_SK.po
14
po/sk_SK.po
@ -3,7 +3,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: vdr-tvguide 1.1.0\n"
|
||||
"Report-Msgid-Bugs-To: <see README>\n"
|
||||
"POT-Creation-Date: 2020-02-12 17:37+0100\n"
|
||||
"POT-Creation-Date: 2020-02-17 14:30+0100\n"
|
||||
"PO-Revision-Date: 2013-09-15 00:12+0100\n"
|
||||
"Last-Translator: Milan Hrala <hrala.milan@gmail.com>\n"
|
||||
"Language-Team: \n"
|
||||
@ -888,15 +888,27 @@ msgstr ""
|
||||
msgid "Use fixed folder"
|
||||
msgstr ""
|
||||
|
||||
msgid "smart"
|
||||
msgstr "chytrý"
|
||||
|
||||
msgid "Instant recording:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Folder for instant Recordings"
|
||||
msgstr ""
|
||||
|
||||
msgid "Folder"
|
||||
msgstr ""
|
||||
|
||||
msgid "Add episode to manual timers"
|
||||
msgstr "Prida¿ epizódy do ru¿ného ¿asova¿a"
|
||||
|
||||
msgid "Use Remotetimers"
|
||||
msgstr "Pou¾i» vzdialený plánovaè"
|
||||
|
||||
msgid "Favorites:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Limit channels in favorites"
|
||||
msgstr ""
|
||||
|
||||
|
17
recmanager.c
17
recmanager.c
@ -175,12 +175,25 @@ void cRecManager::SetTimerPath(cTimer *timer, const cEvent *event, std::string p
|
||||
return;
|
||||
}
|
||||
//Set choosen path
|
||||
bool addSubtitle = false;
|
||||
if (!isempty(event->ShortText())) { // add subtitle if present
|
||||
addSubtitle = (config.addSubtitleToTimer != addSubtitleNever);
|
||||
if (config.addSubtitleToTimer == addSubtitleSmart)
|
||||
if (event->Duration() > 80 * 60)
|
||||
addSubtitle = false;
|
||||
}
|
||||
cString newFileName;
|
||||
if (path.size() > 0) {
|
||||
std::replace(path.begin(), path.end(), '/', '~');
|
||||
newFileName = cString::sprintf("%s~%s", path.c_str(), timer->File());
|
||||
if (addSubtitle)
|
||||
newFileName = cString::sprintf("%s~%s~%s", path.c_str(), event->Title(), event->ShortText());
|
||||
else
|
||||
newFileName = cString::sprintf("%s~%s", path.c_str(), timer->File());
|
||||
} else {
|
||||
newFileName = event->Title();
|
||||
if (addSubtitle)
|
||||
newFileName = cString::sprintf("%s~%s", event->Title(), event->ShortText());
|
||||
else
|
||||
newFileName = event->Title();
|
||||
}
|
||||
timer->SetFile(*newFileName);
|
||||
}
|
||||
|
10
setup.c
10
setup.c
@ -108,6 +108,7 @@ void cTvguideSetup::Store(void) {
|
||||
SetupStore("footerHeightPercent", config.footerHeightPercent);
|
||||
SetupStore("instRecFolderMode", config.instRecFolderMode);
|
||||
SetupStore("instRecFixedFolder", config.instRecFixedFolder.c_str());
|
||||
SetupStore("AddSubtitleToTimerMode", config.addSubtitleToTimer);
|
||||
SetupStore("favWhatsOnNow", config.favWhatsOnNow);
|
||||
SetupStore("favWhatsOnNext", config.favWhatsOnNext);
|
||||
SetupStore("favUseTime1", config.favUseTime1);
|
||||
@ -410,6 +411,9 @@ cMenuSetupFavorites::cMenuSetupFavorites(cTVGuideConfig* data) : cMenuSetupSubM
|
||||
recFolderMode[1] = tr("Select from folder list");
|
||||
recFolderMode[2] = tr("Use fixed folder");
|
||||
strn0cpy(fixedFolder, data->instRecFixedFolder.c_str(), sizeof(fixedFolder));
|
||||
addSubtitleMode[0] = tr("never");
|
||||
addSubtitleMode[1] = tr("smart");
|
||||
addSubtitleMode[2] = tr("always");
|
||||
switchModeItems[0] = (tr("switch"));
|
||||
switchModeItems[1] = (tr("announce only"));
|
||||
switchModeItems[2] = (tr("ask for switch"));
|
||||
@ -420,13 +424,15 @@ void cMenuSetupFavorites::Set(void) {
|
||||
int currentItem = Current();
|
||||
Clear();
|
||||
|
||||
Add(new cMenuEditStraItem(tr("Folder for instant Recordings"), &tmpConfig->instRecFolderMode, 3, recFolderMode));
|
||||
Add(new cOsdItem(tr("Instant recording:"), osUnknown, false));
|
||||
Add(new cMenuEditStraItem(tr("Folder for instant Recordings"), &tmpConfig->instRecFolderMode, 3, recFolderMode));
|
||||
if (tmpConfig->instRecFolderMode == eFolderFixed) {
|
||||
Add(new cMenuEditStrItem(cString::sprintf("%s%s", *indent, tr("Folder")), fixedFolder, sizeof(fixedFolder), trVDR(FileNameChars)));
|
||||
}
|
||||
Add(new cMenuEditStraItem(tr("Add episode to manual timers"), &tmpConfig->addSubtitleToTimer, 3, addSubtitleMode));
|
||||
if (pRemoteTimers)
|
||||
Add(new cMenuEditBoolItem(tr("Use Remotetimers"), &tmpConfig->useRemoteTimers));
|
||||
|
||||
Add(new cOsdItem(tr("Favorites:"), osUnknown, false));
|
||||
Add(new cMenuEditBoolItem(tr("Limit channels in favorites"), &tmpConfig->favLimitChannels));
|
||||
if (tmpConfig->favLimitChannels) {
|
||||
Add(new cMenuEditChanItem(tr("Start Channel"), &tmpConfig->favStartChannel));
|
||||
|
1
setup.h
1
setup.h
@ -70,6 +70,7 @@ class cMenuSetupFavorites : public cMenuSetupSubMenu {
|
||||
char description3[256];
|
||||
char description4[256];
|
||||
const char * recFolderMode[3];
|
||||
const char * addSubtitleMode[3];
|
||||
const char * switchModeItems[3];
|
||||
char fixedFolder[256];
|
||||
void Set(void);
|
||||
|
1
tools.c
1
tools.c
@ -130,7 +130,6 @@ void ReadRecordingDirectories(std::vector<std::string> *folders, cList<cNestedIt
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************************
|
||||
* DrawRoundedCorners
|
||||
****************************************************************************************/
|
||||
|
Loading…
Reference in New Issue
Block a user