pierobot / mangapie

This is a self-hosted server for archived manga.
BSD 3-Clause "New" or "Revised" License
65 stars 9 forks source link

Subfolder management improvement. #177

Closed donotos closed 4 years ago

donotos commented 4 years ago

Hi!

Can you make it so that only filename are shown and not: somefolder/filename.zip

thanks.

kurim commented 4 years ago

Good point. Also there is something interessting: 0001 - Kapitel 001 Wiedergeburt.cbz showed as: DE/0001 - Kapitel 001 Wiedergeburt.cbz

0001 - Ch.001 Wiedergeburt.cbz showed as: Ch.001

image

just as an interessting hint, may be the automatic renaming is not working for specific langauges

//edit: and all files in Mainfolder will be ignored (intended?) (ah you mentioned it already here https://github.com/pierobot/mangapie/issues/176)

pierobot commented 4 years ago

It always tries to match the volume or chapter and falls back to the original filename if it can't parse it. I need to know the filename so I can change the regex pattern.

kurim, in your case it doesn't match the chapter because there's no c, ch or chapter in the file name before the actual chapter number. I guess I can make it be more generic and just match any number but I'm hesitant on that.

If you're interested, this is it

$pattern = "/((v|vol(ume)?)|(c|ch(apter)?)|(omnibus?))[ \.\_\-]*\d+([ \.\_\-]\d+)?/i";
donotos commented 4 years ago

You could concentrate on numbers after all there is basicaly only 3 ways to name files: volume number only chapter number only volume number and chapter number

I'm only talking of numbers here, there can be any character string before, after or in between.

Your logical pattern could be: is there more than one string of numbers? if yes, ignore all characters strings and keep letter string excluding special characters after the last number string (often it is the title of the chapter). V[first_number_string] Ch[second_number_string] [letter_string_after_last_number_string] if no, try to find (v|vol(ume)?)|(c|ch(apter)?) then V(or Ch)[number_string] [letter_string_after_number_string] if not found, [number_string] [letter_string_after_number_string]

of course given the heavy editing of the filename you should be able to disable and return to original file name with an option.

pierobot commented 4 years ago

That means that Series 2 Sequel - 001 will end up as 2 001 and Series 2 Sequel - 001 (SomeGroup1509) will end up as 2 001 1509. Series 2 Sequel - 001x01 (SomeGroup1509) will end up as 2 001 01 1509 There's no way of knowing 100% which digits are the actual chapter unless you match against chapter, volume, or omnibus in the filename.

I roughly went off of https://github.com/Daiz/manga-naming-scheme but not everyone names the archives based off this. :man_shrugging:

donotos commented 4 years ago

True! There's no way of knowing 100% anyway...

pierobot commented 4 years ago

I'll do some more thinking over it. I agree it's not the best right now.

Kurim, I haven't added Kapitel to the pattern so that's why it's not matching. I'll add that in soon. If you have chapter, volume, or omnibus in any other languages post them as well as their abbreviations.

donotos commented 4 years ago

in french volume is "Tome" (t) and chapter is "Chapitre" (c or ch)

kurim commented 4 years ago

For German: Volume => Band Chapter => Kaptel Ah and "omnibus" means all like anthology for german it might be "Sammelband"

I like the idea of manga-naming-scheme but may be we can handle folder like this way... \Name of Manga[lang]\ this will match your current subfolder design

kurim commented 4 years ago

Another thing you need to fix is this:

image

it should be shown in one line

donotos commented 4 years ago

I think the column width should adjust themself automatically depending on the size of the window. if you are on a very small screen like a phone it would be normal to look like that, but on a computer screen they should expend to the size needed to display on one line. Actually it's better to display on multiple line when on a small screen, there is more space between the lines (chapters) and it's less error prone when you click on the link with a finger.

pierobot commented 4 years ago

There's only so much you can do with a small screen. You did make me realize there's a bit of space I can free up because the columns don't add up to 12 but that won't solve the problem.

I can remove the preview column, place it below the archive name. and reduce the width of the archive name column. I think those two columns should not be using more than 50% of the screen but that's just my opinion. image

pierobot commented 4 years ago

What about stacking the Last Read and Date Added on top of each other?

Also, try to make new issues so the conversation does not derail.