Comic paths have extra slash

Post any problems / bugs / issues that are Mylar-related in here.
Post Reply
mxhdme
Posts: 9
Joined: Sun Nov 06, 2016 7:01 pm

Comic paths have extra slash

Post by mxhdme » Sun May 20, 2018 9:53 pm

A while back I moved my mylar installation from Ubuntu to a freenas jail. I followed the advice in this thread: viewtopic.php?p=9810#p9810 The move went well, with one seemingly minor but annoying problem. The directory path to my comics location gained an extra slash in every comic.

For example:

Code: Select all

/data/nas/Comics/Clean//Alex + Ada (2013)
New comics from existing series are getting added to the correct directory, so Mylar is still working but this just seems incorrect. Newly added series are creating directories without the double slash:

Code: Select all

/data/nas/Comics/Clean/American Gods My Ainsel (V2018)
I'm sure I did this somehow when I was making the move. Is there a way to correct the double slashes without editing each comic's settings in Mylar?

User avatar
evilhero
Site Admin
Posts: 2258
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: Comic paths have extra slash

Post by evilhero » Thu May 24, 2018 5:36 pm

There might be a way, but I'll have to fire off some custom code in order to account for the double-slashes. This was probably due having a trailing slash for your newcom_dir setting in the config.ini (I'm guessing at this point, cause I remember it happening to me at one point too).

I'll update this thread when I've pushed something out to the dev branch for you to use and fix the double-slashes (since I didn't make mention of the trailing slash thing, this is most likely on me). Should be in a day or so hopefully, unless something massive blows up.

mxhdme
Posts: 9
Joined: Sun Nov 06, 2016 7:01 pm

Re: Comic paths have extra slash

Post by mxhdme » Sat Jun 09, 2018 2:53 am

Is this still on your to do list (totally no pressure, just wondering if you think you have time)?

User avatar
evilhero
Site Admin
Posts: 2258
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: Comic paths have extra slash

Post by evilhero » Sat Jun 09, 2018 6:03 pm

Just pushed the fix into development (commit ef6e7d6).

It's only available in maintenance mode via the command line. This was done as I didn't want to have it running on every startup sequence just in case (and honestly, after it runs correctly once it shouldn't need to be run again unless something changes in the db to create double-slashes again).

To see all the available commands in maintenance mode:

Code: Select all

python Mylar.py maintenance --help
To run the fixslashes method on your db and correct the double-slash entries in the db:

Code: Select all

python Mylar.py maintenance -fs
When running the fs method it will display all the series that are found to have double-slashes as well what the corrected filepath is. Then just start Mylar up as per your normal method and that's it! (hopefully)

Post Reply