patch for mythburn.py

Post Reply
busbee
Junior
Posts: 31
Joined: Sun Oct 14, 2018 12:07 pm
United States of America

patch for mythburn.py

Post by busbee » Thu Jul 04, 2019 7:17 pm

I have a patch for mythburn.py, a part of mytharchive. Where can I submit it?

basically, it converts graphic files before saving preventing an error.


I'm using the patched file mythburn.py
The original is mytherburn.py.org


--- mythburn.py.org 2019-06-17 16:02:52.000000000 -0500
+++ mythburn.py 2019-07-04 11:04:17.286384079 -0500
@@ -3615,6 +3615,8 @@
bgimage=Image.open(backgroundfilename,"r").resize(screensize)
bgimage.paste(overlayimage, (0,0), overlayimage)

+ #One line bugfix by buz, convert the file before saving
+ bgimage=bgimage.convert('L')
#Save this menu image and its mask
bgimage.save(os.path.join(getTempPath(),"background-%s.jpg" % page),"JPEG", quality=99)
bgimagemask.save(os.path.join(getTempPath(),"backgroundmask-%s.png" % page),"PNG",quality=99,optimize=0,dpi=screendpi)
@@ -3654,6 +3656,8 @@
del picture
previewitem+=1
#bgimage.save(os.path.join(getTempPath(),"background-%s-f%06d.png" % (page, framenum)),"PNG",quality=100,optimize=0,dpi=screendpi)
+ #One line bugfix by buz, convert the file before saving
+ bgimage=bgimage.convert('L')
bgimage.save(os.path.join(getTempPath(),"background-%s-f%06d.jpg" % (page, framenum)),"JPEG",quality=99)
framenum+=1

@@ -3821,6 +3825,8 @@
#Save this menu image and its mask
bgimage=Image.open(backgroundfilename,"r").resize(screensize)
bgimage.paste(overlayimage, (0,0), overlayimage)
+ #One line bugfix by buz, convert the file before saving
+ bgimage=bgimage.convert('L')
bgimage.save(os.path.join(getTempPath(),"chaptermenu-%s.jpg" % page),"JPEG", quality=99)

bgimagemask.save(os.path.join(getTempPath(),"chaptermenumask-%s.png" % page),"PNG",quality=90,optimize=0)
@@ -3850,6 +3856,8 @@
bgimage.paste(picture, (previewx[previewchapter], previewy[previewchapter]))
del picture
previewchapter+=1
+ #One line bugfix by buz, convert the file before saving
+ bgimage=bgimage.convert('L')
bgimage.save(os.path.join(getTempPath(),"chaptermenu-%s-f%06d.jpg" % (page, framenum)),"JPEG",quality=99)
framenum+=1

@@ -3971,6 +3979,8 @@
#Save this details image
bgimage=Image.open(backgroundfilename,"r").resize(screensize)
bgimage.paste(overlayimage, (0,0), overlayimage)
+ #One line bugfix by buz, convert the file before saving
+ bgimage=bgimage.convert('L')
bgimage.save(os.path.join(getTempPath(),"details-%s.jpg" % itemnum),"JPEG", quality=99)

if haspreview == True:
@@ -3994,6 +4004,8 @@
else:
bgimage.paste(picture, (previewx, previewy))
del picture
+ #One line bugfix by buz, convert the file before saving
+ bgimage=bgimage.convert('L')
bgimage.save(os.path.join(getTempPath(),"details-%s-f%06d.jpg" % (itemnum, framenum)),"JPEG",quality=99)
framenum+=1

56,1 Bot

1,1 Top

User avatar
pgbennett
Developer
Posts: 319
Joined: Mon Apr 27, 2015 5:41 pm
United States of America

Re: patch for mythburn.py

Post by pgbennett » Thu Jul 04, 2019 8:06 pm

The correct procedure is to open a ticket - see https://code.mythtv.org/trac/wiki/TicketHowTo - set component to the correct plugin and attach the patch.

Post Reply