Skip to content

Instantly share code, notes, and snippets.

View nielsvanvelzen's full-sized avatar
🟣
¯\_(ツ)_/¯

Niels van Velzen nielsvanvelzen

🟣
¯\_(ツ)_/¯
View GitHub Profile
@nielsvanvelzen
nielsvanvelzen / jellyfin-10_10-api-diff.md
Last active September 23, 2024 17:15
jellyfin-10_10-api-diff.md

Difference

Document info

Value Before After
API version 10.9.11 10.10.0
Jellyfin version 10.9.11 10.10.0

Operations

@nielsvanvelzen
nielsvanvelzen / guide.md
Last active August 26, 2024 03:44
Jellyfin for Android TV debugging guide

Jellyfin for Android TV debugging guide

Install ADB

ADB (Android Debug Bridge) is a command-line tool that allows you to communicate with Android devices. It is bundled with Android Studio or available as standalone download.

Connect to an Android TV device with ADB

Enable developer mode on Android TV

Difference

Document info

Value Before After
API version 10.8.13 10.9.0
Jellyfin version 10.8.13 10.9.0

Operations

@nielsvanvelzen
nielsvanvelzen / plugintest.js
Created February 13, 2023 08:38
jellyfin-plugins-tester
// deno run --allow-net .\plugintest.js
const manifestUrl = 'https://repo.jellyfin.org/master/releases/plugin/manifest-stable.json';
console.log(`Reading from ${manifestUrl}`);
const res = await fetch(manifestUrl);
const json = await res.json();
for (const plugin of json) {
if (plugin.versions.length === 0) throw `Plugin ${plugin.name} doesn't have any versions!?`;
@nielsvanvelzen
nielsvanvelzen / jf-dev-auth.md
Last active November 8, 2024 12:50
Jellyfin API Authorization

Jellyfin API Authorization

To start using the Jellyfin API, authorization is probably the first thing you'll need to do. Jellyfin's authorization options can be a bit confusing because there are a lot of deprecated options.

Generally there are three ways to authenticate: no authorization, user authorization with an access token or authorization with an API key. The first way is easy, just do nothing. But most often you'll need to use either the access token or API key.

Sending authorization values

There are multiple methods for transmitting authorization values, however, some are outdated and scheduled to be removed. It's recommend to use the Authorization header. If header auth isn't an option, the token may be sent through the ApiKey query parameter. Sending secure data in a query parameter is unsafe as the changes of it leaking (via logs, copy-paste actions or by other means) are high. Only use this method as a last resort.

@nielsvanvelzen
nielsvanvelzen / DreamServiceCompat.kt
Last active September 23, 2024 17:05
Extension to DreamService to allow usage of Jetpack Compose inside
import android.service.dreams.DreamService
import androidx.annotation.CallSuper
import androidx.compose.runtime.Composable
import androidx.compose.ui.platform.ComposeView
import androidx.compose.ui.platform.ViewCompositionStrategy
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleRegistry
import androidx.lifecycle.ViewModelStore
import androidx.lifecycle.ViewModelStoreOwner
import androidx.lifecycle.setViewTreeLifecycleOwner
@nielsvanvelzen
nielsvanvelzen / search.md
Created July 9, 2021 14:08
GitHub search queries

GitHub search queries

This is a list of useful search queries that I regularely use on GitHub.

All merged pull requests with no assigned project

is:pr is:merged no:project
@nielsvanvelzen
nielsvanvelzen / JavaExample .java
Created June 5, 2021 13:25
Kotlin SDK - Java sample
package org.jellyfin.sdk.sample.java;
import org.jellyfin.sdk.api.client.HttpClientOptions;
import org.jellyfin.sdk.api.client.KtorClient;
import org.jellyfin.sdk.api.client.Response;
import org.jellyfin.sdk.api.client.compatibility.JavaCallback;
import org.jellyfin.sdk.api.operations.UserApi;
import org.jellyfin.sdk.model.ClientInfo;
import org.jellyfin.sdk.model.DeviceInfo;
import org.jellyfin.sdk.model.api.AuthenticateUserByName;
@nielsvanvelzen
nielsvanvelzen / vite.config.ts
Last active March 16, 2021 09:26
Vite default config
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
// https://vitejs.dev/config/
export default defineConfig({
root: 'src',
base: './',
publicDir: 'static',
build: {
outDir: '../dist',
@nielsvanvelzen
nielsvanvelzen / ServerInfo.java
Last active May 1, 2020 15:52
Model to Kotlin sample
package org.jellyfin.apiclient.model.apiclient;
import org.jellyfin.apiclient.model.system.PublicSystemInfo;
import java.util.Date;
public class ServerInfo {
private String Name;
private String Id;
private String Address;