This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // import { relayPool } from 'nostr-tools'; | |
| // import { validateEvent } from 'nostr-tools'; | |
| import { relayPool, type RelayPool } from './lib/nostr-tools'; | |
| import { validateEvent } from './lib/nostr-tools'; | |
| import { db } from './db'; | |
| import type { IProfile, IEvent } from './db'; | |
| import { snooze, setImmediate, yieldMicrotask } from './utils'; | |
| export class $Data { | |
| public pool!: RelayPool; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // import { relayPool } from 'nostr-tools'; | |
| // import { validateEvent } from 'nostr-tools'; | |
| import { relayPool } from './lib/nostr-tools'; | |
| import { validateEvent } from './lib/nostr-tools'; | |
| import { db } from './db'; | |
| import type { IProfile, IEvent } from './db'; | |
| export class Data { | |
| private static _instance: Data = new this(); | |
| public pool; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use crate::utils::timer; | |
| use serde::{Deserialize, Serialize}; | |
| use std::collections::HashMap; | |
| use std::sync::Arc; | |
| use surf::http::{Method, Url}; | |
| use surf::{Client, Response, StatusCode}; | |
| use tokio::sync::Mutex; | |
| #[derive(Clone, Debug)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use bytes::BytesMut; | |
| use env_logger; | |
| use futures::{SinkExt, StreamExt}; | |
| use futures_util::stream::{SplitSink, SplitStream}; | |
| use log::{debug, error}; | |
| use serde_derive::Deserialize; | |
| use std::{collections::HashMap, net::SocketAddr, process::Stdio}; | |
| use tokio::{ | |
| io::{AsyncReadExt, AsyncWriteExt}, | |
| net::{TcpListener, TcpStream}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use serde::{Deserialize, Serialize}; | |
| use serde_json::Value; | |
| use std::path::PathBuf; | |
| use tauri::Config; | |
| use uuid::Uuid; | |
| #[derive(Clone)] | |
| pub struct DataPaths { | |
| pub app_dir: PathBuf, | |
| pub user_data: PathBuf, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {"responseContext":{"serviceTrackingParams":[{"service":"GFEEDBACK","params":[{"key":"browse_id","value":"FEmusic_explore"},{"key":"logged_in","value":"0"},{"key":"e","value":"1714253,23804281,23882685,23918597,23934970,23946420,23966208,23983296,23998056,24001373,24002022,24002025,24004644,24007246,24034168,24036948,24077241,24080738,24120820,24135310,24140247,24161116,24164186,24169501,24181174,24185614,24187043,24187377,24191629,24197450,24199724,24199774,24200839,24211178,24217535,24219382,24219713,24226335,24227844,24241378,24243988,24246430,24248385,24249032,24255165,24255543,24255545,24260783,24262346,24263796,24265820,24267564,24267570,24268142,24268870,24272791,24276632,24277989,24278084,24278489,24278545,24278596,24279196,24279628,24279929,24280257,24280768,24281189,24281190,24283280,24287795,24289901,24290131,24290971,24292296,24293107,24293596,24295335,24590921,39322399"}]},{"service":"CSI","params":[{"key":"c","value":"WEB_REMIX"},{"key":"cver","value":"1.20220926.01.00"},{"key":"yt_li","value":" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {"responseContext":{"serviceTrackingParams":[{"service":"GFEEDBACK","params":[{"key":"browse_id","value":"FEmusic_explore"},{"key":"logged_in","value":"0"},{"key":"e","value":"1714253,23804281,23882685,23918597,23934970,23946420,23966208,23983296,23998056,24001373,24002022,24002025,24004644,24007246,24034168,24036948,24077241,24080738,24120820,24135310,24140247,24161116,24164186,24169501,24181174,24185614,24187043,24187377,24191629,24197450,24199724,24199774,24200839,24211178,24217535,24219382,24219713,24226335,24227844,24241378,24243988,24246430,24248385,24249032,24255165,24255543,24255545,24260783,24262346,24263796,24265820,24267564,24267570,24268142,24268870,24272791,24276632,24277989,24278084,24278489,24278545,24278596,24279196,24279628,24279929,24280257,24280768,24281189,24281190,24283280,24287795,24289901,24290131,24290971,24292296,24293107,24293596,24295335,24590921,39322399"}]},{"service":"CSI","params":[{"key":"c","value":"WEB_REMIX"},{"key":"cver","value":"1.20220926.01.00"},{"key":"yt_li","value":" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use crate::utils::timer; | |
| use serde::{Deserialize, Serialize}; | |
| use std::collections::HashMap; | |
| use std::sync::Arc; | |
| use surf::http::{Method, Url}; | |
| use surf::{Client, Response, StatusCode}; | |
| use tokio::sync::Mutex; | |
| #[derive(Clone, Debug)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script lang="ts"> | |
| export let data: Item; | |
| import Loading from "$components/Loading/Loading.svelte"; | |
| import { hasContext, onMount, tick } from "svelte"; | |
| import { showAddToPlaylistPopper, showGroupSessionCreator } from "$stores/stores"; | |
| import Icon from "$components/Icon/Icon.svelte"; | |
| import { goto } from "$app/navigation"; | |
| import list, { queue, queuePosition, currentTrack } from "$lib/stores/list"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use serde::{Deserialize, Serialize}; | |
| use surf::http::{Method, Mime, Url}; | |
| use surf::{Client, Response, StatusCode}; | |
| // Parse the http response | |
| pub async fn parse_response(mut response: Response) -> HttpResponse { | |
| let body = if let Ok(body) = response.body_bytes().await { | |
| Some(body) | |
| } else { | |
| None |