328 Commits

Author SHA1 Message Date
Wayne Merricks
8baed5b104 Random Idiocy fixes
Compilation fixes due to idiocy as usual (apologies)
2016-06-09 22:46:07 +01:00
Wayne Merricks
f1175cd2f2 Fixes for invalid NULL sql on date/times
Most files are simple swaps to get rid of extra " as a NULL return will give
invalid SQL if used as follows UPDATE x SET y="NULL";

See github issue 121 for more info.

Extra changes have been made to the following files:
* lib/rdcartslot.cpp
- Added a QDateTime variable to prevent EVENT_DATETIME becoming
  "2016-06-09" "NULL" as it was checked separately for date and time
* lib/rdcut.cpp
- Reworked START_DATETIME and END_DATETIME to save the SQL ifs.  I believe this
  makes it easier to read and understand.
- The >QDate(1900,1,1) and < 8000 is probably not needed but I left it there
  just in case.
* lib/rdescape_string.cpp
- Reworked to add extra " if the date is not NULL see issue 121
* lib/rdfeed.cpp && lib/rdpodcast.cpp
- Had to add a SetRow for QDateTime as with the string conversion the existing
  SetRow would add an extra set of "
* lib/rdsound_panel.cpp && rdairplay/log_traffic.cpp
        && utils/rddgimport/rddgimport.cpp
- Added a QString to contain EVENT_DATETIME to prevent double checks of date
  and time separately (similar to lib/rdcartslot.cpp)
* rdcatchd/rdcatchd.cpp
- Reverted the changes.  The RML here is not touching the DB so is fine, plus
  with the RDCheckDateTime changes you'd have extra " unless it was NULL
* tests/sas_switch_torture.cpp && sas_torture.cpp
- Included missing rdescape_string.h
2016-06-09 00:01:38 +01:00
Fred Gleason
31cd72a7a4 2016-06-07 Fred Gleason <fredg@paravelsystems.com>
* Refactored the 'RDSvc::import()' method in 'lib/rdsvc.cpp' to
	improve robustness and readability.
2016-06-07 12:56:52 -04:00
Fred Gleason
6a05fd90a5 2016-06-07 Fred Gleason <fredg@paravelsystems.com>
* Added code in 'lib/rdevent_line.cpp' and 'lib/rdsvc.cpp' to allow
	embedded traffic breaks to be specified with start time and length
	in the music schedule.
2016-06-07 08:36:59 -04:00
Wayne Merricks
b9452b8e8d lib/rdcart.cpp MySQL v5.7+ date/time changes 2016-06-04 20:27:14 +01:00
Wayne Merricks
58d75f0b5c lib/rdcut.cpp MySQL v5.7+ date/time changes 2016-06-04 20:20:55 +01:00
Wayne Merricks
5a07b62d0c lib/rdrecording.cpp MySQL v5.7+ date/time changes
Amended SetRow(QString,QTime) to contain time checks for MySQL v5.7+
2016-06-04 20:04:52 +01:00
Wayne Merricks
7506d1567c lib/rdlog_event.cpp MySQL v5.7+ date/time checks
Usual date changes and some TODOs for potentially invalid SELECT statements
2016-06-04 20:04:16 +01:00
Wayne Merricks
69ea83d570 lib/rdsound_panel.cpp MySQL v5.7+ Date Changes
Usual checks.  Line 1493 and 1537 is not required as they are derived from
current system datetime as per lines 1466 and 1526 respectively.
2016-06-04 20:04:09 +01:00
Wayne Merricks
1e37f6bbdc lib/rdcartslot.cpp Added MySQL v5.7+ changes
Added usual checks.  Line 690 EVENT_DATETIME is not required as this is derived
from current system datetime as per line 665.
2016-06-04 20:03:57 +01:00
Wayne Merricks
4523e8e90f lib/rdsvc.cpp Added null checks to purge_date as per MySQL v5.7+ changes
Changed purge_date to a QString so that it can be checked with the normal
RDCheckDateTime function.  Also means the QString.isEmpty check is a straight
forward QDate.isValid and in that case we can use QDate.toString rather than
formatting via RDCheckDateTime (and incurring another QDate.isValid check).
2016-06-04 20:03:39 +01:00
Wayne Merricks
e1c9caa987 lib/rdreport.cpp Reverted date checks on SELECT statements
Checking is probably not needed and even if it did find an invalid date it would
likely not return valid SQL e.g this is just one paraphrased example from the
code:

SELECT x FROM y WHERE EVENT_DATETIME<="NULL 00:00:00"

I've reverted back the two select changes for the daypart code and put a TODO
note there as a marker.
2016-06-04 20:03:24 +01:00
Wayne Merricks
1cf11af447 lib/rdfeed.cpp MySQL v5.7+ date/time null changes
Fixed in setX rather than Row as these are converted to QString before the DB
2016-06-04 20:03:10 +01:00
Wayne Merricks
e98a915f90 lib/rdlog.cpp MySQL v5.7+ date/time null changes
Fixed in SetRow for QDate/QTime and QDateTime
2016-06-04 20:03:03 +01:00
Wayne Merricks
c2560a671b lib/rdevent_line.cpp MySQL v5.7+ date/time null changes
Time is based on event_start_time however can't guarantee validity hence
RDCheckDateTime again.
2016-06-04 20:02:47 +01:00
Wayne Merricks
ace1a01225 lib/rdpodcast.cpp MySQL v5.7+ changes for date nulls
This doesn't use a dedicated setRow, instead it converts to QString and then
tries to insert the dates instead.

Amended setOrigin and setEffectiveDateTime to use RDCheckDateTime
2016-06-04 20:02:25 +01:00
Wayne Merricks
e2eb07c615 Added date/time checks for MySQL v5.7+ date/time nulls
Shouldn't be necessary in the daypart SQL but can't verify validity so added
checks there too.
2016-06-03 23:50:29 +01:00
Wayne Merricks
d222ed9ca0 Added QDate/Time variant is valid checks for SQL use
With MySQL v5.7+ you have to specifically set either a valid date or NULL
otherwise you get SQL errors.  In previous versions setting a date to "" implied
NULL, this is no longer the case which causes nice SQL errors all over the
place.

This new RDCheckDateTime is an overloaded function that calls the respective
isValid method of QDate/Time/DateTime and either returns the requested formatted
string or returns NULL as a string.

This can then be used as part of an INSERT/UPDATE without breaking the stricter
NULL interpretation of MySQL v5.7+.
2016-06-03 23:45:31 +01:00
Fred Gleason
04b4db9157 2016-06-01 Fred Gleason <fredg@paravelsystems.com>
* Changed the default value of the 'CART_NUMBER' field in '_LOG'
	tables from NULL to 0.
	* Incremented the database version to 258.
2016-06-01 12:06:36 -04:00
Fred Gleason
da0ad47ffb 2016-05-26 Fred Gleason <fredg@paravelsystems.com>
* Added 'RDAudioExport::cartNumber()', 'RDAudioExport::cutNumber()'
	and 'RDAudioExport::settings()' meethods in 'lib/rdaudioexport.cpp'
	and 'lib/rdaudioexport.h'.
	* Added expanded error logging in 'utils/rdexport/rdexport.cpp'.
2016-05-26 08:25:49 -04:00
Fred Gleason
f35263d24c Merge branch 'stable-gcc611-fix-compile' of https://github.com/xavery/rivendell into xavery-stable-gcc611-fix-compile 2016-05-24 13:25:52 -04:00
Fred Gleason
698b475933 2016-05-24 Fred Gleason <fredg@paravelsystems.com>
* Removed all CVS tags.
	* Removed 'const char *name' parameter from all QObject contructors.
2016-05-24 13:13:26 -04:00
Daniel Kamil Kozar
9fbaf4bc16 fix compilation with gcc 6.1.1 2016-05-21 00:28:21 +02:00
Fred Gleason
db9da6dc62 2016-05-20 Fred Gleason <fredg@paravelsystems.com>
* Removed the 'not null' attribute from the 'LOGS.LINK_DATETIME',
	'LOGS.START_DATE' and 'LOGS.END_DATE' fields in the database
	[GitHub issue #000121].
	* Incremented the database version to 257.
2016-05-20 16:45:56 -04:00
Fred Gleason
d9023b1430 2016-05-18 Fred Gleason <fredg@paravelsystems.com>
* Added support for the RDCatchd 'DE' command in
	'rdcatchd/rdcatchd.cpp', 'rdcatchd/rdcatchd.h',
	'rdcatchd/event_player.cpp', 'rdcatchd/event_player.h' and
	'rdcatchd/local_macros.cpp'.
	* Added a deck event indicator to RDCatch's deck monitor in
	'rdcatch/deckmon.cpp' and 'rdcatch/deckmon.h'.
2016-05-18 17:03:25 -04:00
Fred Gleason
3b766a5e7d 2016-05-18 Fred Gleason <fredg@paravelsystems.com>
* Added an entry for the Broadcast Tools SRC-16 in
	'docs/SWITCHERS.txt'.
	* Added a 'CUT_EVENTS' table to the database.
	* Added a 'DECK_EVENTS' table to the database.
	* Incremented the database version to 256.
	* Implemented a 'Cut Event' ['CE'] RML.
	* Added a 'Event Carts' section to the Edit Deck dialog in
	'rdadmin/edit_deck.cpp' and 'rdadmin/edit_deck.h'.
2016-05-18 13:43:21 -04:00
Fred Gleason
7892f4e8dc 2016-04-29 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in 'lib/lib.pro' that broke the build on Windows.
2016-04-29 18:13:02 -04:00
Fred Gleason
e5b25668c0 2016-04-29 Fred Gleason <fredg@paravelsystems.com>
* Added a pointer offset argument to the 'RDWaveFile::createWave()'
	method in 'lib/rdwavefile.cpp' and 'lib/rdwavefile.h'.
2016-04-29 17:15:20 -04:00
Fred Gleason
09aa449509 2016-04-29 Fred Gleason <fredg@paravelsystems.com>
* Implemented export for marker data in WAV files in
	'lib/rdwavefile.cpp' and 'lib/rdwavefile.h'.
2016-04-29 13:29:28 -04:00
Fred Gleason
fa988211a8 2016-04-27 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in 'lib/rdcut.cpp' that caused the cut 'Description'
	field to be applied as a cut Title.
2016-04-27 20:00:13 -04:00
Fred Gleason
687a8c6fc8 2016-04-27 Brian McGlynn <brian.mcglynn@geneseemedia.net>
* Added a 'bitRate' field in the return for the AudioInfo web method.
	* Added an rdexport(1) utility in 'utils/rdexport/'.
2016-04-27 19:46:39 -04:00
Fred Gleason
7f441e628b resolved conflict in ChangeLog 2016-04-26 17:00:11 -04:00
Fred Gleason
37fc03231c resolved conflict in ChangeLog 2016-04-26 16:51:16 -04:00
Fred Gleason
41dc317857 Fixed conflict in ChangeLog 2016-04-26 15:58:34 -04:00
Fred Gleason
512d1a2575 2016-04-25 Fred Gleason <fredg@paravelsystems.com>
* Added a 'Cut Log' report in 'lib/export_cutlog.cpp'.
	* Added 'DESCRIPTION' and 'OUTCUE' fields to the '_SRT' table
	schema.
	* Incremented the database version to 255.
2016-04-25 17:47:22 -04:00
Brian P. McGlynn
43f7bb297a Favor cuts expiring first in playback 2016-04-23 16:27:51 -04:00
Brian P. McGlynn
3ecc1fd221 Refactored RDLogEvent::save() and voicetracker 2016-04-21 21:42:44 -04:00
Brian P. McGlynn
1d470006f2 Fix for missing files in /var/snd 2016-04-21 07:45:33 -04:00
Fred Gleason
129004ace4 2016-03-29 Fred Gleason <fredg@paravelsystems.com>
* Added a switcher driver for the Broadcast Tools SS 4.1 MLR
	Switcher/Router in 'ripcd/btss41mlr.cpp' and 'ripcd/btss41mlr.h'.
2016-03-30 17:12:05 -04:00
Fred Gleason
1f494fbc5d 2016-03-29 Fred Gleason <fredg@paravelsystems.com>
* Added the 'Copy Cut' ['CP'] RML in 'lib/rdmacro.cpp' and
	'lib/rdmacro.h'.
	* Implemented the 'Copy Cut' ['CP'] RML in 'rdcatchd/local_macros.cpp'.
2016-03-29 14:57:07 -04:00
Fred Gleason
e656a4bb0a 2016-03-25 Fred Gleason <fredg@paravelsystems.com>
* Added a 'Show Only Recent Logs' checkbox in 'rdlogedit/rdlogedit.cpp'
	and 'rdlogedit/rdlogedit.h'.
2016-03-25 15:00:53 -04:00
Fred Gleason
330a602fb5 2016-03-25 Fred Gleason <fredg@paravelsystems.com>
* Changed 'uninstall' to 'uninstall-local' targets in all
	'Makefile.am' files.
2016-03-25 10:30:45 -04:00
Fred Gleason
03cfa9d614 2016-03-24 Fred Gleason <fredg@paravelsystems.com>
* Update web test methods in 'web/tests/'.
	* Added an 'RDSchedCode' class in 'lib/rdschedcode.cpp' and
	'lib/rdschedcode.h'.
	* Implemented the 'ListSchedCodes' web method in
	'web/rdxport/schedcodes.cpp'.
	* Implemented the 'AssignSchedCode' web method in
	'web/rdxport/schedcodes.cpp'.
	* Implemented the 'UnassignSchedCode' web method in
	'web/rdxport/schedcodes.cpp'.
	* Implemented the 'ListCartSchedCodes' web method in
	'web/rdxport/schedcodes.cpp'.
	* Extended 'RDGetWebTime()' and 'RDGetWebDateTime()' functions to
	support XML 'xs' namespace formats.
	* Implemented '*_POINT' fields in the 'EditCut' web method in
	'web/rdxport/carts.cpp'.
	* Modified the 'RDCart::removeSchedCode()' method so as to treat
	scheduler codes in a case-insensitve manner.
	* Modified the return of the 'EditCut' web method to provide a full
	<cutList> record in 'web/rdxport/carts.cpp'.
2016-03-24 13:53:39 -04:00
Fred Gleason
9a4a05a5df 2016-03-24 Fred Gleason <fredg@paravelsystems.com>
* Fixed a buffer size bug in 'lib/rdlivewire.cpp'.
	* Fixed a bug in 'ripcd/livewire_lwrpaudio.cpp' that caused
	spurious errors to be dumped to stderr.
2016-03-24 11:43:28 -04:00
Fred Gleason
6d168b0a8f 2016-03-23 Fred Gleason <fredg@paravelsystems.com>
* Added a 'CART.USE_WEIGHTING' field to the database.
	* Added a 'CUTS.PLAY_ORDER' field to the database.
	* Incremented the database version to 254.
	* Added a 'Schedule Cuts By' control to the Edit Cart dialog in
	'rdlibrary/edit_cart.cpp' and 'rdlibrary/edit_cart.h'.
	* Added 'RDCart::useWeighting()' and 'RDCart::setUseWeighting()'
	methods in 'lib/rdcart.cpp' and 'lib/rdcart.h'.
	* Added 'RDCut::playOrder()' and 'RDCut::setPlayOrder()' methods
	in 'lib/rdcut.cpp' and 'lib/rdcut.h'.
2016-03-24 11:38:21 -04:00
fredg@paravelsystems.com
cb418987ce 2016-03-24 Fred Gleason <fredg@paravelsystems.com>
* Fixed a buffer size bug in 'lib/rdlivewire.cpp'.
2016-03-24 09:01:45 -04:00
Fred Gleason
422dff4a15 2016-03-20 Fred Gleason <fredg@paravelsystems.com>
* Added a switcher driver for the Broadcast Tools ADMS 44.22.
2016-03-20 19:43:38 -04:00
Fred Gleason
75999f5f6f 2015-09-17 Fred Gleason <fredg@paravelsystems.com>
* Added 'm4a', 'M4A', 'aac' and 'AAC' file extensions to
	RD_AUDIO_FILE_FILTER in 'lib/rd.h'.
2015-09-17 15:25:06 -04:00
Fred Gleason
c0446ea5f7 Merged 04bd883b65b9922c35216b92b4da52245fdc7f5b from master 2015-09-15 08:06:20 -04:00
Fred Gleason
07869f9ee9 2015-08-30 Fred Gleason <fredg@paravelsystems.com>
* Added a --frames=' parameter in 'tests/audio_peaks_test.cpp'.
	* Fixed a benchpost bug in generating peak energy data in
	'lib/rdwavefile.cpp'.
2015-08-31 12:03:45 -04:00