Comic location has changed in Mylar without input

Post any problems / bugs / issues that are Mylar-related in here.
Post Reply
Tippon
Posts: 17
Joined: Mon Sep 27, 2021 11:28 pm

Comic location has changed in Mylar without input

Post by Tippon »

Hi all :D

I set up Mylar about a year ago, and got it up and running correctly, other than needing to rename some comic files. For various reasons, I haven't touched it at all since about October last year. I updated everything and ran the requirements again to make sure that they were updated, but then found that most of my comics were marked as archived.

I've checked a few comics, and the folders have changed from /mnt/kids/Comics/Ongoing/*Comic Name*/*Year* to /mnt/kids/Comics/*Comic Name*/*Year*. Sometimes Mylar has a space before the year, so /mnt/kids/Comics/The Dark Judges The Fall of Deadworld/ 2017/ for example. Going to the comic's page in Mylar and correcting the path lets Mylar find the comic's issues, but doesn't pick up the generated files like series.json or cover.jpg, meaning each comic has to be refreshed manually.

Unfortunately, I don't have any logs from when this happened, as I don't know when it happened, and my current logs have overwritten the older logs.

Is there any way to automatically correct the paths and refresh the comics?

My care package is here - https://www.dropbox.com/s/u3pa2e1b1vim4 ... 9.zip?dl=0

I've just noticed when creating the care package that my version is listed as none / unknown version.

EDIT: Sorry, I'm running Mylar on Xubuntu 22.04.1 LTS
User avatar
evilhero
Site Admin
Posts: 2883
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: Comic location has changed in Mylar without input

Post by evilhero »

Well there's probably a few things happening, but it's hard to tell exactly what because the logs obviously don't show anything being changed, and it being so long since you touched it.

So, from what I can gather, you haven't updated Mylar since October? If that's true, that's a huge amount of bug fixes that were corrected since then.

What I do think may have happened is that you tried to mass manipulate the directories using the locmove option at some point, and that converted the paths so that the Ongoing/ subdirectory was removed from the pathing. Normally that's fine, but if the directories don't exist in the new location it would rename the existing directory so it's pointed to the new location. Now there were a bunch of fixes that went in to address some pathing problems, so I can't recall if back then it was renaming existing, or just creating new ones and ignoring the old ones (leaving them as is).

That's probably the only explanation as to what happened, especially since you have your new folder path set to /mnt/kids/Comics (as it's still in the ini).

The good news is that you can correct it for most of the series probably, by doing the locmove process again (github wiki link here).

Just make sure to set the new_comdir = /mnt/kids/Comics/Ongoing, and the fftonewcom_dir = True (the last one will enforce your folder format that you set in the configuration for all the series). Do not put a trailing slash - while it should handle it fine, there's a chance it might screw up the pathing if there is one (I believe we fixed this a while ago, but can't recall atm)

The most important part is to make sure you do not change the destination_dir location until after the updates, so you have to change it to /mnt/kids/Comics before you restart Mylar to apply the locmove changes, and then once it's done change it back so that the Ongoing aspect is present. And make sure that locmove = False when it's all said and done so it doesn't run again.

Now I said probably most, because using the volumeN as a sub-directory will probbaly not work well when there is no volume set within Mylar for a given series, as atm at least I don't believe there is a way for you to tell Mylar to either keep the v1 or not to use it at all in the folder (as some don't want v1 naming on everything).

So there maybe a few that you might have to go in and manually correct, but that should her you back to a base starting point again hopefully.
Tippon
Posts: 17
Joined: Mon Sep 27, 2021 11:28 pm

Re: Comic location has changed in Mylar without input

Post by Tippon »

evilhero wrote: Tue Aug 09, 2022 6:45 pm What I do think may have happened is that you tried to mass manipulate the directories using the locmove option at some point, and that converted the paths so that the Ongoing/ subdirectory was removed from the pathing...

...That's probably the only explanation as to what happened, especially since you have your new folder path set to /mnt/kids/Comics (as it's still in the ini).
Now that you mention it, I remember moving my collection using locmove back last year. What I don't understand though is how it's gone back to /mnt/kids/Comics and removed the /Ongoing/ folder. I don't think it's a fault of Mylar, or anything like that, but I know I had at least a significant chunk of the collection moved to /Ongoing/. I've managed to screw something up in the meantime without even realising :oops:

I'll use the locmove option again and try to get everything fixed.

Thanks for your help :)
Tippon
Posts: 17
Joined: Mon Sep 27, 2021 11:28 pm

Re: Comic location has changed in Mylar without input

Post by Tippon »

I've got most of the problems with my installation fixed, and have been working through my comics to make sure that the files are found. I've noticed though that the cover picture is showing as not available for most of my comics. The file is in the folder with the comics, and the path is correct on the comic page. The individual comic files are being picked up, so I don't think the path is the problem.

If I refresh the comic, Mylar is pulling fresh metadata from ComicVine and replacing the files with identical content.

Is this normal for metadata that hasn't been updated in a while, or is there a setting I should be changing so that I can use the local files?
User avatar
evilhero
Site Admin
Posts: 2883
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: Comic location has changed in Mylar without input

Post by evilhero »

The images for all the series on your watchlist are stored in the mylar cache directory. While it's true it does store image files like cover.jpg in the series directory, mylar doesn't use those when viewing thru the GUI.

You can set the cache location via the config.ini setting called cache_dir - if not specified, by default it's set to the cache folder within the root of the mylar installation.

I'm guessimg the cache_dir is set to a location that has no pre-existing images downloaded, so you'd have to refresh each series to get them back, or use the api endpoint regenerateCovers to do them en-masse.
Tippon
Posts: 17
Joined: Mon Sep 27, 2021 11:28 pm

Re: Comic location has changed in Mylar without input

Post by Tippon »

That's odd, I've never changed the cahe directory from the default, and it's the same setup I used from when I initially set my comics up. I must have deleted them at some point thinking that they were old files.

Out of curiosity, why doesn't Mylar use the files from the series directory? If it did, it would cut down on the amount of fetching needed if someone reinstalled, and would avoid problems from someone thinking they're being clever and clearing the cache :oops:

How do I use the API endpoint? I'm guessing that it's more than just entering 'http://localhost:8090/api?cmd=<endpoint>' in the browser, but I don't know where to start
User avatar
evilhero
Site Admin
Posts: 2883
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: Comic location has changed in Mylar without input

Post by evilhero »

Mainly it's due to security. The GUI has to be able to access the images and with the way cherrypy works we have to expose the entire structure so it can fast-load. Exposing your entire comic location path to be accessible via the GUI by just putting in the url is a huge security risk, so we limit what we expose (everything in the cache folder is accessible from within the GUI if called directly by url), as the items in the cache are usually jpgs, nzbs and sometimes cbr/cbz files.

The wiki entry for the regenerateCovers API endpoint is here - and yes, you could just enter it into the browser and it will run it that way (keep in mind tho, you'll probably get a blank screen with a response instead of the mylar GUI after it's run since they're not really meant to be run directly in a browser). Make sure you have an api key generated in Mylar, and feed that into the url and you should be good to go thereafter.
Tippon
Posts: 17
Joined: Mon Sep 27, 2021 11:28 pm

Re: Comic location has changed in Mylar without input

Post by Tippon »

Sorry for the slow reply, the notification email got marked as spam, even though I've added it as safe in the past >.<
evilhero wrote: Wed Sep 07, 2022 6:12 pm Mainly it's due to security. The GUI has to be able to access the images and with the way cherrypy works we have to expose the entire structure so it can fast-load. Exposing your entire comic location path to be accessible via the GUI by just putting in the url is a huge security risk, so we limit what we expose (everything in the cache folder is accessible from within the GUI if called directly by url), as the items in the cache are usually jpgs, nzbs and sometimes cbr/cbz files.
That makes sense, thanks.
evilhero wrote: Wed Sep 07, 2022 6:12 pm The wiki entry for the regenerateCovers API endpoint is here - and yes, you could just enter it into the browser and it will run it that way (keep in mind tho, you'll probably get a blank screen with a response instead of the mylar GUI after it's run since they're not really meant to be run directly in a browser). Make sure you have an api key generated in Mylar, and feed that into the url and you should be good to go thereafter.
What's the correct way to run it? I've tried through the browser (on the machine hosting Mylar) just to test it, but with no luck. I've been trying to use one of the examples from the API endpoint page, but with one of my comic IDs

http://localhost:8090/api?cmd=regenerat ... =<MyAPIKey>

and I'm getting this error:

success false
error
code 460
message "Missing parameter: id"

I've tried 109474 for Annihilation: The Complete Collection (2018), and 99844 for American Gods: Shadows (2017)
User avatar
evilhero
Site Admin
Posts: 2883
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: Comic location has changed in Mylar without input

Post by evilhero »

Looks like there's a typo on the wiki, it should be id being referenced in the url, not comicid as is stated in the examples.
Tippon
Posts: 17
Joined: Mon Sep 27, 2021 11:28 pm

Re: Comic location has changed in Mylar without input

Post by Tippon »

It's working now, thanks :)
Post Reply