Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions mod.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1 @@
export * from "./setup.ts";

export * from "./mixins/browsing.ts";
export * from "./mixins/explore.ts";
export * from "./mixins/library.ts";
export * from "./mixins/playlist.ts";
export * from "./mixins/queue.ts";
export * from "./mixins/search.ts";
export * from "./mixins/uploads.ts";
export * from "./src/mod.ts";
2 changes: 1 addition & 1 deletion auth.ts → src/auth.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import CONSTANTS from "./constants-ng.json" assert { type: "json" };
import CONSTANTS from "../constants-ng.json" assert { type: "json" };
import { RequestClient } from "./request.ts";
import { use_proxy, wait } from "./util.ts";
import { Store } from "./store.ts";
Expand Down
10 changes: 2 additions & 8 deletions client.ts → src/client.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { RequiresLoginEvent } from "./auth.ts";
import { get_album, get_album_browse_id, get_option, setup } from "./mod.ts";
import { get_artist, get_option, setup } from "./mod.ts";
import { FetchClient, RequestInit } from "./request.ts";
import { DenoFileStore } from "./store.ts";
import { debug } from "./util.ts";
Expand Down Expand Up @@ -118,13 +118,7 @@ auth.addEventListener("requires-login", (event) => {
// console.log(await data.text());
// });

const id = await get_album_browse_id(
"OLAK5uy_nF6-ijLz9eO-DMZzhzneNclNBj74Jvjgo",
);

console.log("album browse id", id);

get_album(id!)
get_artist("UCzARU-Ev3-yyu3LovaxxaaA")
// get_playlist("PLCwfwQhurMOukOqbFmYRidZ81ng_2iSUE")
// .then((data) => {
// return get_queue(null, data.playlistId, { autoplay: true });
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 9 additions & 0 deletions src/mod.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export * from "./setup.ts";

export * from "./mixins/browsing.ts";
export * from "./mixins/explore.ts";
export * from "./mixins/library.ts";
export * from "./mixins/playlist.ts";
export * from "./mixins/queue.ts";
export * from "./mixins/search.ts";
export * from "./mixins/uploads.ts";
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion parsers/browsing.ts → src/parsers/browsing.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import STRINGS from "../locales/strings.json" assert { type: "json" };
import STRINGS from "../../locales/strings.json" assert { type: "json" };

import {
BADGE_LABEL,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 7 additions & 5 deletions tests/util.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import { auth, init } from "../mod.ts";
import { DenoFileStore } from "../store.ts";
import { get_option, setup } from "../mod.ts";
import { DenoFileStore } from "../src/store.ts";

export * from "./asserts.ts";
export * from "./deps.ts";
export * from "../mod.ts";

export const setup = async () => {
const auth = get_option("auth");

export const auth_flow = async () => {
const css = {
normal: "font-weight: normal",
bold: "font-weight: bold",
Expand Down Expand Up @@ -38,11 +40,11 @@ export const setup = async () => {
};

export const init_client = () => {
const client = init({
const client = setup({
store: new DenoFileStore("store/muse-store.json"),
});

setup();
auth_flow();

return client;
};