summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2018-11-17 17:46:56 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2018-11-17 17:47:44 +0000
commitae1f44d496dc566128fa8d42bc32e37135705f4c (patch)
tree18b27669b851a922dd3470f467957afc9dff301e
parentTest should depend on fixtures (diff)
downloadmythfs-0.3.1.tar.bz2
mythfs-0.3.1.tar.xz
mythfs-0.3.1.zip
Swap out double quotes for singlemythfs-0.3.1
-rw-r--r--mythfs/service/sql/getRecorded.sql2
-rw-r--r--mythfs/unittests/fixtures/data.sql2
-rw-r--r--mythfs/unittests/testMain.cpp3
3 files changed, 5 insertions, 2 deletions
diff --git a/mythfs/service/sql/getRecorded.sql b/mythfs/service/sql/getRecorded.sql
index 9b7f853..9578295 100644
--- a/mythfs/service/sql/getRecorded.sql
+++ b/mythfs/service/sql/getRecorded.sql
@@ -1,4 +1,4 @@
-SELECT starttime, endtime, title, subtitle, description, season, episode, category, recgroup, seriesid, programid, filesize, basename
+SELECT starttime, endtime, REPLACE(title, '"', '''') title, REPLACE(subtitle, '"', '''') subtitle, description, season, episode, category, recgroup, seriesid, programid, filesize, basename
FROM recorded
WHERE deletepending = 0
AND recgroup != 'Deleted'
diff --git a/mythfs/unittests/fixtures/data.sql b/mythfs/unittests/fixtures/data.sql
index fb39495..55f45aa 100644
--- a/mythfs/unittests/fixtures/data.sql
+++ b/mythfs/unittests/fixtures/data.sql
@@ -30,7 +30,7 @@ INSERT INTO `recorded` VALUES (1002,'2015-12-20 22:09:00','2015-12-20 22:59:10',
INSERT INTO `recorded` VALUES (1002,'2015-12-21 09:34:00','2015-12-21 11:04:11','Flight of the Navigator','Family science fiction adventure','In 1978, a 12-year-old boy takes a tumble and wakes up to find it is 1986. Meanwhile, Nasa scientists discover a mysterious alien spacecraft. Also in HD.',0,0,'Film','defiant',0,0,0,1,0,'Default',3480,'','fp.bbc.co.uk/4j452j','tmdb3.py_10122','2015-12-21 11:04:11',3144665660,0,0,'1986-01-01',0,719528,0,27,1,0,'1002_20151221093400.mpg','2015-12-21 09:35:00','2015-12-21 11:00:00','Default','Default',1,0,0,'Default','0000-00-00 00:00:00');
INSERT INTO `recorded` VALUES (1002,'2015-12-19 22:19:00','2015-12-19 23:09:10','QI XL','Merriment','Stephen Fry enjoys some merriment with Jenny Eclair, Johnny Vegas and Bill Bailey. Contains some strong language. Also in HD.',13,8,'Entertainment','defiant',0,0,0,0,0,'Default',2641,'fp.bbc.co.uk/nb9n2b','fp.bbc.co.uk/1rkhsh','ttvdb.py_72716','2015-12-19 23:09:10',1521299948,0,0,'0000-00-00',0,0,0,27,1,0,'1002_20151219221900.mpg','2015-12-19 22:20:00','2015-12-19 23:05:00','Default','Default',1,0,0,'Default','0000-00-00 00:00:00');
INSERT INTO `recorded` VALUES (1303,'2015-12-02 20:59:00','2015-12-02 23:14:10','Insidious','Chapter 2','Supernatural horror sequel with Patrick Wilson, Rose Byrne and Lin Shaye. Josh is back and Renai remains desperate to prevent the malevolent spirits from haunting her family again.',0,0,'Film','defiant',0,0,0,1,0,'Default',3244,'','www.channel4.com/59556/001','tmdb3.py_49018','2015-12-02 23:14:10',1778673264,0,0,'2013-01-01',0,719528,0,27,1,0,'1303_20151202205900.mpg','2015-12-02 21:00:00','2015-12-02 23:10:00','Default','Default',1,0,0,'Default','0000-00-00 00:00:00');
-INSERT INTO `recorded` VALUES (1004,'2015-12-21 17:59:00','2015-12-21 18:34:10','The Simpsons','The Spy Who Learned Me','While he is at home on sick leave, Homer learns how to become a better husband with the help of dashing spy movie crime fighter Stradivarius Cain. (S23 Ep20/22)',0,0,'Entertainment','defiant',0,0,0,1,0,'Default',10,'www.channel4.com/c4ei0041105162151952','www.channel4.com/61647/020','','2015-12-21 18:34:10',613944080,0,0,'0000-00-00',0,0,0,27,1,0,'1004_20151221175900.mpg','2015-12-21 18:00:00','2015-12-21 18:30:00','Default','Default',1,0,0,'Default','0000-00-00 00:00:00');
+INSERT INTO `recorded` VALUES (1004,'2015-12-21 17:59:00','2015-12-21 18:34:10','The Simpsons','The Spy Who "Learned" Me','While he is at home on sick leave, Homer learns how to become a better husband with the help of dashing spy movie crime fighter Stradivarius Cain. (S23 Ep20/22)',0,0,'Entertainment','defiant',0,0,0,1,0,'Default',10,'www.channel4.com/c4ei0041105162151952','www.channel4.com/61647/020','','2015-12-21 18:34:10',613944080,0,0,'0000-00-00',0,0,0,27,1,0,'1004_20151221175900.mpg','2015-12-21 18:00:00','2015-12-21 18:30:00','Default','Default',1,0,0,'Default','0000-00-00 00:00:00');
/*!40000 ALTER TABLE `recorded` ENABLE KEYS */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
diff --git a/mythfs/unittests/testMain.cpp b/mythfs/unittests/testMain.cpp
index 36da42c..fef347a 100644
--- a/mythfs/unittests/testMain.cpp
+++ b/mythfs/unittests/testMain.cpp
@@ -35,6 +35,9 @@ BOOST_AUTO_TEST_CASE( getRecorded )
{
auto r = db->getRecorded();
BOOST_REQUIRE_EQUAL(11, r.size());
+
+ BOOST_CHECK_EQUAL(r[5]->title, "The Simpsons");
+ BOOST_CHECK_EQUAL(r[5]->subtitle, "The Spy Who 'Learned' Me");
}
BOOST_AUTO_TEST_SUITE_END();