I have a few questions regarding modesty and near occasions of sin.
If you dress immodestly you can lead others into sin. But what if you dress immodestly in your own home can you still be an occasion of sin for others?
One would have to judge…at times perhaps (like when a guest arrives and you are there by yourself or if one has ones window shades open at night for the world to peer in)…at times no…it would of course depend too on what is meant
This section from the Catechism can be of help:
vatican.va/archive/ENG0015/__P8R.HTM
Regarding near occasions of sin:
If you are watching a program which causes you to become aroused if you don’t turn that program off are you committing a sin? Even if you don’t act upon that arousal?
Again…it depends…for example some slight stirring or something that one does not consent to and is not actually a near occasion of sin is different then say getting aroused. One has to make a judgment.
Different persons have different sensitivity levels here…some get slightly aroused easy…some do not get so.
There is a difference between a temptation and consent.
Consent is key. One can sin internally via simply consenting.
One can also be tempted and not consent at all.
Note too that it may be that one is in a near occasion (which can even be sinful to remain in without good reason…but some even then are out of our control…I speak here in general…) or the show should simply not be watched due to the content…etc etc…
But just cause say for example something caught you off guard and your body reacted with arousal…but one say turned away and did not consent etc…there may be no sin at all. Just an automatic thing…and temptation. But if something is “really arousing” then that is likely at least a near occasion of sin…and it can be sinful to keep doing it (though not always). It depends on what is meant.
Also remember concupscience is a real reality…so one needs a good amount of “reasonable” care in this area. But not undue fear.
You have to judge.
Perhaps speak with your confessor if you have one…he will know you…
If you happen to be watching a program in which lewd jokes and comments are made by the characters but you don’t laugh at them are you committing the sin of failing to avoid a near occasion of sin by not turning that program off even though you aren’t laughing at the lewd comments but there is a possibility you could?
I would of course think…should I watch this show? But yes such is peppered throughout our entertainment world. It can be reasonable (one makes a judgment) to watch a certain show one foresees will have a few bad jokes in it…to enjoy the other. Of course one has to be aware of others present…like children…and bring that into consideration too. (And also know that sometimes a lewd joke causes a moment of involuntary laughter…if such is involuntary so just compose yourself as one can…)…But again…use reasonable Christian discernment in watching what one watches (which is not to mean it has to be G rated cartoon

…(but there is much out there that I would not watch personally and find offensive and annoying) …Think of the early Christians who lived differently than the culture around them…avoiding the evil entertainment …yet otherwise lived with them in love.
Now if something really is a near occasion to say mortal sin…then of course one avoids such.
An what if whilst you are watching that program someone walks in and starts finding amusement in those lewd jokes have you now a responsibility to turn that program off?
There is much to consider there…is it your tv? is it your kids? etc…one has to handle it with prudence …one could comment perhaps --why do they have to say things like that on the show …one could seek another show…etc It is a judgment call.
Also note…ones confessor who knows you can advise one as well.