Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

#3682 closed defect (fixed)

year doesn't appear with stars for movies in watch recordings

Reported by: anonymous Owned by: stuartm
Priority: minor Milestone: 0.22
Component: mythtv Version: head
Severity: low Keywords:
Cc: Ticket locked: no

Description

The year for movies isn't showing up with the stars for movies in watch recordings. In programinfo.cpp it does try to add the year but it is empty. Since the year is available in program details I did what was done there and pulled it out of the recordedprogram table.

Patch attached.

Sorry if this is already fixed in 0.21 or a duplicate.

Attachments (2)

yr_patch.txt (1.1 KB) - added by mikerice1969@… 12 years ago.
patch
program_info_year.patch (1.5 KB) - added by anonymous 12 years ago.
patch to revision 13783 to put the 'year' field in the programinfo (updated to correct an error)

Download all attachments as: .zip

Change History (12)

Changed 12 years ago by mikerice1969@…

Attachment: yr_patch.txt added

patch

comment:1 Changed 12 years ago by anonymous

I am also interested in having this feature.

I didn't see this ticket before I had already fixed it in my own way, so I am attaching my fix in case someone is interested. It looks like the previous patch would also accomplish what I want. My patch has the possible advantage of having the 'year' field available for other uses, including using %YEAR% in a theme. But I'd be happy either way.

The attachment is a patch to revision 13783.

Changed 12 years ago by anonymous

Attachment: program_info_year.patch added

patch to revision 13783 to put the 'year' field in the programinfo (updated to correct an error)

comment:2 in reply to:  description ; Changed 12 years ago by ylee@…

Replying to mikerice1969:

The year for movies isn't showing up with the stars for movies in watch recordings. In programinfo.cpp it does try to add the year but it is empty. Since the year is available in program details I did what was done there and pulled it out of the recordedprogram table.

Thanks for the patch, Mike; you saved me the trouble of writing it myself. Your patch works very well on 0.20.2 and I do hope it is incorporated into 0.21 if not already there.

I tried program_info_year.patch, because having a %YEAR% hash indeed would be useful, but it does not work right on 0.20.2.

comment:3 in reply to:  2 Changed 12 years ago by ylee@…

I wrote earlier:

Thanks for the patch, Mike; you saved me the trouble of writing it myself. Your patch works very well on 0.20.2 and I do hope it is incorporated into 0.21 if not already there.

One thing I've noticed about Mike's patch is that it does make the startup time before displaying Recorded Programs slightly longer, because of the extra query it runs just for airdate. I strongly suspect that the optimal way to do this is to have the query that retrieves all the other data displayed in Recorded Programs also grab airdate, but I don't quite have the C++ or SQL experience to figure out where.

comment:4 in reply to:  2 ; Changed 12 years ago by ylee@…

I wrote earlier:

I tried program_info_year.patch, because having a %YEAR% hash indeed would be useful, but it does not work right on 0.20.2.

I misspoke. After reviewing the patch and finding nothing wrong with it--it implements precisely the idea I suggested earlier, in fact--I tried it again. It indeed works, and should be more optimal than Mike Rice's approach.

comment:5 in reply to:  4 Changed 12 years ago by ylee@…

Replying to ylee@pobox.com:

I wrote earlier:

I tried program_info_year.patch, because having a %YEAR% hash indeed would be useful, but it does not work right on 0.20.2.

I misspoke . . . It indeed works.

. . . I misspoke again. program_info_year.patch causes MythWeb to be unhappy when it parses date() in Recorded Programs. Back to Mike's patch I go.

comment:6 Changed 12 years ago by stuartm

Milestone: unknown0.21
Owner: changed from Isaac Richards to stuartm
Status: newaccepted
Version: 0.20-fixeshead

The second patch is closer to being correct, but new items should be appended to the end of the list, not the middle and the number of items needs to be updated in several places. (List in programinfo.h)

This could be loosely defined as a bug, seems like the year was overlooked and the fix is simple so I'll try to make a case for it going into 0.21.

comment:7 Changed 12 years ago by stuartm

Milestone: 0.210.22

comment:8 Changed 11 years ago by stuartm

Severity: mediumlow
Status: acceptedstarted

comment:9 Changed 11 years ago by stuartm

Resolution: fixed
Status: startedclosed

(In [18419]) Adds the production year to the programinfo sent via the protocol. This looks to have been left out by mistake. The year should now appear in the program description along with the rating in the watch recordings screen and elsewhere. Closes #3682

comment:10 Changed 11 years ago by stuartm

Note, this means a protocol bump from 40 to 41.

Note: See TracTickets for help on using tickets.