Page 3 of 3

Re: Anime - join multiple mkv files

Posted: 21 Apr 2014, 01:45
by vergessen
I sent one I could still find. If this is not enough let me know and I will dig up some more.

Thanks

Re: Anime - join multiple mkv files

Posted: 23 Apr 2014, 08:37
by hugbug
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.

Re: Anime - join multiple mkv files

Posted: 27 Jun 2014, 20:26
by xelra
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'

Re: Anime - join multiple mkv files

Posted: 27 Jun 2014, 21:04
by prinz2311
This script is for python 2. The error happens if you are using python 3.

Re: Anime - join multiple mkv files

Posted: 27 Jun 2014, 21:09
by xelra
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?

Re: Anime - join multiple mkv files

Posted: 27 Jun 2014, 21:20
by prinz2311
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

Re: Anime - join multiple mkv files

Posted: 27 Jun 2014, 21:34
by xelra
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