Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • 15:09

    gazpachoking on main

    fix incorrect docker-compose fi… Merge pull request #12 from got… (compare)

  • 15:09
    gazpachoking closed #12
  • 12:54
    github-actions[bot] closed #2804
  • 12:54
    github-actions[bot] commented #2804
  • 08:23
    gotson opened #12
  • Dec 03 21:43
    gazpachoking commented #3625
  • Dec 03 20:46
    bobcatthebaker synchronize #3625
  • Dec 03 20:41
    bobcatthebaker edited #3625
  • Dec 03 20:40
    bobcatthebaker edited #3625
  • Dec 03 20:33
    bobcatthebaker edited #3625
  • Dec 03 20:32
    bobcatthebaker synchronize #3625
  • Dec 03 20:26
    bobcatthebaker edited #3625
  • Dec 03 20:01
    bobcatthebaker opened #3625
  • Dec 03 12:30
    OmegaZero commented #3620
  • Dec 03 06:59
    bobcatthebaker commented #3624
  • Dec 03 06:50
    gazpachoking commented #3624
  • Dec 03 06:49
    bobcatthebaker commented #3624
  • Dec 03 06:48
    BrutuZ commented #3624
  • Dec 03 06:47
    BrutuZ commented #3624
  • Dec 03 06:42
    bobcatthebaker commented #3624
FlexGet Bot
gazpachoking (discord) For notifications?
BrutuZ (discord) Yes
gazpachoking (discord) And it'll be a fixed date?
BrutuZ (discord) You pass it a date in ISO8601, Discord formats it
gazpachoking (discord) But, wouldn't you want the date to be 'now' and not some arbitrary date put into the config?
gazpachoking (discord) I think I'm missing something
BrutuZ (discord) There's a "now" already in the message time
BrutuZ (discord) This is a nice way to tell when the entry was uploaded for example
FlexGet Bot
gazpachoking (discord) I'm still confused how it goes in the config though
gazpachoking (discord) Because it'll need to be dynamic, not static
BrutuZ (discord) Not if you have a field formatted as TimeDate

BrutuZ (discord) ```yaml
message: "New Entry: {{title_pretty|d(title)}}"

      - discord:
          web_hook_url: XXXXXXXXXXX
            - color: 0xf15478
                name: "{{artist}}"
              url: "{{url}}"
              title: "{{original_title|d(title_pretty)|d(title)|d}}"
              description: "{{title_jp|d}}"
              timestamp: "{{upload_date}}"
              image: {url: "{{cover}}"}
                - name: "Tags"
                  value: "> {{tags|d([])|join('\\n> ')|title}}"
                  inline: False
                - name: Uploaded
                  value: "{{(now-upload_date)|string|re_replace(':\\d\\d\\.\\d{6}','')}} ago"
                  inline: True
                - name: Reason
                  value: "{{reason|d('Unknown')|re_replace('regexp .(.+?). matched field .(\\w+).*','\\\\2 - \\\\1')|replace('\\\\b','')|replace('[- ]?',' ')|replace('(?!-oh)','')|capitalize}}"
                  inline: True


FlexGet Bot
BrutuZ (discord) Hmm, domain_delay doesn't apply to Notifiers... Sound the rate-limits 🪦
FlexGet Bot
BrutuZ (discord) Think I got a compromise validating the timestamp config on the notify call. Thoughts @gazpachoking ?
        for embed in config.get('embeds', []):
            ts = embed.get('timestamp')
            if ts:
                if isinstance(ts, str):
                    if ts.isdigit():
                            ts = datetime.utcfromtimestamp(int(ts))
                        except ValueError:
                                f"Value provided for 'timestamp' ({embed['timestamp']}) "
                                f"is not a timestamp ({int(datetime.now().timestamp())})."
                            ts = isoparse(ts)
                            embed['timestamp'] = ts
                        except (ParserError, ValueError) as e:
                            logger.info(f"'timestamp' is in an invalid format: {e}")
                if not isinstance(ts, datetime):
                    embed.pop('timestamp', None)
                    logger.warning("'timestamp' is invalid, dropping it")
                    embed['timestamp'] = datetime.strftime(ts, r'%Y-%m-%dT%H:%M:%S%z')
FlexGet Bot
gazpachoking (discord) @BrutuZ Oh, I gotcha, it's jinja
gazpachoking (discord) Well, the validation will never run on that, so that bit doesn't really matter. That bit only runs on startup, and ignores jinja fields because they wouldn't normally pass.
gazpachoking (discord) I think using dateutil is probably easier than doing parsing on your own
gazpachoking (discord) I also don't think it could ever actually be a datetime already, could it?
BrutuZ (discord) I am using it. isoparse is from dateuril
gazpachoking (discord) Oh, gotcha
gazpachoking (discord) I think it's possible that field ends up as a number though, if it comes from a timestamp
gazpachoking (discord) So str/float/int, but not datetime are the things that would need to be handled.
BrutuZ (discord) I'm not sure, felt like a possiblity at the time before realizing Jinja turns even Integers into strings
FlexGet Bot
BrutuZ (discord) I tried setting it as int in a mock, became string even with the |int() filter, that's why I put the isdigit() instead of another isinstance for int
gazpachoking (discord) Depends on if native parsing is used
gazpachoking (discord) Not sure if it is in this case
gazpachoking (discord) Looks like it isn't at the moment
gazpachoking (discord) In any case, your solution seems reasonable
FlexGet Bot
BrutuZ (discord) Will whip it in a PR then. Also added the TimedLimiter to prevent losing notifications to rate-limit 😛
FlexGet Bot
BrutuZ (discord) Pre-commit GH action failed because black changed a completely unrelated file 😅
FlexGet Bot
gazpachoking (discord) Probably the same file that's blocking our release task on master already
BrutuZ (discord) The odd thing is that when I ran black on that file manually it didn't change anything
BrutuZ (discord) Was going for a "make pre-commit happy" commit (even though pre-commit should be running locally already) just to pass the test, turns out I couldn't
FlexGet Bot
gazpachoking (discord) Hmm. Maybe old version of black? I just ran it on that file then pushed the commit. Things should be better again on develop branch now.
gazpachoking (discord) It just wanted an extra newline somewhere.
gazpachoking (discord) You might need to pull or rebase from develop
gazpachoking (discord) Or, I could just click merge. Lemme double check it
BrutuZ (discord) Shouldn't be, my launch script install both requirements files with every update
gazpachoking (discord) No, it was nothing in your branch, the problem was on develop branch when you made your commit.
gazpachoking (discord) Develop was already failing
gazpachoking (discord) Made one comment on your PR, other than that it looks good
FlexGet Bot
aidan (discord) Heyo, is it possible to get some 👀 on this PR? Flexget/Flexget#3415 It's pretty straight forward
FlexGet Bot
gazpachoking (discord) @aidan Looks good, just had one comment
FlexGet Bot
gazpachoking (discord) So, who wants to make a managed list plugin for the plex watchlist?
gazpachoking (discord) Dunno if we want/need a dep, but this library just added support. https://github.com/pkkid/python-plexapi/releases/tag/4.11.0
FlexGet Bot
BrutuZ (discord) Don't Plex Watchlists only have items Plex can already play directly (either in a server or a supported service)? What would be a use-case for those on Flexget?
FlexGet Bot
gazpachoking (discord) Plex watchlists are new, and can have anything in them
gazpachoking (discord) It's different than playlists
gazpachoking (discord) There are a bunch of trailers that you can browse on plex now, and I want to be able to add them to my watchlist from the plex interface, then have flexget add them to my movie queue