Fix some youtube videos not being added, add additional filter tag to example

This commit is contained in:
Max Nuding 2023-04-03 17:24:36 +02:00
parent 9711cd163f
commit 2eddb77b74
Signed by: phlaym
GPG Key ID: A06651BAB6777237
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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\/))(?<videoId>[a-zA-Z_0-9-]+)/gm);
const YOUTUBE_REGEX = new RegExp(/https?:\/\/(www\.)?youtu((be.com\/.*?v=)|(\.be\/))(?<videoId>[a-zA-Z_0-9-]+)/gm);
export class TimelineReader {
private static _instance: TimelineReader;