Cloud9Developer / Jellyfin-Newsletter-Plugin

GNU General Public License v3.0
66 stars 7 forks source link

[Feature Request] Automatically add the current date #75

Closed BLACK4585 closed 1 month ago

BLACK4585 commented 4 months ago

Currently, it only sends the hard-coded HTML files. But it would be great if the Plugin could adapt the current date. It would be nice if you could also adjust the appearance of the date for different countries, e.g. for me, it would be 09.02.2024.

Cloud9Developer commented 1 month ago

Added as of 0.6.2.0

Cloud9Developer commented 1 month ago

Well, in the format of YYYY-MM-DD. Will add in a country selector (though, it may already do it based on local time settings? Needs testing. Let me know if it works as is for you!)

BLACK4585 commented 1 month ago

The plugin just sent out a Newsletter, but there was no date included. I saw in the repo that you only changed the Body HTML, so I adapted it to my template to match your new version before. But there was no date. This is my current template, did I miss sth:

<html>
    <div>
        <table style='margin-left: auto; margin-right: auto;'>
            <tr> 
                <td width='100%' height='100%' style='vertical-align: top; background: linear-gradient(to bottom right, #3b2344, #043a4c);'> 
                    <table id='InsertHere' name='MainTable' style='margin-left: auto; margin-right: auto; border-spacing: 0 20px; padding-left: 2%; padding-right: 2%; padding-bottom: 1%;'> 
                        <tr style='text-align: center;'> 
                            <td colspan='2'> 
                                <span>
                                    <h1 id='Title' style='color:#FFFFFF;'>Black Hosting Jellyfin Newsletter</h1>
                                </span> 
                            </td> 
                        </tr> 
                        <!-- Fill this in from code --> 
                        {EntryData}
                        <!-- Fill that in from code --> 
                    </table> 
                    <br>
                    <br>
                    <span style="text-align: center; display: block;">
                        <a href="https://jellyfin.blck-hosting.de" style="border: 2px solid white; border-radius: 15px; padding: 10px; background: linear-gradient(to bottom right, #713a91, #0785b6); color: white; text-decoration: none;">Jetzt anschauen!</a>
                    </span>
                    <br>
                    <br>
                </td> 
            </tr> 
        </table> 
    </div> 
</html>

Also, regarding your manifest, you are matching target Abi 10.9.0. So the plugin is not available for the newest version. Not suree if this is intentional.

Cloud9Developer commented 1 month ago

There should be a {Date} option in the body section now

Cloud9Developer commented 1 month ago

I'll go double check the default though.

In the meantime, you can add a tag and have {Date} there and it should populat

BLACK4585 commented 1 month ago

Well, in the format of YYYY-MM-DD. Will add in a country selector (though, it may already do it based on local time settings? Needs testing. Let me know if it works as is for you!)

Nope, it is in the format YYYY-MM-DD for me :(

Cloud9Developer commented 1 month ago

Gotcha. There was a request that came in for different date elements, like {MONTH} {DAY} {YEAR} etc.. I think I'mma go this route so you can format your date however you please :)

BLACK4585 commented 1 month ago

Okay nice thank you very much!