Skip to content

Commit

Permalink
2.1.4
Browse files Browse the repository at this point in the history
Bugfix: Periods at the end of folders paths are now removed.
Bugfix: Fixed error when running Library Organizer - Undo Last Move
Change: Library Organizer Quick will now give a warning and exit when Basefolder is empty.
  • Loading branch information
Stonepaw committed Jun 28, 2012
1 parent 6c9253e commit 3259359
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Package.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Name=Library Organizer
Author=Stonepaw
Version=2.1.3
Version=2.1.4
Description=A file and folder organizer with GUI that helps build you file and folder paths.
Image=lopackagelogo.png
KeepFiles=losettingsx.dat
Expand Down
6 changes: 4 additions & 2 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
2.1.3
Change: Expaned inversion feature. Syntax is {<!fieldname(Optional match text)>}. This will insert the prefix and suffix when the value of the match text doesn't the field. You can use regular expresions as the match text by using (!regular expression). The match text or regular expression must be the last argument when using a field that uses other arguments such as first letter.
2.1.4
Bugfix: Periods at the end of folders paths are now removed.
Bugfix: Fixed error when running Library Organizer - Undo Last Move
Change: Library Organizer Quick will now give a warning and exit when Basefolder is empty.
2 changes: 1 addition & 1 deletion configureform.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

from lobookmover import PathMaker

VERSION = "2.1.3"
VERSION = "2.1.4"

failed_items = System.Array[str](["Age Rating", "Alternate Count", "Alternate Number", "Alternate Series", "Black And White", "Characters", "Colorist", "Count", "Cover Artist",
"Editor", "Format", "Genre", "Imprint", "Inker", "Language", "Letterer", "Locations", "Main Character Or Team", "Manga", "Month", "Notes", "Number", "Penciller", "Publisher",
Expand Down
6 changes: 5 additions & 1 deletion libraryorganizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from System.IO import File, StreamReader, StreamWriter

clr.AddReference("System.Windows.Forms")
from System.Windows.Forms import DialogResult, MessageBox
from System.Windows.Forms import DialogResult, MessageBox, MessageBoxButtons, MessageBoxIcon

clr.AddReference("System.Xml")
import System.Xml
Expand Down Expand Up @@ -107,6 +107,10 @@ def LibraryOrganizerQuick(books):
locommon.ComicRack = ComicRack
lobookmover.ComicRack = ComicRack
profiles, lastused = load_profiles(PROFILEFILE)

if len(profiles) == 1 and profiles[profiles.keys()[0]].BaseFolder == "":
MessageBox.Show("Library Organizer will not work as expected when the BaseFolder is empty. Please run the normal Library Organizer script or the Configure Library Organizer script before running Library Organizer Quick", "BaseFolder empty", MessageBoxButtons.OK, MessageBoxIcon.Warning)
return

show_worker_form(profiles, lastused, books)

Expand Down
9 changes: 6 additions & 3 deletions lobookmover.py
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,7 @@ def __init__(self, worker, form, undo_collection, profiles, logger):
self.HeldDuplicateBooks = {}
self.logger = logger
self.profiles = profiles
self.failed_or_skipped = False


def process_books(self):
Expand All @@ -745,7 +746,7 @@ def process_books(self):
skipped = len(books) + len(notfound) - success - failed
self.logger.Add("Canceled", str(skipped) + " files", "User cancelled the script")
report = BookMoverResult("Successfully moved: %s\tFailed to move: %s\tSkipped: %s\n\n" % (success, failed, skipped), failed > 0 or skipped > 0)
self.logger.SetCountVariables(failed, skipped, success)
#self.logger.SetCountVariables(failed, skipped, success)
return report

result = self.process_book(book)
Expand Down Expand Up @@ -776,7 +777,7 @@ def process_books(self):
skipped = len(books) + len(notfound) - success - failed
self.logger.Add("Canceled", str(skipped) + " files", "User cancelled the script")
report = BookMoverResult("Successfully moved: %s\tFailed to move: %s\tSkipped: %s\n\n" % (success, failed, skipped), failed > 0 or skipped > 0)
self.logger.SetCountVariables(failed, skipped, success)
#self.logger.SetCountVariables(failed, skipped, success)
return report

result = self.process_duplicate_book(book, self.HeldDuplicateBooks[book])
Expand All @@ -798,7 +799,7 @@ def process_books(self):
continue

report = BookMoverResult("Successfully moved: %s\tFailed to move: %s\tSkipped: %s\n\n" % (success, failed, skipped), failed > 0 or skipped > 0)
self.logger.SetCountVariables(failed, skipped, success)
#self.logger.SetCountVariables(failed, skipped, success)
return report


Expand Down Expand Up @@ -1275,6 +1276,8 @@ def make_folder_path(self, template):
if not line.strip():
line = self.profile.EmptyFolder
line = self.replace_illegal_characters(line)
#Fix for illegal periods at the end of folder names
line = line.strip(".")
folder_path = Path.Combine(folder_path, line.strip())

if self.failed and self.profile.MoveFailed:
Expand Down
4 changes: 4 additions & 0 deletions loworkerform.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ def WorkerDoWork(self, sender, e):

report.report_text = result.report_text

for profile in profiles:
if profile.Mode == Mode.Simulate:
report.show_report = True

e.Result = report


Expand Down

0 comments on commit 3259359

Please sign in to comment.