dll integration
This commit is contained in:
@@ -0,0 +1,131 @@
|
||||
# NFOGuard Emby Plugin - WSL Development Setup
|
||||
|
||||
This guide helps you build the NFOGuard Emby plugin on Windows using WSL (Windows Subsystem for Linux).
|
||||
|
||||
## Prerequisites
|
||||
|
||||
### 1. Install .NET SDK in WSL
|
||||
```bash
|
||||
# Update package list
|
||||
sudo apt update
|
||||
|
||||
# Install .NET SDK 6.0 (supports .NET Framework 4.8 development)
|
||||
sudo apt install -y dotnet-sdk-6.0
|
||||
|
||||
# Verify installation
|
||||
dotnet --version
|
||||
```
|
||||
|
||||
### 2. Get Emby SDK Files
|
||||
You need to obtain the Emby SDK DLLs from an Emby Server installation:
|
||||
|
||||
**Option A: From existing Emby Server**
|
||||
1. Locate your Emby Server installation directory:
|
||||
- Windows: `C:\Program Files\Emby-Server\System`
|
||||
- Or wherever you installed Emby Server
|
||||
|
||||
2. Copy these files to `NFOguard/EmbySDK/`:
|
||||
- `MediaBrowser.Common.dll`
|
||||
- `MediaBrowser.Controller.dll`
|
||||
- `MediaBrowser.Model.dll`
|
||||
|
||||
**Option B: Download from official sources**
|
||||
- Check the [Emby Plugin Development docs](https://dev.emby.media/doc/plugins/dev/index.html)
|
||||
|
||||
### 3. Prepare EmbySDK Directory
|
||||
```bash
|
||||
# From the NFOguard directory
|
||||
mkdir -p EmbySDK
|
||||
|
||||
# Copy the DLL files here (use Windows Explorer or copy commands)
|
||||
# You should have:
|
||||
# EmbySDK/MediaBrowser.Common.dll
|
||||
# EmbySDK/MediaBrowser.Controller.dll
|
||||
# EmbySDK/MediaBrowser.Model.dll
|
||||
```
|
||||
|
||||
## Building the Plugin
|
||||
|
||||
### Option 1: Using Build Script (Recommended)
|
||||
```bash
|
||||
cd NFOGuard.Emby.Plugin
|
||||
./build.sh
|
||||
```
|
||||
|
||||
### Option 2: Manual Build
|
||||
```bash
|
||||
cd NFOGuard.Emby.Plugin
|
||||
|
||||
# Clean previous builds
|
||||
rm -rf bin obj
|
||||
|
||||
# Build the project
|
||||
dotnet build NFOGuard.Emby.Plugin.csproj -c Release -f net48
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Common Issues
|
||||
|
||||
**1. "MediaBrowser.* not found" errors:**
|
||||
- Ensure SDK DLLs are in `../EmbySDK/` relative to the .csproj file
|
||||
- Check DLL file names match exactly (case-sensitive on Linux)
|
||||
|
||||
**2. ".NET Framework 4.8 targeting pack" errors:**
|
||||
```bash
|
||||
# Install Mono for .NET Framework support
|
||||
sudo apt install mono-complete
|
||||
```
|
||||
|
||||
**3. Permission errors:**
|
||||
```bash
|
||||
# Make build script executable
|
||||
chmod +x build.sh
|
||||
```
|
||||
|
||||
**4. WSL file system issues:**
|
||||
- Make sure you're working in the Linux filesystem (`/home/...`) not Windows mounts (`/mnt/c/...`) for better performance
|
||||
- If files are on Windows side, they may have permission/line ending issues
|
||||
|
||||
### Verifying Build Success
|
||||
|
||||
After successful build:
|
||||
```bash
|
||||
# Check if DLL was created
|
||||
ls -la bin/Release/net48/NFOGuard.Emby.Plugin.dll
|
||||
|
||||
# Check file size (should be > 0 bytes)
|
||||
file bin/Release/net48/NFOGuard.Emby.Plugin.dll
|
||||
```
|
||||
|
||||
## Deployment to Windows Emby Server
|
||||
|
||||
1. **Locate Emby plugins directory:**
|
||||
- `C:\ProgramData\Emby-Server\plugins`
|
||||
|
||||
2. **Copy from WSL to Windows:**
|
||||
```bash
|
||||
# From WSL, copy to Windows (adjust path as needed)
|
||||
cp bin/Release/net48/NFOGuard.Emby.Plugin.dll /mnt/c/ProgramData/Emby-Server/plugins/
|
||||
```
|
||||
|
||||
3. **Restart Emby Server**
|
||||
|
||||
4. **Verify in Emby Dashboard:**
|
||||
- Go to Dashboard → Plugins
|
||||
- Look for "NFOGuard" in installed plugins
|
||||
|
||||
## Development Tips
|
||||
|
||||
- Use VS Code in WSL for editing: `code .`
|
||||
- Keep source files in WSL filesystem for best performance
|
||||
- Only copy final DLL to Windows Emby server
|
||||
- Use `tail -f /var/log/emby.log` (or wherever Emby logs are) to monitor plugin activity
|
||||
|
||||
## Next Steps
|
||||
|
||||
Once built and deployed:
|
||||
1. Test with a new TV episode import
|
||||
2. Check Emby logs for NFOGuard messages
|
||||
3. Verify DateCreated syncs to PremiereDate in database
|
||||
4. Configure licensing when ready for production use
|
||||
Reference in New Issue
Block a user