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