Anime - join multiple mkv files

Share your scripts or request scripts with specific features.
Forum rules
Please keep the forum clean - one topic per script. Questions not related to a specific script should be posted in Support forum.
vergessen
Posts: 23
Joined: 19 Feb 2014, 15:36

Re: Anime - join multiple mkv files

Post by vergessen » 21 Apr 2014, 01:45

I sent one I could still find. If this is not enough let me know and I will dig up some more.

Thanks

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: Anime - join multiple mkv files

Post by hugbug » 23 Apr 2014, 08:37

vergessen wrote:I sent one I could still find
In this nzb the par2-file were created after splitting. Therefore the par-repair doesn't join the files. If that's such a common case (20% in your tests) I guess I need an extra join-handling which will not rely on pars.

xelra
Posts: 5
Joined: 20 Jun 2014, 18:39

Re: Anime - join multiple mkv files

Post by xelra » 27 Jun 2014, 20:26

Unfortunately this script doesn't work for me. It always exits with an error.

Code: Select all

AttributeError: '_Environ' object has no attribute 'has_key'

prinz2311
Posts: 466
Joined: 08 Dec 2012, 00:03

Re: Anime - join multiple mkv files

Post by prinz2311 » 27 Jun 2014, 21:04

This script is for python 2. The error happens if you are using python 3.

xelra
Posts: 5
Joined: 20 Jun 2014, 18:39

Re: Anime - join multiple mkv files

Post by xelra » 27 Jun 2014, 21:09

prinz2311 wrote:This script is for python 2. The error happens if you are using python 3.
Thanks!

What do I have to change to make the script run with python 3?

prinz2311
Posts: 466
Joined: 08 Dec 2012, 00:03

Re: Anime - join multiple mkv files

Post by prinz2311 » 27 Jun 2014, 21:20

If you have also python 2 installed, you can change the first line in the script.

this will only work on some system (if there is a symbolic link to pyhton2)

Code: Select all

#!/usr/bin/env python2
or you can add the python 2 executable directly
Example:

Code: Select all

#!/usr/bin/python2.7

xelra
Posts: 5
Joined: 20 Jun 2014, 18:39

Re: Anime - join multiple mkv files

Post by xelra » 27 Jun 2014, 21:34

Thank you for your input prinz2311. But that would have been a pain on Windows.

I figured it out though. I just made the script python 3 compatible by changing this line

Code: Select all

if not os.environ.has_key('NZBOP_SCRIPTDIR'):
into this one

Code: Select all

if not 'NZBOP_SCRIPTDIR' in os.environ:
as described in this Stack Overflow article.

It works fine now. :D

Post Reply

Who is online

Users browsing this forum: No registered users and 25 guests