From 10e53111ea03c06c12fbbf13ca70c7ca3dbc21d1 Mon Sep 17 00:00:00 2001 From: Matthew Strasiotto <39424834+matthewstrasiotto@users.noreply.github.com> Date: Sat, 23 Apr 2022 19:57:31 +1000 Subject: [PATCH] Comment vscode settings and tasks --- .vscode/launch.json | 8 +++----- .vscode/settings.json | 9 +++++++++ .vscode/tasks.json | 14 ++++++++++---- 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 3330a80..e132924 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,9 +1,7 @@ { - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + // Paths and plugin names are configured in settings.json "version": "0.2.0", - "configurations": [ + "configurations": [ { "type": "coreclr", "name": "Launch", @@ -18,4 +16,4 @@ "cwd": "${config:jellyfinDir}", } ] -} \ No newline at end of file +} diff --git a/.vscode/settings.json b/.vscode/settings.json index c0a8a54..b4c529b 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,15 @@ { + // jellyfinDir : The directory of the cloned jellyfin server project + // This needs to be built once before it can be used "jellyfinDir" : "${workspaceFolder}/../jellyfin/Jellyfin.Server", + // jellyfinWebDir : The directory of the cloned jellyfin-web project + // This needs to be built once before it can be used "jellyfinWebDir" : "${workspaceFolder}/../jellyfin-web", + // jellyfinDataDir : the root data directory for a running jellyfin instance + // This is where jellyfin stores its configs, plugins, metadata etc + // This is platform specific by default, but on Windows defaults to + // ${env:LOCALAPPDATA}/jellyfin "jellyfinDataDir" : "${env:LOCALAPPDATA}/jellyfin", + // The name of the plugin "pluginName" : "Jellyfin.Plugin.Template", } diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 3717039..cd2f73f 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -1,15 +1,16 @@ { - // See https://go.microsoft.com/fwlink/?LinkId=733558 - // for the documentation about the tasks.json format + // Paths and plugin name are configured in settings.json "version": "2.0.0", - "tasks": [ { + // A chain task - build the plugin, then copy it to your + // jellyfin server's plugin directory "label": "build-and-copy", "dependsOrder": "sequence", "dependsOn": ["build", "make-plugin-dir", "copy-dll"] }, { + // Build the plugin "label": "build", "command": "dotnet", "type": "shell", @@ -26,6 +27,7 @@ "problemMatcher": "$msCompile" }, { + // Ensure the plugin directory exists before trying to use it "label": "make-plugin-dir", "type": "shell", "command": "mkdir", @@ -36,13 +38,17 @@ ] }, { + // Copy the plugin dll to the jellyfin plugin install path + // This command copies every .dll from the build directory to the plugin dir + // Usually, you probablly only need ${config:pluginName}.dll + // But some plugins may bundle extra requirements "label": "copy-dll", "type": "shell", "command": "cp", "args": [ "./${config:pluginName}/bin/Debug/net6.0/publish/*", "${config:jellyfinDataDir}/plugins/${config:pluginName}/" - ] + ] }, ]