@@ -16,54 +16,10 @@ class Program extends MythBase {
16
16
17
17
// The following fields are (in order) the fields returned from the backend on
18
18
// a standard query.
19
- public $ title ;
20
- public $ subtitle ;
21
- public $ description ;
22
- public $ category ;
23
- public $ chanid ;
24
- public $ channum ;
25
- public $ callsign ;
26
- public $ channame ;
27
- public $ filename ;
28
- public $ filesize ;
29
-
30
- public $ starttime ;
31
- public $ endtime ;
19
+ // everything above this line is serialized
20
+
32
21
public $ duplicate ;
33
22
public $ shareable ;
34
- public $ findid ;
35
- public $ hostname ;
36
- public $ sourceid ;
37
- public $ cardid ;
38
- public $ inputid ;
39
- public $ recpriority = null ;
40
- public $ recstatus ;
41
- public $ recordid ;
42
-
43
- public $ rectype ;
44
- public $ dupin ;
45
- public $ dupmethod ;
46
- public $ recstartts ;
47
- public $ recendts ;
48
- public $ progflags ;
49
- public $ recgroup ;
50
- public $ outputfilters ;
51
- public $ seriesid ;
52
- public $ programid ;
53
-
54
- public $ lastmodified ;
55
- public $ stars ;
56
- public $ airdate ;
57
- public $ playgroup = 'Default ' ;
58
- public $ recpriority2 = null ;
59
-
60
- public $ parentid ;
61
- public $ storagegroup = 'Default ' ;
62
- public $ audioproperties = 0 ;
63
- public $ videoproperties = 0 ;
64
- public $ subtitletype = 0 ;
65
- public $ year = 0 ;
66
- // everything above this line is serialized
67
23
68
24
// Audio and Video properties
69
25
public $ stereo = 0 ;
@@ -79,8 +35,6 @@ class Program extends MythBase {
79
35
public $ has_subtitles = 0 ;
80
36
public $ subtitled = 0 ;
81
37
public $ deaf_signed = 0 ;
82
- public $ parttotal = 1 ;
83
- public $ partnumber = 1 ;
84
38
85
39
// The rest of these variables (which really need to get organized) are
86
40
// calculated or queried separately from the db.
@@ -129,47 +83,50 @@ public function __construct($data) {
129
83
$ this ->description = $ data [2 ]; # episode description
130
84
$ this ->season = $ data [3 ];
131
85
$ this ->episode = $ data [4 ];
132
- $ this ->category = $ data [5 ];
133
- $ this ->chanid = $ data [6 ]; # mysql chanid
134
- $ this ->channum = $ data [7 ];
135
- $ this ->callsign = $ data [8 ];
136
- $ this ->channame = $ data [9 ];
137
- $ this ->filename = $ data [10 ];
138
- $ this ->filesize = $ data [11 ];
139
- $ this ->starttime = $ data [12 ]; # show start-time
140
- $ this ->endtime = $ data [13 ]; # show end-time
141
- $ this ->findid = $ data [14 ];
142
- $ this ->hostname = $ data [15 ];
143
- $ this ->sourceid = $ data [16 ];
144
- $ this ->cardid = $ data [17 ];
145
- $ this ->inputid = $ data [18 ];
146
- $ this ->recpriority = $ data [19 ];
147
- $ this ->recstatus = $ data [20 ];
148
- $ this ->recordid = $ data [21 ];
149
-
150
- $ this ->rectype = $ data [22 ];
151
- $ this ->dupin = $ data [23 ];
152
- $ this ->dupmethod = $ data [24 ];
153
- $ this ->recstartts = $ data [25 ]; # ACTUAL start time (also maps to recorded.starttime)
154
- $ this ->recendts = $ data [26 ]; # ACTUAL end time
155
- $ this ->progflags = $ data [27 ];
156
- $ this ->recgroup = $ data [28 ];
157
- $ this ->outputfilters = $ data [29 ];
158
- $ this ->seriesid = $ data [30 ];
159
- $ this ->programid = $ data [31 ];
160
- $ this ->inetref = $ data [32 ];
161
-
162
- $ this ->lastmodified = $ data [33 ];
163
- $ this ->stars = $ data [34 ];
164
- $ this ->airdate = $ data [35 ];
165
- $ this ->playgroup = $ data [36 ];
166
- $ this ->recpriority2 = $ data [37 ];
167
- $ this ->parentid = $ data [38 ];
168
- $ this ->storagegroup = $ data [39 ];
169
- $ this ->audioproperties = $ data [40 ];
170
- $ this ->videoproperties = $ data [41 ];
171
- $ this ->subtitletype = $ data [42 ];
172
- $ this ->year = $ data [43 ];
86
+ $ this ->syndicatedepisodenumber = $ data [5 ];
87
+ $ this ->category = $ data [6 ];
88
+ $ this ->chanid = $ data [7 ]; # mysql chanid
89
+ $ this ->channum = $ data [8 ];
90
+ $ this ->callsign = $ data [9 ];
91
+ $ this ->channame = $ data [10 ];
92
+ $ this ->filename = $ data [11 ];
93
+ $ this ->filesize = $ data [12 ];
94
+ $ this ->starttime = $ data [13 ]; # show start-time
95
+ $ this ->endtime = $ data [14 ]; # show end-time
96
+ $ this ->findid = $ data [15 ];
97
+ $ this ->hostname = $ data [16 ];
98
+ $ this ->sourceid = $ data [17 ];
99
+ $ this ->cardid = $ data [18 ];
100
+ $ this ->inputid = $ data [19 ];
101
+ $ this ->recpriority = $ data [20 ];
102
+ $ this ->recstatus = $ data [21 ];
103
+ $ this ->recordid = $ data [22 ];
104
+
105
+ $ this ->rectype = $ data [23 ];
106
+ $ this ->dupin = $ data [24 ];
107
+ $ this ->dupmethod = $ data [25 ];
108
+ $ this ->recstartts = $ data [26 ]; # ACTUAL start time (also maps to recorded.starttime)
109
+ $ this ->recendts = $ data [27 ]; # ACTUAL end time
110
+ $ this ->progflags = $ data [28 ];
111
+ $ this ->recgroup = $ data [29 ];
112
+ $ this ->outputfilters = $ data [30 ];
113
+ $ this ->seriesid = $ data [31 ];
114
+ $ this ->programid = $ data [32 ];
115
+ $ this ->inetref = $ data [33 ];
116
+
117
+ $ this ->lastmodified = $ data [34 ];
118
+ $ this ->stars = $ data [35 ];
119
+ $ this ->airdate = $ data [36 ];
120
+ $ this ->playgroup = $ data [37 ];
121
+ $ this ->recpriority2 = $ data [38 ];
122
+ $ this ->parentid = $ data [39 ];
123
+ $ this ->storagegroup = $ data [40 ];
124
+ $ this ->audioproperties = $ data [41 ];
125
+ $ this ->videoproperties = $ data [42 ];
126
+ $ this ->subtitletype = $ data [43 ];
127
+ $ this ->year = $ data [44 ];
128
+ $ this ->partnumber = $ data [45 ];
129
+ $ this ->parttotal = $ data [46 ];
173
130
// Is this a previously-recorded program?
174
131
if (!empty ($ this ->filename )) {
175
132
$ this ->url = video_url ($ this ); // get download info
@@ -302,17 +259,6 @@ public function update_fancy_desc() {
302
259
// Get a nice description with the full details
303
260
$ details = array ();
304
261
305
- if (!isset ($ this ->syndicatedepisodenumber )) {
306
- // Get some data from SQL that the backend doesn't provide
307
- $ query = 'SELECT partnumber, parttotal, syndicatedepisodenumber FROM program '
308
- .' WHERE chanid= ' .escape ($ this ->chanid )
309
- .' AND starttime=FROM_UNIXTIME( ' .escape ($ this ->starttime ).') ' ;
310
- $ result = mysql_query ($ query )
311
- or trigger_error ('SQL Error: ' .mysql_error (), FATAL );
312
- list ($ this ->partnumber , $ this ->parttotal , $ this ->syndicatedepisodenumber ) = mysql_fetch_row ($ result );
313
- mysql_free_result ($ result );
314
- }
315
-
316
262
if ($ this ->hdtv )
317
263
$ details [] = t ('HDTV ' );
318
264
if ($ this ->widescreen )
@@ -397,48 +343,51 @@ public function backend_row() {
397
343
$ this ->description , // 02 description
398
344
$ this ->season , // 03 season
399
345
$ this ->episode , // 04 episode
400
- $ this ->category , // 05 category
401
- $ this ->chanid , // 06 chanid
402
- $ this ->channum , // 07 chanstr
403
- $ this ->callsign , // 08 chansign
404
- $ this ->channame , // 09 channame
405
- $ this ->filename , // 10 pathname
406
- $ this ->filesize , // 11 filesize
407
-
408
- $ this ->starttime , // 12 startts
409
- $ this ->endtime , // 13 endts
410
- $ this ->findid , // 14 findid
411
- $ this ->hostname , // 15 hostname
412
- $ this ->sourceid , // 16 sourceid
413
- $ this ->cardid , // 17 cardid
414
- $ this ->inputid , // 18 inputid
415
- $ this ->recpriority , // 19 recpriority
416
- $ this ->recstatus , // 20 recstatus
417
- $ this ->recordid , // 21 recordid
418
-
419
- $ this ->rectype , // 22 rectype
420
- $ this ->dupin , // 23 dupin
421
- $ this ->dupmethod , // 24 dupmethod
422
- $ this ->recstartts , // 25 recstartts
423
- $ this ->recendts , // 26 recendts
424
- $ this ->progflags , // 27 programflags
425
- $ this ->recgroup , // 28 recgroup
426
- $ this ->outputfilters , // 29 chanOutputFilters
427
- $ this ->seriesid , // 30 seriesid
428
- $ this ->programid , // 31 programid
429
- $ this ->inetref , // 32 inetref
430
-
431
- $ this ->lastmodified , // 33 lastmodified
432
- $ this ->stars , // 34 stars
433
- $ this ->airdate , // 35 originalAirDate
434
- $ this ->playgroup , // 36 playgroup
435
- $ this ->recpriority2 , // 37 recpriority2
436
- $ this ->parentid , // 38 parentid
437
- $ this ->storagegroup , // 39 storagegroup
438
- $ this ->audioproperties , // 40 audioprop
439
- $ this ->videoproperties , // 41 videoprop
440
- $ this ->subtitletype , // 42 subtitletype
441
- $ this ->year , // 43 year
346
+ $ this ->syndicatedepisodenumber , // 05 syndicatedepisode
347
+ $ this ->category , // 06 category
348
+ $ this ->chanid , // 07 chanid
349
+ $ this ->channum , // 08 chanstr
350
+ $ this ->callsign , // 09 chansign
351
+ $ this ->channame , // 10 channame
352
+ $ this ->filename , // 11 pathname
353
+ $ this ->filesize , // 12 filesize
354
+
355
+ $ this ->starttime , // 13 startts
356
+ $ this ->endtime , // 14 endts
357
+ $ this ->findid , // 15 findid
358
+ $ this ->hostname , // 16 hostname
359
+ $ this ->sourceid , // 17 sourceid
360
+ $ this ->cardid , // 18 cardid
361
+ $ this ->inputid , // 19 inputid
362
+ $ this ->recpriority , // 20 recpriority
363
+ $ this ->recstatus , // 21 recstatus
364
+ $ this ->recordid , // 22 recordid
365
+
366
+ $ this ->rectype , // 23 rectype
367
+ $ this ->dupin , // 24 dupin
368
+ $ this ->dupmethod , // 25 dupmethod
369
+ $ this ->recstartts , // 26 recstartts
370
+ $ this ->recendts , // 27 recendts
371
+ $ this ->progflags , // 28 programflags
372
+ $ this ->recgroup , // 29 recgroup
373
+ $ this ->outputfilters , // 30 chanOutputFilters
374
+ $ this ->seriesid , // 31 seriesid
375
+ $ this ->programid , // 32 programid
376
+ $ this ->inetref , // 33 inetref
377
+
378
+ $ this ->lastmodified , // 34 lastmodified
379
+ $ this ->stars , // 35 stars
380
+ $ this ->airdate , // 36 originalAirDate
381
+ $ this ->playgroup , // 37 playgroup
382
+ $ this ->recpriority2 , // 38 recpriority2
383
+ $ this ->parentid , // 39 parentid
384
+ $ this ->storagegroup , // 40 storagegroup
385
+ $ this ->audioproperties , // 41 audioprop
386
+ $ this ->videoproperties , // 42 videoprop
387
+ $ this ->subtitletype , // 43 subtitletype
388
+ $ this ->year , // 44 year
389
+ $ this ->partnumber , // 45 partnumber
390
+ $ this ->parttotal , // 46 parttotal
442
391
)
443
392
);
444
393
}
0 commit comments