Thank you for your interest in contributing to Tubifarry! This guide will help you set up your development environment and understand our contribution process. Tubifarry is a plugin for Lidarr that extends its functionality.
- Prerequisites
- Understanding the Architecture
- Automatic Setup (Recommended)
- Build Automation Explained
- Manual Setup (Fallback)
- Development Workflow
- Contributing Code
- Pull Request Guidelines
- Troubleshooting
- Getting Help
Before you begin, ensure you have the following installed on your system:
- Visual Studio 2022 or higher (Community edition is free)
- Download: https://visualstudio.com/downloads/
- Must include .NET 8 SDK (VS 2022 V17.0+)
- Git - Version control system
- Node.js 20.x - JavaScript runtime for frontend development
- Download: https://nodejs.org/
⚠️ Important: Versions 18.x, 16.x, or 21.x will NOT work
- Yarn - Package manager for Node.js dependencies
- Included with Node 20+ (enable with
corepack enable) - For other versions:
npm i -g corepack
- Included with Node 20+ (enable with
- Rider by JetBrains (alternative to Visual Studio)
- VS Code or similar text editor for quick edits
- Windows: Windows 10/11
- Linux: Any modern distribution
- macOS: 10.14+ (Mojave or newer)
- RAM: Minimum 8GB (16GB recommended)
- Storage: At least 5GB free space for the full build
Tubifarry is built as a plugin that integrates with Lidarr's core functionality:
- Lidarr Core: The base music management application (included as a Git submodule)
- Tubifarry Plugin: Your plugin code that extends Lidarr
- Frontend: React-based UI (part of Lidarr)
- Backend: C# .NET 8 code (both Lidarr and Tubifarry)
- Lidarr Submodule: Tubifarry includes Lidarr as a Git submodule, which means it contains a reference to a specific version of Lidarr
- Force Push Warning: The Lidarr develop branch is regularly rebased and force-pushed. This is normal and expected behavior
- Build Order Matters: You must build Lidarr completely before building Tubifarry
- First Build Takes Time: The initial setup can take 5-10 minutes, but subsequent builds are much faster
The project includes build automation that handles most of the setup process automatically. This is the fastest way to get started.
git clone https://github.com/TypNull/Tubifarry.gitOr if you've forked the repository:
git clone https://github.com/YOUR-USERNAME/Tubifarry.git-
Open
Tubifarry.slnin Visual Studio -
Build the solution by pressing
Ctrl + Shift + B(orBuild→Build Solution)⏳ Wait patiently - This first build will take some time depending on your internet connection and PC performance. The build automation will:
- Initialize and clone all Git submodules (Lidarr source code)
- Install Node.js dependencies via Yarn
- Build the Lidarr frontend
You can monitor progress in the Output window (
View→Output).⚠️ You will see errors on this build.
After the first build completes:
- Close Visual Studio completely
- Reopen Visual Studio
- Open
Tubifarry.slnagain
This ensures Visual Studio properly recognizes all the newly generated files and references.
-
Build the solution again (
Ctrl + Shift + B)⚠️ You may see some errors on this build - these can be ignored. -
Build once more (
Ctrl + Shift + B)The build should now complete successfully.
- In Solution Explorer, navigate to:
Submodules→Lidarr→ findLidarr.Console - Right-click on
Lidarr.Console - Select "Set as Startup Project"
Press F5 or click the Start button to run Lidarr.
That's it! If everything worked, you're ready to start developing. If you encountered errors, see the Manual Setup or Troubleshooting sections below.
The project uses several MSBuild .targets files to automate the setup and build process. Understanding these can help with troubleshooting.
This file handles automatic setup before the main build starts:
Submodule Initialization (InitializeSubmodules target)
- Checks if the Lidarr submodule exists by looking for
Submodules/Lidarr/src/NzbDrone.Core/Lidarr.Core.csproj - If missing, automatically runs
git submodule update --init --recursive
Frontend Build (LidarrFrontendBuild target)
- Checks if the Lidarr frontend has been built by looking for
Submodules/Lidarr/_output/UI/ - If missing, automatically runs:
yarn install- Downloads all Node.js dependenciesyarn build- Compiles the React frontend
- This can take several minutes on first run
After the build completes, this file merges all plugin dependencies into a single DLL:
In Debug configuration, this file automatically deploys your plugin:
- After ILRepack finishes, copies the plugin files to Lidarr's plugin directory:
C:\ProgramData\Lidarr\plugins\AUTHOR\Tubifarry\
- Allows immediate testing without manual file copying
The targets execute in this order:
InitializeSubmodules→ Ensures Lidarr source existsLidarrFrontendBuild→ Ensures frontend is compiledBeforeBuild→ Standard .NET build preparationBuild→ Compiles Tubifarry codeCopySystemTextJson→ Copies required runtime DLLILRepacker→ Merges all assembliesPostBuild(Debug only) → Deploys to plugin folder
If the automatic setup fails or you prefer manual control, follow these steps.
-
Fork the Repository
- Go to https://github.com/TypNull/Tubifarry
- Click the "Fork" button in the top right
- This creates your own copy of the repository
-
Clone Your Fork
git clone https://github.com/YOUR-USERNAME/Tubifarry.git cd Tubifarry
The Tubifarry repository includes Lidarr as a submodule. You need to initialize and download it:
git submodule update --init --recursiveThis command downloads the Lidarr source code into the submodule directory. This may take a few minutes depending on your internet connection.
Check that the Lidarr submodule was properly initialized:
cd Submodules/Lidarr/
git statusYou should see the Lidarr repository files.
The frontend must be built before proceeding to the backend.
-
Navigate to the Lidarr submodule directory
cd Submodules/Lidarr/ -
Install Node dependencies
yarn install
This downloads all required JavaScript packages. First time takes 2-5 minutes.
-
Build the frontend (or start the watcher for development)
yarn build
Or for active development with hot-reload:
yarn start
Important: If using
yarn start, keep this terminal window open.
-
Open the Lidarr solution in Visual Studio
- Navigate to the Lidarr submodule directory
- Open
Lidarr.slnin Visual Studio 2022
-
Configure the startup project
- Right-click on
Lidarr.Consolein Solution Explorer - Select "Set as Startup Project"
- Right-click on
-
Build the solution
- Click
Build→Build Solution(or pressCtrl+Shift+B) - Wait for the build to complete (first build takes a bit time)
- Watch the Output window for any errors
- Click
Now that Lidarr is fully built, you can build the Tubifarry plugin.
-
Navigate back to the Tubifarry root directory
cd [path-to-Tubifarry-root] -
Open the Tubifarry solution
- Open
Tubifarry.slnin Visual Studio (in a new instance or after closing Lidarr solution)
- Open
-
Wait for dependencies to load
- Visual Studio will restore NuGet packages automatically
- Wait until the status bar shows "Ready"
-
Build the Tubifarry solution
- Click
Build→Build Solution - The plugin will automatically copy to the correct directory on Windows in Debug mode
- Click
If the automatic deployment doesn't work, manually copy the plugin:
- Find the built plugin at:
Tubifarry/bin/Debug/net8.0/Lidarr.Plugin.Tubifarry.dll - Copy to:
C:\ProgramData\Lidarr\plugins\AUTHOR\Tubifarry\ - Also copy the
.pdband.deps.jsonfiles if they exist
Once you've completed the initial setup, your typical workflow will be:
-
Make your changes to Tubifarry code in Visual Studio
-
Build Tubifarry to test your changes (
Ctrl + Shift + B) -
Run and test
- Ensure
Lidarr.Consoleis set as the startup project - Press
F5to start debugging - Lidarr will start with your plugin loaded
- Access the UI at http://localhost:8686
- Ensure
For faster frontend iteration:
- Keep
yarn startrunning in the Lidarr submodule directory - Frontend changes will automatically refresh in the browser
- Check existing issues: Look at GitHub Issues to see if your feature/bug is already being worked on
- Create an issue: If your idea isn't already tracked, create a new issue to discuss it
- Ask questions: Join our Discord or comment on the issue if you need clarification
-
Code Style
- Use 4 spaces for indentation (not tabs)
- Follow C# naming conventions
- Keep methods focused and reasonably sized
- Add XML documentation comments for public APIs
-
Commit Guidelines
- Make meaningful commits with clear messages
- Use *nix line endings (LF, not CRLF)
- Commit message format:
New: Add Spotify playlist import featureFixed: YouTube download timeout issueImproved: Error handling in Slskd client
-
Code Quality
- Test your changes thoroughly
- Handle errors gracefully
- Add logging for debugging purposes
- Don't leave commented-out code
-
Create a feature branch from
develop(not frommaster)git checkout develop git pull origin develop git checkout -b feature/your-feature-name
-
Use descriptive branch names
- ✅ Good:
feature/spotify-auth,fix/youtube-timeout,improve/error-messages - ❌ Bad:
patch,updates,my-branch
- ✅ Good:
-
Keep your branch updated
git checkout develop git pull origin develop git checkout feature/your-feature-name git rebase develop
- Code builds without errors
- You've tested the changes locally
- Code follows the style guidelines
- Commits are clean and well-organized (consider squashing if needed)
- Branch is up to date with
develop
-
Push your branch to your fork
git push origin feature/your-feature-name
-
Open a Pull Request on GitHub
- Go to your fork on GitHub
- Click "Compare & pull request"
- Target the
developbranch (notmaster)
-
Fill out the PR template
- Describe what your PR does
- Reference any related issues (e.g., "Fixes #123")
- Add screenshots if it's a UI change
- List any breaking changes
-
Respond to feedback
- Maintainers may request changes
- Make the requested updates in your branch
- Push the changes (they'll automatically update the PR)
- We aim to review PRs within a few days
- If it's been longer, feel free to ping us on Discord
- Be patient and respectful during code review
- All PRs require approval before merging
- ⛔ Never make PRs to
master- they will be closed - ⛔ Don't merge
developinto your feature branch - use rebase instead - ✅ Do create one PR per feature/bugfix
- ✅ Do ask questions if you're unsure
Cause: Lidarr backend wasn't fully built before building Tubifarry.
Solution:
- Ensure Lidarr frontend is built (
Submodules/Lidarr/_output/UI/exists) - Open and build
Lidarr.slnfirst - Then build Tubifarry
Cause: Wrong Node.js version or Yarn not enabled.
Solution:
# Check Node version
node --version # Should be 20.x
# Enable Yarn
corepack enable
# Verify Yarn is available
yarn --versionCause: Frontend not rebuilt or browser cache.
Solution:
- Navigate to Lidarr submodule directory
- Run
yarn build(oryarn startfor development) - Refresh your browser with
Ctrl+F5(hard refresh)
Cause: Git submodules weren't initialized.
Solution:
git submodule update --init --recursiveCause: Plugin DLL not copied to correct location.
Solution:
- Check if you're building in Debug configuration (automatic copy only works in Debug)
- Check your build output directory:
Tubifarry/bin/Debug/net8.0/ - Manually copy plugin files to:
C:\ProgramData\Lidarr\plugins\AUTHOR\Tubifarry\ - Restart Lidarr
- Check Lidarr logs for plugin loading errors
Cause: Missing or incompatible assemblies.
Solution:
- Clean the solution (
Build→Clean Solution) - Delete the
binandobjfolders in the Tubifarry project - Rebuild
This is normal! The first build includes:
- Downloading all NuGet packages
- Downloading all Node packages
- Building the frontend (webpack compilation)
- Building everything from scratch
Subsequent builds will be much faster (usually under 1 minute).
Solutions:
- Close unnecessary programs to free up RAM
- Disable unnecessary VS extensions
- Clear VS cache:
Tools→Options→Projects and Solutions→Build and Run→ check "Only build startup projects" - Consider using Rider instead (lighter weight)
If you're still stuck:
- Check existing issues: https://github.com/TypNull/Tubifarry/issues
- Search Discord: Past questions may have been answered
- Ask on Discord: Include:
- What you're trying to do
- What error you're seeing
- What you've already tried
- Your OS and software versions
- GitHub Issues: For bug reports and feature requests
- Servarr Discord: For development questions and discussions
When asking for help, please include:
- What you're trying to accomplish
- What error you're encountering (exact error message)
- What you've already tried
- Your environment:
- Operating System
- Visual Studio version
- .NET SDK version (
dotnet --version) - Node.js version (
node --version)
- Install Visual Studio 2022 with .NET 8 SDK
- Install Git
- Install Node.js 20.x
- Enable Yarn (
corepack enable) - Fork Tubifarry repository
- Clone your fork
- Initialize submodules (
git submodule update --init --recursive) - Build Lidarr frontend (
cd Submodules/Lidarr && yarn install && yarn build) - Build Lidarr backend (open
Lidarr.sln, build) - Build Tubifarry plugin (open
Tubifarry.sln, build) - Test by running Lidarr.Console
- Code builds successfully
- Changes tested locally
- Commits are clean with good messages
- Branch rebased with latest
develop - PR targets
develop(notmaster) - PR description is complete
Thank you for contributing to Tubifarry! Your contributions help make music management better for everyone.