diff --git a/.env.EXAMPLE b/.env.EXAMPLE index 729f514..205710f 100644 --- a/.env.EXAMPLE +++ b/.env.EXAMPLE @@ -1,4 +1,4 @@ -HASHTAG_FILTER = ichlausche,music,musik,nowplaying,tunetuesday +HASHTAG_FILTER = ichlausche,music,musik,nowplaying,tunetuesday,nowlistening URL_FILTER = song.link,album.link,spotify.com,music.apple.com,bandcamp.com YOUTUBE_API_KEY = CHANGE_ME VERBOSE = false diff --git a/src/lib/server/timeline.ts b/src/lib/server/timeline.ts index 7d6af5f..f462c33 100644 --- a/src/lib/server/timeline.ts +++ b/src/lib/server/timeline.ts @@ -3,7 +3,7 @@ import type { Post, Tag, TimelineEvent } from '$lib/mastodon/response'; import { savePost } from '$lib/server/db'; import { WebSocket } from "ws"; -const YOUTUBE_REGEX = new RegExp(/https?:\/\/(www\.)?youtu((be.com\/.*v=)|(\.be\/))(?[a-zA-Z_0-9-]+)/gm); +const YOUTUBE_REGEX = new RegExp(/https?:\/\/(www\.)?youtu((be.com\/.*?v=)|(\.be\/))(?[a-zA-Z_0-9-]+)/gm); export class TimelineReader { private static _instance: TimelineReader;