Giter VIP home page Giter VIP logo

Comments (3)

Andy2244 avatar Andy2244 commented on August 17, 2024

I deleted my custom location and left the setting empty than restarted the server and i got this:
jellyfin_ani_sync.TaskUpdateAnimeList: Could not update anime list; Access to the path 'd:\_configs\jellyfin\cache\anisync\anime-list-full.xml' is denied.

I check the location and found that the plugin created a folder instead of a file?
d:\_configs\jellyfin\cache\anisync\anime-list-full.xml\

So \anime-list-full.xml\ should be a file not a folder?

from jellyfin-ani-sync.

vosmiic avatar vosmiic commented on August 17, 2024

This is why I shy away from dealing with files, Windows and Linux seem to handle things very differently.
I'm not entirely sure why you are getting a Cannot create error since we use FileMode.OpenOrCreate which signifies either open the file if it exists or create it if it does not:

await using (var fileStream = new FileStream(Path, FileMode.OpenOrCreate)) {

Also not sure why it is creating a folder when the custom location settings is empty, it is supposed to detect when the setting is an empty string and use the default folder.
I'll get it spun up on my Windows machine and have a look.

from jellyfin-ani-sync.

vosmiic avatar vosmiic commented on August 17, 2024

Okay, fixed it.
Turns out its because of this line:

Directory.CreateDirectory(Path.EndsWith("/anime-list-full.xml") ? Path.Replace("/anime-list-full.xml", "") : Path);

That would work on Linux because paths are represented with slashes, so here/is/a/path.
However Windows handles paths with a backslash, so here\is\a\path.
I have now changed it so it doesn't matter which OS is being used:
Directory.CreateDirectory(Path.EndsWith("anime-list-full.xml") ? Path.Replace("anime-list-full.xml", "") : Path);

I have tested it on my Windows machine and its now working (I was getting the same issues as you).
The update is on master, but as always the fix will be out in the next release.

from jellyfin-ani-sync.

Related Issues (20)

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.