daniel-widrick / zap2it-GuideScraping

MIT License
59 stars 20 forks source link

Jellyfin (10.7.7) flags all shows as new. #21

Closed melendyk closed 2 years ago

melendyk commented 2 years ago

To fix, I modified the script to add in "previously-shown" flag if "New" is never found. My fix looks like:

        #Handle Flags
        #KMM - Added this isNew variable did this for Jellyfin guide
        isNew = False;
        for flag in event["flag"]:
            if flag == "New":
                programEl.appendChild(self.guideXML.createElement("New"))
                isNew = True
                #KMM - set is new above when new flag found.
            if flag == "Finale":
                programEl.appendChild(self.guideXML.createElement("Finale"))
            if flag == "Premiere":
                programEl.appendChild(self.guideXML.createElement("Premiere"))
        #KMM- I then check if new flag was found and if not I add in the previously-show flag ... for jellyfin..
        if isNew == False:
            programEl.appendChild(self.guideXML.createElement("previously-shown"))
daniel-widrick commented 2 years ago

Thank you for the contribution. Issue should be fixed on master.