Ticket #12713: mythweb-1.path

File mythweb-1.path, 4.8 KB (added by charles.bovy@…, 10 years ago)
Line 
1diff -Naur a/modules/tv/includes/programs.php tv/includes/programs.php
2--- b/modules/tv/includes/programs.php 2016-04-18 15:45:13.144000000 +0200
3+++ tv/includes/programs.php 2016-04-19 22:18:42.760000000 +0200
4@@ -128,10 +128,10 @@
5 if ($extra_query)
6 $query .= ' AND '.$extra_query;
7 // Group and sort
8- if (!$distinctTitle)
9- $query .= "\nGROUP BY channel.callsign, program.chanid, program.starttime";
10- else
11- $query .= "\nGROUP BY program.title";
12+// if (!$distinctTitle)
13+// $query .= "\nGROUP BY channel.callsign, program.chanid, program.starttime, program.endtime, programrating.system, programrating.rating";
14+// else
15+// $query .= "\nGROUP BY program.title";
16 $query .= " ORDER BY program.starttime";
17 // Limit
18 if ($single_program)
19diff -Naur a/modules/tv/classes/Program.php classes/Program.php
20--- b/modules/tv/classes/Program.php 2016-04-18 15:45:13.144000000 +0200
21+++ classes/Program.php 2016-04-19 21:59:51.632000000 +0200
22@@ -629,21 +629,25 @@
23 **/
24 public function rec_never_record() {
25 global $db;
26- $sh = $db->query('REPLACE INTO oldrecorded (chanid,starttime,endtime,title,subtitle,description,category,seriesid,programid,recordid,station,rectype,recstatus,duplicate) VALUES ('
27+ $sh = $db->query('REPLACE INTO oldrecorded (chanid,starttime,endtime,title,subtitle,description,season,episode,category,seriesid,programid,inetref,recordid,station,rectype,recstatus,duplicate,generic) VALUES ('
28 .escape($this->chanid) .','
29 .'NOW()' .','
30 .'NOW()' .','
31 .escape($this->title) .','
32 .escape($this->subtitle) .','
33 .escape($this->description) .','
34+ .escape(isset($this->season) ? $this->season : 0) .','
35+ .escape(isset($this->episode) ? $this->episode : 0) .','
36 .escape($this->category) .','
37 .escape($this->seriesid) .','
38 .escape($this->programid) .','
39+ .escape($this->inetref) .','
40 .escape(isset($this->recordid) ? $this->recordid : 0) .','
41 .escape($this->channel->callsign) .','
42 .escape(isset($this->rectype) ? $this->rectype : 0) .','
43 .'11' .','
44- .'1' .')')
45+ .'1' .','
46+ .'0' .')')
47 or trigger_error('SQL Error: '.$db->error, FATAL);
48 $sh->finish();
49 // Notify the backend of the changes
50@@ -776,7 +780,7 @@
51 WHERE recordedmarkup.chanid = ?
52 AND recordedmarkup.starttime = FROM_UNIXTIME(?)
53 AND recordedmarkup.type IN (10, 11, 12, 13, 14)
54- GROUP BY recordedmarkup.type
55+ GROUP BY recordedmarkup.type, recordedmarkup.data
56 ORDER BY SUM((SELECT IFNULL(rm.mark, recordedmarkup.mark)
57 FROM recordedmarkup AS rm
58 WHERE rm.chanid = recordedmarkup.chanid
59diff -Naur a/modules/tv/classes/Schedule.php classes/Schedule.php
60--- b/modules/tv/classes/Schedule.php 2016-04-18 15:45:13.144000000 +0200
61+++ classes/Schedule.php 2016-04-19 21:43:00.256000000 +0200
62@@ -374,9 +374,9 @@
63 _or($this->playgroup, 'Default' ),
64 _or($this->storagegroup, 'Default' ),
65 _or($this->prefinput, 0, true),
66- _or($this->next_record, '00:00:00' ),
67- _or($this->last_record, '00:00:00' ),
68- _or($this->last_delete, '00:00:00' ),
69+ _or($this->next_record, NULL ),
70+ _or($this->last_record, NULL ),
71+ _or($this->last_delete, NULL ),
72 _or($this->inetref, '' ),
73 _or($this->season, 0 ),
74 _or($this->episode, 0 ),