Code Monkey home page Code Monkey logo

jellyfin-shikimori-plugin's Introduction

ENG

Jellyfin shikimori plugin

О плагине

Этот плагин загружает метаданные с сайта Shikimori

Плагин поддерживает загрузку метадаты для аниме фильмов и сериалов. Загружает рейтинг, описание, постеры, жанры, студии.

Установка

  1. Зайти в Администрирование -> Панель -> Плагины -> Репозитории.
  2. Добавить новый репозиторий, в поле "URL репозитория" ввести: https://raw.githubusercontent.com/te9c/jellyfin-shikimori-plugin/main/manifest.json.
  3. Установить плагин через каталог.

Сборка

  1. Установить .NET8 SDK
  2. Склонировать этот репозиторий
  3. Скомпилировать плагин следующей командой:
dotnet publish --configuration Release --output bin
  1. Создать директорию shikimori в папке с плагинами джелифина (Она находится в директории конфигурации)
  2. Переместить dll Jellyfin.Plugin.Shikimori.dll и Newtonsoft.Json.dll из директории bin в shikimori, созданной в предыдущем шаге.

jellyfin-shikimori-plugin's People

Contributors

te9c avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

jellyfin-shikimori-plugin's Issues

Проверка на тип по ID

Что должно происходить:

Строка проходит регулярное выражение и никак его в итоге не изменяет.
И исправно вносит метаданные куда нужно :)

Что происходит на самом деле:

Код падает с ошибкой error CS0103: The name 'Regex' does not exist in the current context из за парсинга не существующих тегов (такое поведения наблюдается с данным аниме)

Код воспроизведения ошибки:

Место ошибки в коде:

Минимальный код для повторения данной ошибки

(используя внутренный код плагина)

using System;

public class JellyfinShikimoriPlugin
{
    public static void Main(string[] args)
    {
        string description = "Вы когда-нибудь слышали о летнем призраке? Согласно городской легенде, призрак молодой девушки появляется, когда в небо запускают салют...";
        Console.WriteLine(DeleteTagsInText(description));
    }
    
    private string DeleteTagsInText(string text) {
        text = Regex.Replace(text, @"\[.*?\]", "");
        text = Regex.Replace(text, @" ([.,;: ])", "$1");
        
        return text;
    }
}

Вероятное и самое простое решение:

Обернуть регулярные выражения в try catch и при ошибке возвращать строку без изменений.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.