Cloud9Developer / Jellyfin-Newsletter-Plugin

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

[Bug report] TV Shows (Series) are missing the poster image in the newsletter #80

Open nylimited opened 4 months ago

nylimited commented 4 months ago

I am using images directly from JF, not hosting on imgur. Image URLs are inserted correctly all movies it seems but TV shows/episodes have a broken link. The pertinent newsletter code is below. Please let me know what, if any, other information I can get you to make debugging this easier.

Cheers, Andy

<!--    This is filled by the plugin    -->
=20=20=20=20=20=20=20=20=20=20=20=20
<!--    Individual item details added by plugin         -->
<!--    Percentages and padding may need adjustments    -->

<tr class=3D'boxed' style=3D'outline: thin solid #D3D3D3; width: 95%;'>
    <td class=3D'lefttable' style=3D'padding-right: 1%; padding-left: 2%; =
padding-top: 2%; padding-bottom: 2%; width: 240px;'>
        <img style=3D'width: 200px; height: 300px;' src=3D=22https://csmxu.=
img.bh.d.sendibt3.com/im/7245256/d26eae87829adde551bf4b852f9da6b8c3c2db9b65=
b8b68870632a2db5f53e00.jpg=3Fe=3DYMK68mBXq-flneQhMb0L0eLMWvQ8t6-fO=5FJ5ApgW=
bDUe-uE=5FeDIdm-XJG6crTr3vD00nL1xz3U1tjdSo05guHfqPI3ia88g9Hrk-Fd=5F-iDY-mEY=
2OGPfKcW3x65sEcCmcicuHsGuR-=5FFYeaDa26CXsai4jEjd-nXv4P51Ph2sHitypOKgRvVX0bb=
z470f9DOsYI=5FhfiJYZFhwxSCR0dYHQ=22>
    </td>
    <td class=3D'righttable' style=3D'vertical-align: top; padding-left: =
1%; padding-right: 2%; padding-top: 2%; padding-bottom: 2%;'>
        <p>
            <div id=3D'SeriesTitle' class=3D'text' style=3D'color: #ffff00;=
 text-align: center;'>
                <h3>
                    Masters of the Air
                </h3>
            </div>
            <div class=3D'text' style=3D'color: #00dddd;'>
                Season: 1 - Eps. 6 - 6<br>
            </div>
            <hr>
                <div id=3D'Description' class=3D'text' style=3D'color: =
#dddddd;'>
                During World War II, airmen risk their lives with the 100th=
 Bomb Group, a brotherhood forged by courage, loss, and triumph.
                </div>
            </hr>
        </p>
    </td>
</tr>
<!--    This is filled by the plugin    -->

2024-02-17_16-28

nylimited commented 4 months ago

More info ... If I push several episodes of a TV show - anything more than 1 - the newsletter picks up the image just fine.

If a single episode of a TV show is pushed to JF and that is the only item to report in the newsletter the poster/image is missing from the newsletter ...

It gets more complicated when many items are included in the newsletter. Movies continue to be fine. Multi-episode TV shows are also fine. Single episode TV show additions are .. okay sometimes but not always. In the last newsletter the final 2 items shown were both single episode additions to a show. The next to last item in the newsletter had a correct poster link. The last item did not. Perhaps the impact is when it is the last (or only) item to include in the newsletter?

Cloud9Developer commented 1 month ago

Issues like this are typically due to some firewall and google. Let me see if I can find another issue with related problems

Cloud9Developer commented 1 month ago

See #25

TheDMV2 commented 1 month ago

Not sure if this should be a seperate bug listing, but for now I'll just append it here.

Can confirm that the bug where if you add updated versions of a movie (for example, I recently added a 4k version of a movie, to the existing 1080p copy), then the poster will not be displayed.

This does not affect TV shows, only movies for me.

Cloud9Developer commented 1 month ago

@TheDMV2 Hmm.. self hosted or imgur?

TheDMV2 commented 1 month ago

self hosted.

Cloud9Developer commented 1 month ago

Did you try do go to the URL that got generated for the image? See if it comes up there?

TheDMV2 commented 1 month ago

There were (and are) no missing images in my JF server. The {ItemID} tag works correctly, and brings me to the item.

From the newsletter: IMG: https://MYSERVER/Items/**d6375782b419ff1c858aca17e68f34b9**/Images/Primary URL: https://MYSERVER/web/#/details?id=**c105d51e896fac0550b0414164885a11**

So, my guess is that ImageURL is somehow/somewhy storing / using a different ID.

My solution: depreciate ImageURL since it doesn't work and isn't needed, and just use ItemID:

<img style="width: 133px; height: 200px;" src="https://MYSERVER/Items/{ItemID}/Images/Primary?fillHeight=200&fillWidth=133&quality=50">

Cloud9Developer commented 1 month ago

Ahh, api must have gotten updated with 10.9.

I'll try to push an update tomorrow (off of work!) 😁

nylimited commented 1 month ago

I installed the most recent version of the plugin recently and I can confirm the missing poster issue is still present. Sadly the newsletter picked up pretty much everything in the libraries during the first run hence the debug log is roughly 300000 lines or so ... can upload if you want to inspect it.

Cloud9Developer commented 1 month ago

@nylimited are you using self-hosting or imgur?

nylimited commented 1 month ago

@nylimited are you using self-hosting or imgur?

Self-hosting, reachable from the outside, SSL connection only from the outside.

Cloud9Developer commented 1 month ago

One thing it may be currently, I think they updated the image API. It's a quick update and wanted to do it yesterday, but didn't get a chance to get to it. I'm planning to do it soon, I'll post here when I get around to it to get confirmation that it got fixed

nylimited commented 1 month ago

One thing it may be currently, I think they updated the image API. It's a quick update and wanted to do it yesterday, but didn't get a chance to get to it. I'm planning to do it soon, I'll post here when I get around to it to get confirmation that it got fixed

No problem, no rush, but .. would an API change prevent all images from being found/inserted?

Cloud9Developer commented 1 month ago

For current missing images, most likely. If it wasn't working pre- 10.9 release, no? Hard to say honestly.

I THINK I have it set to generate the image URL Everytime for self hosting, but once per series for imgur. Need to confirm that though. If I don't have it set that way, then it may be grabbing old urls from the newsletter db.

nylimited commented 1 month ago

I cannot tell you about the SAME item, of course. Once processed the newsletter will not (hopefully) include the same item.

But, yes, the random missing poster image was present long before the 10.9 version.

TheDMV2 commented 1 month ago

I cannot tell you about the SAME item, of course. Once processed the newsletter will not (hopefully) include the same item.

But, yes, the random missing poster image was present long before the 10.9 version.

I'm exactly the same as you. The bug was the same before and after 10.9 update.

Use my solution, it works great.

And make sure you include those image parameters at the end like I did. Brings a 350+kb poster down to 9kb, which can make a difference to a big newsletter when you're selfhosting. Can even turn up the compression more if you wanna :)

nylimited commented 1 month ago

@TheDMV2

I am currently running both, this newsletter plugin and Ombi to create newsletters. At the moment the one generated by the plugin goes only to my email and the Ombi generated one goes to my users.

I switched to Ombi when I could not resolve the bouncing mail issue with GMX users.

They both have some issues and if I could I would merge the two into a new, cool newsletter.

Cloud9Developer commented 1 month ago

So ombi's emails work with GMX? I'll try to cross-compare email methods there and see if I can't get it to work

nylimited commented 1 month ago

Yep, they do. I can get you email headers from delivered ones or an entire newsletter if you wish.

nylimited commented 3 weeks ago

Here are two files for your amusement. I had to zip them for Github to allow the attachment. They were sent in html format and if you change from .eml to .html you should be able to see them in your browser via drag and drop. If you use an old fashioned text editor on the .eml file you should be able to see the headers in each. The one from Ombi got things right this week. No extras, no misses. The plugin got it right 110% this time - that is, it included all my new items plus an old Elvis movie (?)

The newsletter may have been generated with Jellyfin 10.9.4 installed although I am now running 10.9.6 which may (or may not) make a difference. 😁

newsletters.zip

nylimited commented 3 weeks ago

Here are two files for your amusement. I had to zip them for Github to allow the attachment. They were sent in html format and if you change from .eml to .html you should be able to see them in your browser via drag and drop. If you use an old fashioned text editor on the .eml file you should be able to see the headers in each. The one from Ombi got things right this week. No extras, no misses. The plugin got it right 110% this time - that is, it included all my new items plus an old Elvis movie (?)

Whew! I need to clarify the above! I figured out what was going on and it is interesting. The old Elvis movie was a test recording from a live TV channel. It was not saved to movies but rather to a "Recordings" folder and it will be automatically removed from there after 3 weeks.

Technically it was indeed new for the week. Ombi completely ignored it since it was not in any library it monitors (movies and TV is all it looks at). In other words, the plugin's selections are correct. My memory on the other hand not so much.

The headers of the two emails I attached to the previous post may still be helpful for you to look at. I am not sure.

nylimited commented 1 week ago

I have no idea what it was looking at. Will try to get you more info when you are ready for it.

2024-06-23_15-17

nylimited commented 6 days ago

This Friday's test run was yet more unpredictable. The newsletter included only 2 of 3 newly added movies, only 1 of 4 new TV shows and the usual blank/unknown TV show.