3
# Copyright (C) 2008 LottaNZB Development Team
5
# This program is free software; you can redistribute it and/or modify
6
# it under the terms of the GNU General Public License as published by
7
# the Free Software Foundation; version 3.
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
# GNU General Public License for more details.
14
# You should have received a copy of the GNU General Public License
15
# along with this program; if not, write to the Free Software
16
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
20
from shutil import move
21
from os.path import join, dirname
23
from lottanzb.core import App
24
from lottanzb.util import _
28
success = sys.argv[1] == "SUCCESS"
29
archive_name = sys.argv[2]
30
dest_dir = sys.argv[3]
31
elapsed_time = sys.argv[4]
33
#if len(sys.argv) == 6:
34
# par_message = sys.argv[5]
36
separator = App().config.plugins.categories.separator
39
category, name = archive_name.split(separator)
44
category = _("Failed")
46
move(dest_dir, join(dirname(dest_dir), category, name))