Compare commits

...

15 Commits

Author SHA1 Message Date
DarkFighterLuke 604ed24f7c Update version 2024-04-18 21:51:33 +02:00
DarkFighterLuke eefdd2a635 Merge pull request #2 from ThisIsHetz/ThisIsHetz-Patch-1
Add fix for unclosed HTML breaks
2024-04-18 21:36:19 +02:00
Patrick Hetz 30715d5c26 Add fix for unclosed HTML breaks
This changes the order of operations, truncating description before
replacing newlines with HTML breaks, to prevent the creation of unclosed
breaks which may otherwise cause rendering issues in Jellyfin.
2024-04-18 07:29:42 -04:00
DarkFighterLuke c12340583e Change old repository references 2024-04-17 23:01:33 +02:00
DarkFighterLuke a9b335f797 Update README.md
Delete references to old tubearchivist-jf
2024-04-17 22:59:23 +02:00
DarkFighterLuke 6d5c0b86b2 Update README.md
Update references to point to the new repository
2024-04-17 22:48:55 +02:00
DarkFighterLuke 347b2131db Merge branch 'master' of github.com:DarkFighterLuke/TubeArchivistMetadata 2024-03-15 10:15:32 +01:00
DarkFighterLuke 5a7b43f6e9 Add new version 2024-03-15 10:15:19 +01:00
DarkFighterLuke 6f6cb3dab6 Fix bug on description length substringing 2024-03-15 10:11:25 +01:00
DarkFighterLuke 80b236d643 Update README.md 2024-03-14 22:11:26 +01:00
DarkFighterLuke 8b491ee673 Add new version 2024-03-14 21:51:12 +01:00
DarkFighterLuke 7e6a757aa1 Make maximum description length configurable 2024-03-14 21:47:12 +01:00
DarkFighterLuke c3b2512f6a Truncate descriptions to 500 characters 2024-03-14 21:26:53 +01:00
DarkFighterLuke df36579616 Add new version 2024-03-14 20:01:06 +01:00
DarkFighterLuke 46088c2373 Add episodes and series overview 2024-03-14 19:56:23 +01:00
9 changed files with 104 additions and 30 deletions
+3 -3
View File
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<Version>1.1.1.0</Version>
<AssemblyVersion>1.1.1.0</AssemblyVersion>
<FileVersion>1.1.1.0</FileVersion>
<Version>1.2.3.0</Version>
<AssemblyVersion>1.2.3.0</AssemblyVersion>
<FileVersion>1.2.3.0</FileVersion>
</PropertyGroup>
</Project>
@@ -31,6 +31,7 @@ namespace Jellyfin.Plugin.TubeArchivistMetadata.Configuration
CollectionTitle = string.Empty;
_tubeArchivistUrl = string.Empty;
TubeArchivistApiKey = string.Empty;
MaxDescriptionLength = 500;
}
/// <summary>
@@ -66,5 +67,10 @@ namespace Jellyfin.Plugin.TubeArchivistMetadata.Configuration
/// Gets or sets TubeArchivist API key.
/// </summary>
public string TubeArchivistApiKey { get; set; }
/// <summary>
/// Gets or sets maximum series and episodes overviews length.
/// </summary>
public int MaxDescriptionLength { get; set; }
}
}
@@ -27,6 +27,11 @@
<input id="TubeArchivistApiKey" name="TubeArchivistApiKey" type="text" is="emby-input" />
<div class="fieldDescription">TubeArchivist API key</div>
</div>
<div class="inputContainer">
<label class="inputLabel inputLabelUnfocused" for="MaxDescriptionLength">Maximum overviews length</label>
<input id="MaxDescriptionLength" name="MaxDescriptionLength" type="number" is="emby-input" min="0" />
<div class="fieldDescription">This is the maximum length of the descriptions showed in series and episodes</div>
</div>
<div>
<button is="emby-button" type="submit" class="raised button-submit block emby-button">
<span>Save</span>
@@ -47,6 +52,7 @@
document.querySelector('#CollectionTitle').value = config.CollectionTitle;
document.querySelector('#TubeArchivistUrl').value = config.TubeArchivistUrl;
document.querySelector('#TubeArchivistApiKey').value = config.TubeArchivistApiKey;
document.querySelector('#MaxDescriptionLength').value = config.MaxDescriptionLength;
Dashboard.hideLoadingMsg();
});
});
@@ -58,6 +64,7 @@
config.CollectionTitle = document.querySelector('#CollectionTitle').value;
config.TubeArchivistUrl = document.querySelector('#TubeArchivistUrl').value;
config.TubeArchivistApiKey = document.querySelector('#TubeArchivistApiKey').value;
config.MaxDescriptionLength = document.querySelector('#MaxDescriptionLength').value;
ApiClient.updatePluginConfiguration(TAMetadataConfig.pluginUniqueId, config).then(function (result) {
Dashboard.processPluginConfigurationUpdateResult(result);
});
@@ -1,6 +1,7 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using Jellyfin.Plugin.TubeArchivistMetadata.Utilities;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Entities.TV;
using MediaBrowser.Model.Entities;
@@ -109,6 +110,7 @@ namespace Jellyfin.Plugin.TubeArchivistMetadata.TubeArchivist
return new Series
{
Name = Name,
Overview = Utils.FormatDescription(Description),
Studios = new[] { Name },
ProviderIds = new Dictionary<string, string>()
{
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Globalization;
using System.Linq;
using Jellyfin.Plugin.TubeArchivistMetadata.Utilities;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Entities.TV;
using MediaBrowser.Model.Entities;
@@ -113,6 +114,7 @@ namespace Jellyfin.Plugin.TubeArchivistMetadata.TubeArchivist
return new Episode
{
Name = Title,
Overview = Utils.FormatDescription(Description),
SeasonName = Published.Year.ToString(CultureInfo.CurrentCulture),
ParentIndexNumber = Published.Year,
SeriesName = Channel.Name,
@@ -31,5 +31,27 @@ namespace Jellyfin.Plugin.TubeArchivistMetadata.Utilities
return cleanedUrl;
}
/// <summary>
/// Format episodes and series descriptions replacing newlines with br tags.
/// </summary>
/// <param name="description">String to format.</param>
/// <returns>A string with \n replaced by br tags.</returns>
public static string FormatDescription(string description)
{
var maxLength = 500;
if (Plugin.Instance != null)
{
maxLength = Plugin.Instance.Configuration.MaxDescriptionLength;
}
if (description.Length > maxLength)
{
description = description.Substring(0, maxLength);
description = description.Replace("\n", "<br>", System.StringComparison.CurrentCulture);
}
return description;
}
}
}
+24 -20
View File
@@ -1,18 +1,16 @@
<h1 align="center">Jellyfin TubeArchivist Plugin</h1>
<p align="center">
<img alt="Plugin Banner" src="https://raw.githubusercontent.com/DarkFighterLuke/TubeArchivistMetadata/master/images/logo.png"/>
<img alt="Plugin Banner" src="https://raw.githubusercontent.com/tubearchivist/tubearchivist-jf-plugin/master/images/logo.png"/>
<br/>
</p>
## About
<p>This plugin adds the metadata provider for <a href="https://www.tubearchivist.com/">TubeArchivist</a>.</p>
<p>This plugin offers improved flexibility and native integration with Jellyfin compared to <a href="https://github.com/tubearchivist/tubearchivist-jf">tubearchivist-jf</a> solution.<br> This solution runs also more smoothly than the cited one since it is direcly integrated in Jellyfin and it is not based on strict folder paths on the disk.<br>
Furthermore, it allows to configure a custom collection name.</p>
<p>This plugin adds the metadata provider for <a href="https://www.tubearchivist.com/">TubeArchivist</a>, offering improved flexibility and native integration with Jellyfin compared to previous solutions.</p>
## How it works
The media organization is the same used in [tubearchivist-jf](https://github.com/tubearchivist/tubearchivist-jf), so the collection will be a `Shows` collection, where each channel is a show and its videos are the episodes, organized in seasons by year.<br>
The media organization is a `Shows` collection, where each channel is a show and its videos are the episodes, organized in seasons by year.<br>
The plugin interacts with TubeArchivist APIs to fetch videos and channels metadata.
### Features
@@ -27,26 +25,31 @@ The plugin interacts with TubeArchivist APIs to fetch videos and channels metada
1. Go to `Dashboard -> Plugins` and select the `Repositories` tab
2. Add a new repository with the following details:
- Repository name: `TubeArchivistMetadata`
- Repository URL: `https://github.com/DarkFighterLuke/TubeArchivistMetadata/raw/master/manifest.json`
![Add repository](https://github.com/DarkFighterLuke/TubeArchivistMetadata/assets/31162436/bc291599-dc5b-4f44-b401-ebf20c016d72)
- Repository URL: `https://github.com/tubearchivist/tubearchivist-jf-plugin/raw/master/manifest.json`
![Add repository](https://github.com/tubearchivist/tubearchivist-jf-plugin/assets/31162436/b0216b21-79c4-445b-8cf1-fbf6b138dee0)
3. Go to the `Catalog` tab
4. Find `TubeArchivistMetadata` in the `Metadata` section and install it
![Find plugin](https://github.com/DarkFighterLuke/TubeArchivistMetadata/assets/31162436/86897215-bac5-4cef-8bd3-ffec731b0875)
![Find plugin](https://github.com/tubearchivist/tubearchivist-jf-plugin/assets/31162436/86897215-bac5-4cef-8bd3-ffec731b0875)
5. Restart Jellyfin to apply the changes
### From ZIP in GitHub releases
1. Download the latest available release (`TubeArchivist-*.zip`) from the repository releases section
1. Download the latest available release (`TubeArchivistMetadata-*.zip`) from the repository releases section
2. Extract the contained files in the `plugins/TubeArchivistMetadata` folder (you might need to create the folders) of your Jellyfin installation
3. Restart Jellyfin to apply the changes
3. Restart Jellyfin to apply the changes
## Configuration
<p>This plugin requires that you have already an instance of TubeArchivist up and running.</p>
Once installed, you have to configure the following parameters in the plugin configuration:
- Collection display name
- TubeArchivist instance address
- TubeArchivist API key
<ul>
<li>Collection display name</li>
<li>TubeArchivist instance address</li>
<li>TubeArchivist API key</li>
<li>Overviews length (channels and videos descriptions)</li>
</ul>
![Plugin configuration](https://github.com/tubearchivist/tubearchivist-jf-plugin/assets/31162436/d34464ea-ddfb-44b3-9d3e-5d5974956c58)
![Plugin configuration](https://github.com/DarkFighterLuke/TubeArchivistMetadata/assets/31162436/fbd97e50-4c6f-45e4-9a6a-7067eae2e8f3)
## Use the plugin
<p>Using the plugin is very simple. Let's start from the beginning:</p>
@@ -54,9 +57,10 @@ Once installed, you have to configure the following parameters in the plugin con
_NOTE: If you are using Docker containers, it is important to mount the TubeArchivist media path into Jellyfin container as **read-only**, in order to avoid possible operations on the media files that will break TubeArchivist._ <br>
1. Go to `Dashboard -> Libraries` and add a media library
2. In the form select `Shows` as Content type, set a display name for the library and set the TubeArchivist media folder in the `Folders` section
![Add library](https://github.com/DarkFighterLuke/TubeArchivistMetadata/assets/31162436/1eca534e-0929-4134-8587-3cff0009f618)
3. Scrolling down, uncheck all metadata and image providers except `TubeArchivist`. (You won't find TubeArchivist in seasons providers, so just disable everything there)
4. Save and come back to Home, you will see the newly added library. Jellyfin will have executed the metadata fetching for you after the collection creation and then you will see the metadata and the images of channels and videos
![Add library](https://github.com/tubearchivist/tubearchivist-jf-plugin/assets/31162436/1eca534e-0929-4134-8587-3cff0009f618)
4. Scrolling down, uncheck all metadata and image providers except `TubeArchivist`. (You won't find TubeArchivist in seasons providers, so just disable everything there)
5. Save and come back to Home, you will see the newly added library. Jellyfin will have executed the metadata fetching for you after the collection creation and then you will see the metadata and the images of channels and videos
## Build
@@ -64,10 +68,10 @@ _NOTE: If you are using Docker containers, it is important to mount the TubeArch
2. Build plugin with following command
```
dotnet publish Jellyfin.Plugin.TubeArchivistMetadata --configuration Release --output bin
dotnet publish Jellyfin.Plugin.tubearchivist-jf-plugin --configuration Release --output bin
```
3. Place the dll-file in the `plugins/TubeArchivistMetadata` folder (you might need to create the folders) of your Jellyfin installation
3. Place the dll-file in the `plugins/tubearchivist-jf-plugin` folder (you might need to create the folders) of your Jellyfin installation
## License
+2 -3
View File
@@ -1,7 +1,7 @@
---
name: "TubeArchivistMetadata"
guid: "dc97d0c6-28b0-4242-afb4-5833ae1b3715"
version: "1.1.1.0"
version: "1.2.3.0"
targetAbi: "10.8.0.0"
framework: "net6.0"
overview: "Metadata for your TubeArchivist library on Jellyfin"
@@ -13,5 +13,4 @@ owner: "DarkFighterLuke"
artifacts:
- "Jellyfin.Plugin.TubeArchivistMetadata.dll"
changelog: >
Fix URL by removing trailing slash for images
Handle empty tags for videos and channels
Add fix for unclosed HTML breaks
+36 -4
View File
@@ -6,13 +6,45 @@
"description": "A new and fully integrated way to manage metadata and organize your TubeArchivist library videos on Jellyfin.",
"owner": "DarkFighterLuke",
"overview": "Metadata for your TubeArchivist library on Jellyfin",
"imageUrl": "https://raw.githubusercontent.com/DarkFighterLuke/TubeArchivistMetadata/master/images/logo.png",
"imageUrl": "https://raw.githubusercontent.com/tubearchivist/tubearchivist-jf-plugin/master/images/logo.png",
"versions": [
{
"version": "1.2.3.0",
"changelog": "Add fix for unclosed HTML breaks\n",
"targetAbi": "10.8.0.0",
"sourceUrl": "https://github.com/tubearchivist/tubearchivist-jf-plugin/releases/download/v1.2.3/TubeArchivistMetadata-1.2.3.zip",
"checksum": "f5328a662444739eaa7c59855bfcb203",
"timestamp": "2024-04-18 21:45:00"
},
{
"version": "1.2.2.0",
"changelog": "Fix bug on description length substringing\n",
"targetAbi": "10.8.0.0",
"sourceUrl": "https://github.com/tubearchivist/tubearchivist-jf-plugin/releases/download/v1.2.2/TubeArchivistMetadata-1.2.2.zip",
"checksum": "82d04546916e1ba76d56de28e648447a",
"timestamp": "2024-03-15 10:12:00"
},
{
"version": "1.2.1.0",
"changelog": "Make maximum description length configurable\nTruncate descriptions to 500 characters\n",
"targetAbi": "10.8.0.0",
"sourceUrl": "https://github.com/tubearchivist/tubearchivist-jf-plugin/releases/download/v1.2.1/TubeArchivistMetadata-1.2.1.zip",
"checksum": "cf68d169956f166a6ee68a06192651c2",
"timestamp": "2024-03-14 21:50:00"
},
{
"version": "1.2.0.0",
"changelog": "Add episodes and series overview\n",
"targetAbi": "10.8.0.0",
"sourceUrl": "https://github.com/tubearchivist/tubearchivist-jf-plugin/releases/download/v1.2.0/TubeArchivistMetadata-1.2.0.zip",
"checksum": "75812a4464bf68c43fb9dcdb74d924e3",
"timestamp": "2024-03-14 20:00:00"
},
{
"version": "1.1.1.0",
"changelog": "Handle empty tags for videos and channels\nFix URL by removing trailing slash for images\n",
"targetAbi": "10.8.0.0",
"sourceUrl": "https://github.com/DarkFighterLuke/TubeArchivistMetadata/releases/download/v1.1.1/TubeArchivistMetadata-1.1.1.zip",
"sourceUrl": "https://github.com/tubearchivist/tubearchivist-jf-plugin/releases/download/v1.1.1/TubeArchivistMetadata-1.1.1.zip",
"checksum": "84ce752ce662e834690512c88ba48664",
"timestamp": "2024-03-14 16:35:00"
},
@@ -20,7 +52,7 @@
"version": "1.1.0.0",
"changelog": "Fix field name and add placeholders\nFix URL in logs after redirection\nAdd schema to TubeArchivist URL if not present in settings\nFix a particular case\nLog configuration settings at initialization\nSanitize URLs\n",
"targetAbi": "10.8.0.0",
"sourceUrl": "https://github.com/DarkFighterLuke/TubeArchivistMetadata/releases/download/v1.1.0/TubeArchivistMetadata-1.1.0.zip",
"sourceUrl": "https://github.com/tubearchivist/tubearchivist-jf-plugin/releases/download/v1.1.0/TubeArchivistMetadata-1.1.0.zip",
"checksum": "de4b6562973b7f75b6afe3a441bb0e19",
"timestamp": "2024-03-13 15:02:00"
},
@@ -28,7 +60,7 @@
"version": "1.0.0.0",
"changelog": "First release\n",
"targetAbi": "10.8.0.0",
"sourceUrl": "https://github.com/DarkFighterLuke/TubeArchivistMetadata/releases/download/v1.0.0/TubeArchivistMetadata-1.0.0.zip",
"sourceUrl": "https://github.com/tubearchivist/tubearchivist-jf-plugin/releases/download/v1.0.0/TubeArchivistMetadata-1.0.0.zip",
"checksum": "444f8980671de494b1875ee7d1657bcf",
"timestamp": "2024-03-11 16:02:00"
}