diff options
author | David Teirney <github@teirney.net> | 2011-09-09 18:42:13 -0700 |
---|---|---|
committer | David Teirney <github@teirney.net> | 2011-09-09 18:42:13 -0700 |
commit | 9cba0132dfb3bd2f64f72492f12569f0bfdfcba6 (patch) | |
tree | d3efefb73aa8266e40e2a588bfae8910b86e9923 /lib | |
parent | f43dcfa8753ebb631157eddb2934ade86ac814a9 (diff) | |
parent | df4727f8688d8461788b1209786d1a0be6215877 (diff) |
Merge pull request #405 from dteirney/myth
Fix so Myth recordings are deleted immediately in the UI when using Myth 0.24
Diffstat (limited to 'lib')
-rw-r--r-- | lib/cmyth/Win32/libcmyth.def | 1 | ||||
-rw-r--r-- | lib/cmyth/Win32/libcmyth.vcproj | 4 | ||||
-rw-r--r-- | lib/cmyth/include/cmyth/cmyth.h | 8 | ||||
-rw-r--r-- | lib/cmyth/libcmyth/proginfo.c | 32 |
4 files changed, 39 insertions, 6 deletions
diff --git a/lib/cmyth/Win32/libcmyth.def b/lib/cmyth/Win32/libcmyth.def index 2386330a24..7ea435670f 100644 --- a/lib/cmyth/Win32/libcmyth.def +++ b/lib/cmyth/Win32/libcmyth.def @@ -131,6 +131,7 @@ EXPORTS cmyth_proginfo_rec_start cmyth_proginfo_rec_end cmyth_proginfo_rec_status + cmyth_proginfo_flags cmyth_proginfo_get_detail cmyth_proginfo_compare cmyth_proginfo_host diff --git a/lib/cmyth/Win32/libcmyth.vcproj b/lib/cmyth/Win32/libcmyth.vcproj index c7cc066e73..55cf9af0ed 100644 --- a/lib/cmyth/Win32/libcmyth.vcproj +++ b/lib/cmyth/Win32/libcmyth.vcproj @@ -42,7 +42,7 @@ <Tool Name="VCCLCompilerTool" Optimization="0" - AdditionalIncludeDirectories="..;../include;include;../librefmem;../libcmyth;../../../win32" + AdditionalIncludeDirectories="..;../include;include;../librefmem;../libcmyth" PreprocessorDefinitions="WIN32;DEBUG;_LIB;inline=__inline; _CRT_SECURE_NO_WARNINGS" MinimalRebuild="true" BasicRuntimeChecks="3" @@ -120,7 +120,7 @@ /> <Tool Name="VCCLCompilerTool" - AdditionalIncludeDirectories="..;../include;include;../librefmem;../libcmyth;../../../win32" + AdditionalIncludeDirectories="..;../include;include;../librefmem;../libcmyth" PreprocessorDefinitions="WIN32;NDEBUG;_LIB;inline=__inline; _CRT_SECURE_NO_WARNINGS" RuntimeLibrary="2" UsePrecompiledHeader="0" diff --git a/lib/cmyth/include/cmyth/cmyth.h b/lib/cmyth/include/cmyth/cmyth.h index ca24853ac2..d09aa64196 100644 --- a/lib/cmyth/include/cmyth/cmyth.h +++ b/lib/cmyth/include/cmyth/cmyth.h @@ -841,6 +841,14 @@ extern cmyth_proginfo_rec_status_t cmyth_proginfo_rec_status( cmyth_proginfo_t prog); /** + * Retrieve the flags associated with a program. + * \param prog proginfo handle + * \return flags + */ +extern unsigned long cmyth_proginfo_flags( + cmyth_proginfo_t prog); + +/** * Retrieve the size, in bytes, of a program. * \param prog proginfo handle * \return program length diff --git a/lib/cmyth/libcmyth/proginfo.c b/lib/cmyth/libcmyth/proginfo.c index 0b957e52d4..b175637ca9 100644 --- a/lib/cmyth/libcmyth/proginfo.c +++ b/lib/cmyth/libcmyth/proginfo.c @@ -478,9 +478,9 @@ delete_command(cmyth_conn_t control, cmyth_proginfo_t prog, char *cmd) sprintf(buf + strlen(buf), "%s[]:[]", end_ts); if (control->conn_version < 57) { sprintf(buf + strlen(buf), "%s[]:[]", S(prog->proginfo_unknown_0)); // "duplicate" - sprintf(buf + strlen(buf), "%ld[]:[]", 0); // "shareable" + sprintf(buf + strlen(buf), "%ld[]:[]", 0L); // "shareable" } - sprintf(buf + strlen(buf), "%ld[]:[]", 0); // "findid" + sprintf(buf + strlen(buf), "%ld[]:[]", 0L); // "findid" sprintf(buf + strlen(buf), "%s[]:[]", S(prog->proginfo_hostname)); sprintf(buf + strlen(buf), "%ld[]:[]", prog->proginfo_source_id); sprintf(buf + strlen(buf), "%ld[]:[]", prog->proginfo_card_id); @@ -1201,6 +1201,30 @@ cmyth_proginfo_rec_status(cmyth_proginfo_t prog) } /* + * cmyth_proginfo_flags(cmyth_proginfo_t prog) + * + * Scope: PUBLIC + * + * Description + * + * Retrieves the flags mask from a program info structure. + * + * Return Value: + * + * Success: The program flag mask. + * + * Failure: 0 (an invalid status) + */ +unsigned long +cmyth_proginfo_flags(cmyth_proginfo_t prog) +{ + if (!prog) { + return 0; + } + return prog->proginfo_program_flags; +} + +/* * cmyth_proginfo_prodyear(cmyth_proginfo_t prog) * * @@ -1328,9 +1352,9 @@ fill_command(cmyth_conn_t control, cmyth_proginfo_t prog, char *cmd) sprintf(buf + strlen(buf), "%s[]:[]", end_ts); if (control->conn_version < 57) { sprintf(buf + strlen(buf), "%s[]:[]", S(prog->proginfo_unknown_0)); // "duplicate" - sprintf(buf + strlen(buf), "%ld[]:[]", 0); // "shareable" + sprintf(buf + strlen(buf), "%ld[]:[]", 0L); // "shareable" } - sprintf(buf + strlen(buf), "%ld[]:[]", 0); // "findid" + sprintf(buf + strlen(buf), "%ld[]:[]", 0L); // "findid" sprintf(buf + strlen(buf), "%s[]:[]", S(prog->proginfo_hostname)); sprintf(buf + strlen(buf), "%ld[]:[]", prog->proginfo_source_id); sprintf(buf + strlen(buf), "%ld[]:[]", prog->proginfo_card_id); |