NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Add-ons (3rd party plugins, utilities and skins) v
« Previous 1 … 16 17 18 19 20 Next »
Windows Desktop/Sidebar Gadget with Recording Schedule

 
  • 0 Vote(s) - 0 Average
Windows Desktop/Sidebar Gadget with Recording Schedule
UncleJohnsBand
Offline

Posting Freak

U.S.A.
Posts: 5,643
Threads: 258
Joined: Feb 2005
#71
2011-10-22, 06:43 PM
Reddwarf Wrote:that's something I noticed too, why should one need to enter user/password when you are on the same network segment?

mvallevand Wrote:That's only part of it, user id and passwords are easy to use in API, NEWA web services use a much more sophisticated approach that is great when you are on the web, but not worth my time implementing in python.

Martin

Yep since the web services allow full control of your npvr stuff you want strong security. I know it is a pain but I think it is necessary. I will look at a possible way to not need security if in-network but no guarantees since security is built into the whole web services infrastructure. Adding this public method for the gadget info which is non-modifiable info was easy. It still gives me the willies since anyone that finds your external url can access the link and could issue a denial of service attack against the npvr web server.
Intel Core i7 @ 4.00GHz Skylake 14nm
ASUSTeK COMPUTER INC. Z170-DELUXE
Windows 10 Pro x64
PVR Software: NPVR 5.1.1
SiliconDust HDHomeRun HDHR5-4US Connect Quatro 4 Channel Tuner
Roku Ultra
2 PCH A-100's
UncleJohnsBand
Offline

Posting Freak

U.S.A.
Posts: 5,643
Threads: 258
Joined: Feb 2005
#72
2011-10-22, 06:44 PM
cncb Wrote:If you were able to embed the channel name and number into the webServiceEPGEventObject that would be easier for me Smile but a separate call/doc would be fine.

I'll see what I can do....if I add it to the epgeventobject it will require anyone using the web services interface where this object is returned would need to update their application.
Intel Core i7 @ 4.00GHz Skylake 14nm
ASUSTeK COMPUTER INC. Z170-DELUXE
Windows 10 Pro x64
PVR Software: NPVR 5.1.1
SiliconDust HDHomeRun HDHR5-4US Connect Quatro 4 Channel Tuner
Roku Ultra
2 PCH A-100's
UncleJohnsBand
Offline

Posting Freak

U.S.A.
Posts: 5,643
Threads: 258
Joined: Feb 2005
#73
2011-10-22, 10:07 PM (This post was last modified: 2011-10-23, 08:10 PM by UncleJohnsBand.)
UncleJohnsBand Wrote:I'll see what I can do....if I add it to the epgeventobject it will require anyone using the web services interface where this object is returned would need to update their application.

Ok...give the attached a try. I was able to add the name and the number as attributes on the channelOID node of the EPGEventObject without changing the base web service....I simply took the doc that is returned from the service and spun through all the channeloid nodes with epgevent segments and using the oid value I used the Channel class of NPVR to add the attributes to the node.

<ChannelOid channelName="74.1629-WLYDT" channelNumber="515">7169</ChannelOid>

Let me know if this works for you.
Intel Core i7 @ 4.00GHz Skylake 14nm
ASUSTeK COMPUTER INC. Z170-DELUXE
Windows 10 Pro x64
PVR Software: NPVR 5.1.1
SiliconDust HDHomeRun HDHR5-4US Connect Quatro 4 Channel Tuner
Roku Ultra
2 PCH A-100's
UncleJohnsBand
Offline

Posting Freak

U.S.A.
Posts: 5,643
Threads: 258
Joined: Feb 2005
#74
2011-10-23, 12:20 AM
cncb Wrote:Another question: Is there a way to get the channel logos with the background transparency intact? If I use the URL that the NEWA pages seem to use ('public/download.ashx/-5,1?ChannelID') I get an image with a solid black background.

UncleJohnsBand Wrote:I'll have to look into why that may be occuring....basically what is happening at the url is that the image is being streamed to the browser.....so you would want to use that url in your display and when the browser goes to render it the channel icon should render.

Are you appending your host URI in front of that url.... i.e.
Code:
http:///your-target-newa:your-port/public/download.ashx/-5,1?ChannelID
Intel Core i7 @ 4.00GHz Skylake 14nm
ASUSTeK COMPUTER INC. Z170-DELUXE
Windows 10 Pro x64
PVR Software: NPVR 5.1.1
SiliconDust HDHomeRun HDHR5-4US Connect Quatro 4 Channel Tuner
Roku Ultra
2 PCH A-100's
cncb
Offline

Senior Member

Posts: 729
Threads: 112
Joined: Aug 2011
#75
2011-10-23, 02:43 AM
UncleJohnsBand Wrote:Let me know if this works for you.

Works great. Thanks.
cncb
Offline

Senior Member

Posts: 729
Threads: 112
Joined: Aug 2011
#76
2011-10-23, 02:55 AM
UncleJohnsBand Wrote:Are you appending your host URI in front of that url

Yes. The logo is displaying appropriately other than the black background behind the logo which would ideally be transparent as illustrated below:
UncleJohnsBand
Offline

Posting Freak

U.S.A.
Posts: 5,643
Threads: 258
Joined: Feb 2005
#77
2011-10-23, 04:06 AM
cncb Wrote:Yes. The logo is displaying appropriately other than the black background behind the logo which would ideally be transparent as illustrated below:

How does it render within NEWA?
Intel Core i7 @ 4.00GHz Skylake 14nm
ASUSTeK COMPUTER INC. Z170-DELUXE
Windows 10 Pro x64
PVR Software: NPVR 5.1.1
SiliconDust HDHomeRun HDHR5-4US Connect Quatro 4 Channel Tuner
Roku Ultra
2 PCH A-100's
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,093
Threads: 957
Joined: May 2006
#78
2011-10-23, 05:15 AM
The download.ashx.cs for the InternalFiles.ChannelIcon doesn't set the background of the Bitmap white so it will have a black background, setting it white works

Code:
Image img = new Bitmap(channel.Icon.Width,channel.Icon.Height);
                        Graphics g = Graphics.FromImage(img);
                        g.Clear(Color.White);
                        g.DrawImageUnscaled(channel.Icon, 0, 0);

Martin
UncleJohnsBand
Offline

Posting Freak

U.S.A.
Posts: 5,643
Threads: 258
Joined: Feb 2005
#79
2011-10-23, 05:27 AM
mvallevand Wrote:The download.ashx.cs for the InternalFiles.ChannelIcon doesn't set the background of the Bitmap white so it will have a black background, setting it white works

Code:
Image img = new Bitmap(channel.Icon.Width,channel.Icon.Height);
                        Graphics g = Graphics.FromImage(img);
                        g.Clear(Color.White);
                        g.DrawImageUnscaled(channel.Icon, 0, 0);

Martin

Not using that logic.....the -5 indicates channel icon and the below code is executed. It may be that I am streaming it back as a .jpg........I am wondering if the channel icon was in jpg format with the transparent background if it would render correctly.

Code:
                case (int)InternalFiles.ChannelIcon:
                    Channel channel = Channel.LoadByOID(Convert.ToInt32(path));
                    if (channel.Icon != null)
                    {
                        Image img = new Bitmap((channel.Icon));
                        Response.ContentType = "image/png";
                        img.Save(Response.OutputStream, ImageFormat.Jpeg);
                        Response.End();
                        img.Dispose();
                    }
Intel Core i7 @ 4.00GHz Skylake 14nm
ASUSTeK COMPUTER INC. Z170-DELUXE
Windows 10 Pro x64
PVR Software: NPVR 5.1.1
SiliconDust HDHomeRun HDHR5-4US Connect Quatro 4 Channel Tuner
Roku Ultra
2 PCH A-100's
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,093
Threads: 957
Joined: May 2006
#80
2011-10-23, 05:35 AM (This post was last modified: 2011-10-23, 05:40 AM by mvallevand.)
UJB, that is the code I modified (before Response.ContentType...) I tried .Png first but that gave a GDI+ error. Returning the byte[] for channel.Icon works too

ImageConverter converter = new ImageConverter();
Response.BinaryWrite((byte[])converter.ConvertTo(img, typeof(byte[])));

Martin
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (15): « Previous 1 … 6 7 8 9 10 … 15 Next »
Jump to page 


Possibly Related Threads…
Thread Author Replies Views Last Post
  HDHRGuide for Windows mvallevand 63 11,007 2025-06-20, 04:05 PM
Last Post: mvallevand
  Comskipped videos played back on NextPVR desktop application halt on commercial break mlopez1007 2 1,065 2023-07-03, 07:47 PM
Last Post: mvallevand
  NextTool for Windows question MrReis 12 2,670 2023-03-31, 10:23 PM
Last Post: mvallevand
  Multiple Instances of Desktop Gadget BrettB 6 2,076 2021-05-16, 04:23 PM
Last Post: mvallevand
  Automatic movie recording based on existing libraries daneo 10 5,236 2020-04-14, 08:02 PM
Last Post: daneo
  NextPVR Recording Service Monitor ChaosMageX 2 2,331 2019-09-23, 02:19 PM
Last Post: ChaosMageX
  Desktop Gadget not working after Win10 Creators Update Bobbybear 1 3,598 2017-06-26, 09:01 PM
Last Post: Bobins
  ParallelProcessing.bat Recording Growth Monitor BrettB 0 2,145 2017-05-24, 01:51 AM
Last Post: BrettB
  Desktop gadget stopped working roy 4 3,540 2017-02-18, 08:16 PM
Last Post: roy
  Created a program to purge recording directory evans036 3 3,581 2016-11-30, 11:44 AM
Last Post: Graham

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode