[mythtv] CardUtil::CreateCaptureCard / CardUtil::CreateCardInput and mythconverg.inputgroup

Paul Harrison mythtv at mythqml.net
Fri Jul 8 11:02:33 UTC 2022


On 08/07/2022 02:23, David Engel wrote:

>
> I feel pretty strongly that they should be combined.  The split dates
> all the way back to the earyly days of analog, capture cards where
> there were multiple inputs (tuner, composite, s-video, etc.).  Those
> are by far the exception these days and have been for a long time.
> Keeping that distinction only promotes unnecessary confusion.
>
> FWIW, I think creating video source logically comes first.
> Regardless, it should be allowed to leave the videosource blank/empty
> and fill it in later.


We definitely should be thinking of how to make setup easier especially 
for first time users so anything that makes it more user friendly is a 
good thing IMHO. I think Peter is more inclined to just cut and paste 
what we do already in mythtv-setup whereas I wanted to at least try to 
make improvements as we went along that's why I dropped out of working 
on this he has more energy and stronger ideas/opinions than I do so I 
will just let him get one with it :) I do understand it is way easier 
and quicker to just copy mythtv-setup. I'm sure we would all appreciate 
any ideas to improve the UI/UX to make it more users friendly in the WebApp.


One concern with the Angular WebApp is just how slow it has become for 
me. At the start when it was small and simple it was fairly zippy but as 
more gets added to it it has become really sluggish taking over 10 
seconds to refresh some times. I've not seen anyone else reporting 
problems so it could just be my setup though?


>> Another problem is that there will be some 10 capture card setup pages to be
>> developed, for all the capture card types, but it seems tedious to have the
>> input setup process repeated in the code 10 times for each capture card
>> type.
>>
>> You can test the setup pages I have already done. I have done the general
>> setup, and the ceton and DVB capture cards so far, plus the deletion of
>> cards, delete all cards, delete all cards on all hosts.
>>
>> The update for capture cards via the API is rather primitive and different
>> from others, you specify database columns to update one at a time. I have
>> used it anyway.
> By repeating, are you talking about C++ code or whatever web GUI
> framework you all are using or both?  I'm guessing you mean the
> framework.  Does it not support some form of code re-use?
>
> David


This is based on my rather limited knowledge of Angular so may not be 
fully correct.


Angular is very component orientated which does promote creating 
reusable components although that's often easier said than done. It's 
TypeScript based which is itself based on Java so you can use all the 
class inheritance stuff from there if you want. It's very similar to 
Qt's QML in many ways like the idea of everything being a component and 
there are some elements of QML's declarative nature where setting a 
property value can propagate to other properties without having to do 
anything.


Each component in Angular usually has an HTML part and a TypeScript part 
and optionally each component can have a CSS or SCSS part and there can 
also be a test part which I don't think we use at the moment. We have 
opted to put each of those parts in there own file but they could be all 
in one file if you wanted.


One downside to everything being a component is the code for the WebApp 
quickly becomes a mass of files that can be hard to navigate and find 
stuff if they are not carefully organized. Each component has 4 files!  
I can envisage when the WebApp is fully developed there could easily be 
many hundreds or even thousands of files involved.


I don't know the specifics of what Peter is talking about but there may 
be a way split the pages up in such a way they can share code or html.


Paul H.



More information about the mythtv-dev mailing list