xbenjii / torrentexpander

Automatically exported from code.google.com/p/torrentexpander
0 stars 0 forks source link

Transmission + Torrentexpander NMT CSI Package #23

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
This is the complete CSI (http://www.nmtinstaller.com/) packages for NMT 
Platform (ALFA)

Original issue reported on code.google.com by login...@gmail.com on 26 Nov 2011 at 11:43

GoogleCodeExporter commented 8 years ago
Hi
I can't test it on my NMT, but I don't think destructive_mode should be enabled 
by default.
Also, destination_folder shouldn't be /share/Download/, but rather 
/share/Download/Expanded , /share/Download/Processed, or something like that.
Also clean_up_filenames should probably be enabled by default.

Thanks for all the efforts you're putting into this project
I'll review all of your comments and code submissions later today

Original comment by addicted...@gmail.com on 26 Nov 2011 at 12:17

GoogleCodeExporter commented 8 years ago
True, it' hard to decide what's the best default config.
I have choose to use /share/Download/ to avoid permission problem/strange 
problem that it's difficoult to solve.
The clean_up_filename=yes it may cause exception (not sure: ISSUE 18)
I will open a forum thred on nmt, and asking for some beta-tester. This is only 
an ALFA package.
I'm testing every day, every future, then i will, change default config.

Original comment by login...@gmail.com on 26 Nov 2011 at 4:08

GoogleCodeExporter commented 8 years ago
http://www.networkedmediatank.com/showthread.php?tid=56777&pid=523305

Original comment by login...@gmail.com on 26 Nov 2011 at 4:42

GoogleCodeExporter commented 8 years ago
Handling permissions is an issue and I'll have to deal with it one day or 
another.

Regarding ISSUE 18, I think I got this out of the way.

Also, I've decided that the /share/Downloads/Expanded would be the default 
destination folder for NMT if none is defined in the settings.ini file

BTW I think the default NMT Transmission download folder is /share/Downloads, 
not /share/Download

Give it a try
Thanks

Original comment by addicted...@gmail.com on 26 Nov 2011 at 11:17

GoogleCodeExporter commented 8 years ago
Transmission default direcory is /share/Download. 
It's written in daemon.sh inside CSI pack.

Original comment by login...@gmail.com on 27 Nov 2011 at 3:35

GoogleCodeExporter commented 8 years ago
This is last version!

Original comment by login...@gmail.com on 27 Nov 2011 at 3:53

GoogleCodeExporter commented 8 years ago
NMT PCH A210 
I'm collecting information..

cat: /bin/cat (busybox required)
chmod: /bin/chmod (busybox required)
chown: /bin/chown (busybox required)
cp: /bin/cp (busybox required)
ls: /bin/ls (busybox required)
mkdir: /bin/mkdir (busybox required)
mv: /bin/mkdir (busybox required)
nice: /bin/nice (included)
rm: /bin/rm (busybox required)
rmdir: /bin/rmdir (busybox required)
sed: /bin/sed (busybox required)
touch: /bin/touch (busybox required)
wget: /bin/wget (busybox required)
wget: /opt/syb/app/bin/wget (included)
curl: /usr/local/bin/curl (opkg required)
grep: /bin/grep (busybox required)
egrep: /bin/grep (busybox required)
unrar: /usr/local/bin/unrar (opkg required)
unzip: /usr/local/bin/unzip (opkg required)
find: /bin/find (busybox required)

without busybox (http://www.networkedmediatank.com/showthread.php?tid=29068) 
program never works. It's better to use wget, avaiable in two path (busybox 
wget it's better)

Original comment by login...@gmail.com on 27 Nov 2011 at 5:06

GoogleCodeExporter commented 8 years ago
this is correct:
unzip: /usr/bin/unzip (busybox required)

Original comment by login...@gmail.com on 27 Nov 2011 at 5:18

GoogleCodeExporter commented 8 years ago
New build committed to SVN
I suggest you don't input binary path in the settings file. The script should 
be able to guess path to unzip, unrar, wget... Assuming the used has installed 
busy box of course

Original comment by addicted...@gmail.com on 27 Nov 2011 at 6:23

GoogleCodeExporter commented 8 years ago
Switched to label Type-Other

Original comment by addicted...@gmail.com on 27 Nov 2011 at 6:29

GoogleCodeExporter commented 8 years ago
About comment 9:
I have tryed, but the script plots errors.
I think the best way to resolve depandancies problems is this:

unrar_bin=/usr/local/bin/unrar
unzip_bin=/usr/local/bin/unzip
wget_curl=/usr/local/bin/wget

path /usr/local/bin means 'the program it was installed by opkg'. 
I prefer to use opkg bin because they are updated better.

Original comment by login...@gmail.com on 27 Nov 2011 at 6:50

GoogleCodeExporter commented 8 years ago
Can you send me the settings.ini file generated on first run on the NMT so that 
I can understand where the issue comes from.
torrentexpander is supposed to search for binaries in $PATH, /Applications, 
/nmt/apps, /bin, /usr/bin and /usr/local/bin
I don't understand why I cannot find the right path to the binaries

Original comment by addicted...@gmail.com on 27 Nov 2011 at 7:20

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Yes, right, i didn't know this.
If i run program without these config lines, torrentexpander produces correct 
path.

Original comment by login...@gmail.com on 27 Nov 2011 at 11:10

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
These are default permission set on PCH for user created things:
files: 744
folder: 755
owner user: nmt
owner group: nmt

I have set:
files_perm_post=744
folder_perm_post=755

I'm not able to set owner user & group. sudo is not avaiable, transmission run 
as a root.

Original comment by login...@gmail.com on 28 Nov 2011 at 12:09

GoogleCodeExporter commented 8 years ago
This is the defualt config i made for CSI package. Look if all are good.

Original comment by login...@gmail.com on 28 Nov 2011 at 11:54

GoogleCodeExporter commented 8 years ago

Original comment by login...@gmail.com on 28 Nov 2011 at 11:54

Attachments:

GoogleCodeExporter commented 8 years ago
I could not to make movies_post and similar works.

Original comment by login...@gmail.com on 28 Nov 2011 at 5:45

GoogleCodeExporter commented 8 years ago
Yes, because if i use type_1 schema, then program are not able to decide if 
file is a film or not. We should use original filename to get this info.

Original comment by login...@gmail.com on 28 Nov 2011 at 6:21

GoogleCodeExporter commented 8 years ago
It not exists 'Chown directory if run as at user level and no user interaction 
is available' section'.

Original comment by login...@gmail.com on 28 Nov 2011 at 6:33

GoogleCodeExporter commented 8 years ago
Take a look to the comments like this:
# Chown directory if run as sudo of if user interaction is available
Comments say Chown but in fact do Chmod.

Original comment by login...@gmail.com on 28 Nov 2011 at 6:39

GoogleCodeExporter commented 8 years ago
You're right, I changed this comment, along with a few others
Try to add edit_perm_as_sudo=yes to your settings file and let me know what 
happens
If sudo is unavailable, then I have no idea how to set user and group.
Give the latest SVN build a try and let me know how this works.

---

Regarding movie_post, this is true, It cannot work with type_1 filenames.
Looks like some refactoring is in order.
I'm thinking about a using the $quality variable, a bit like with the imdb 
routine, as only the last line from the log_file is necessary for movies.

Try replacing lines 1024 to 1030 by the code attached and let me know if it 
works. I probably won't have time to try it for the next few days.

Thanks

Original comment by addicted...@gmail.com on 28 Nov 2011 at 8:47

Attachments:

GoogleCodeExporter commented 8 years ago
I've taken a look at your torrentexpander_settings.ini.2 and it's really great, 
very easy to read
In the future, we may need to see if mkvdts2ac3 can be run on the NMT (alas it 
relies on many dependencies). People without a home theater may find it 
extremely useful
If it works, we'll contact the developer if he's interested in collaborating to 
our project

Original comment by addicted...@gmail.com on 28 Nov 2011 at 8:56

GoogleCodeExporter commented 8 years ago
I forget to say that i get cp error, i'm using movie_post="copy"

Step 4 : Taking care of TV Shows, Music and Movie files
- Copying Come Ammazzare Il Capo E Vivere Felici 2011 (-BRRip).avi to 
/share/Prova/Come Ammazzare Il Capo E Vivere Felici 2011 (-BRRip)/
cp: cannot stat '/share/Download/Expanded/torrentexpander_temp/Come Ammazzare 
Il Capo E Vivere Felici 2011 (-BRRip).avi': No such file or directory

Original comment by login...@gmail.com on 29 Nov 2011 at 11:37

Attachments:

GoogleCodeExporter commented 8 years ago
Of course, with IMDB plugin all movie are in their subdirectory.

Original comment by login...@gmail.com on 29 Nov 2011 at 11:40

GoogleCodeExporter commented 8 years ago
@Comment 23. It seems to work, exept copy error.

Step 1 : Expanding / moving content of the torrent
Step 2 : Cleaning up filenames
- Renaming 
Come.Ammazzare.Il.Capo.E.Vivere.Felici.2011.iTALiAN.BRRip.XviD-CRiME.avi to 
Come Ammazzare Il Capo E Vivere Felici (2011).avi
Step 3 : Generating NFO and downloading Poster
Step 4 : Taking care of TV Shows, Music and Movie files
- Copying Come Ammazzare Il Capo E Vivere Felici (2011).avi to Come Ammazzare 
Il Capo E Vivere Felici (2011)/
cp: cannot stat '/share/Download/Expanded/torrentexpander_temp/Come Ammazzare 
Il Capo E Vivere Felici (2011).avi': No such file or directory
Step 5 : Setting permissions
That's All Folks

Original comment by login...@gmail.com on 29 Nov 2011 at 11:46

GoogleCodeExporter commented 8 years ago
@'If sudo is unavailable, then I have no idea how to set user and group.' ??
chown -R nmt $folder
chown nmt $file
chgrp -R nmt $folder
chgrp nmt $file

Original comment by login...@gmail.com on 29 Nov 2011 at 11:49

GoogleCodeExporter commented 8 years ago
Regarding permissions, according to your comment #23 and #28, it should work 
fine now.

Regarding cp error in movies post, I think I solved it. Let me know how build 
100 (Wow, 100 already !) works for you.

I think we made great progress for the past few days.

Thanks

Original comment by addicted...@gmail.com on 29 Nov 2011 at 10:33

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Correct 1093 line:

if [[ -f "$item" && "$edit_perm_as_sudo" == "no" && "$user_perm_post" != "no" 
&& "$group_perm_post" != "no" && $(id -u) -eq 0 ]] || [[ -f "$item" && 
"$edit_perm_as_sudo" == "no" && "$user_perm_post" != "no" && "$group_perm_post" 
!= "no" && "$has_display" == "yes" ]] || [[ -d "$item" && "$edit_perm_as_sudo" 
== "no" && "$user_perm_post" != "no" && "$group_perm_post" != "no" && $(id -u) 
-eq 0 ]] || [[ -d "$item" && "$edit_perm_as_sudo" == "no" && "$user_perm_post" 
!= "no" && "$group_perm_post" != "no" && "$has_display" == "yes" ]]; then chown 
"$user_perm_post":"$group_perm_post" "$item"; fi

Original comment by login...@gmail.com on 30 Nov 2011 at 6:00

GoogleCodeExporter commented 8 years ago
We only miss one thing, the program do this:

Step 5 : Setting permissions
chown nmt:nmt /share/Prova/Abduction (2011)/Abduction (2011).avi
chown nmt:nmt /share/Prova/Abduction (2011)/Abduction (2011).nfo
chown nmt:nmt /share/Prova/Abduction (2011)/Abduction (2011).jpg
chown nmt:nmt /share/Prova/Abduction (2011)/Abduction (2011).fanart.jpg
That's All Folks

There are NO line that do this:
chown nmt:nmt /share/Prova/Abduction (2011)/

Original comment by login...@gmail.com on 30 Nov 2011 at 6:09

GoogleCodeExporter commented 8 years ago
Could you enable me download section? I will upload CSI and a repo.

Original comment by login...@gmail.com on 1 Dec 2011 at 6:16

GoogleCodeExporter commented 8 years ago
Latest SVN build seems to work fine with permissions
/share/Prova/Abduction (2011)/ should now be chowned correctly

Original comment by addicted...@gmail.com on 1 Dec 2011 at 10:36

GoogleCodeExporter commented 8 years ago
With the latest CSI package on the C200, I got :
Your Unrar path is incorrect please edit your torrentexpander_settings.ini file
Your Unzip path is incorrect please edit your torrentexpander_settings.ini file
Path to wget or curl is incorrect - IMDB features will be disabled

If I remove the corresponding lines, and let the script find the binaries, the 
program runs successfully

Original comment by addicted...@gmail.com on 4 Dec 2011 at 8:50

GoogleCodeExporter commented 8 years ago
Here are the paths on the C200
unrar_bin="/nmt/apps/bin/unrar"
unzip_bin="/usr/bin/unzip"
wget_curl="/bin/wget"

I replaced torrentexpander.sh by a fresh copy of the script with an additional 
line in order to make sure the update works

It worked once, seemed to update correctly
Then every time I try to run it, I get random errors, even after a reboot

I've switched this download to deprecated, until we edit the settings.ini file 
and find a solution to this issue

I'll rewrite the update procedure to use a file instead of a variable to store 
the latest version of the script. Maybe this huge $tex_cont variable caused the 
issue

Original comment by addicted...@gmail.com on 4 Dec 2011 at 9:26

GoogleCodeExporter commented 8 years ago
New CSI package released. auto_update set to no, because i have strange problem 
with this future. After updating, i see that the program runs without my own 
config.

I have moved some comments at the end of file, so it's not possible to have § 
Update History § at the end of config files. 

Original comment by login...@gmail.com on 4 Dec 2011 at 11:45

GoogleCodeExporter commented 8 years ago
Could you confirm that opkg path in your device is '/usr/local/bin/opkg' ?

Original comment by login...@gmail.com on 4 Dec 2011 at 11:02

GoogleCodeExporter commented 8 years ago
New build is out.

Original comment by login...@gmail.com on 5 Dec 2011 at 12:06

GoogleCodeExporter commented 8 years ago
opkg is nowhere to be found
What should I install on the NMT-C200 ?
Thanks

Original comment by addicted...@gmail.com on 5 Dec 2011 at 5:49

GoogleCodeExporter commented 8 years ago
opkg is named 'local' on CSI.
My package use opkg to install torrentexpander required software. Look setup.sh:

      if [ -f "/usr/local/bin/opkg" ]; then
        if [ ! -f "/usr/local/bin/unzip" ]; then
            opkg install unzip;
            wait;
        fi
        if [ ! -f "/usr/local/bin/unrar" ]; then
            opkg install unrar;
            wait;
        fi
        if [ ! -f "/usr/local/bin/wget" ]; then
            opkg install wget;
            wait;
        fi
        if [ ! -f "/usr/local/bin/busybox" ]; then
            opkg install busybox;
            wait;
        fi
    fi

Original comment by login...@gmail.com on 5 Dec 2011 at 11:26

GoogleCodeExporter commented 8 years ago
Hi
Sorry I didn't have time to answer sooner
On the C200, opkg is located here :
/usr/local/bin/opkg

I see you've been really busy lately. Thanks for all the work you're putting 
into this project

Original comment by addicted...@gmail.com on 6 Dec 2011 at 10:14

GoogleCodeExporter commented 8 years ago
All ok. See http://www.networkedmediatank.com/showthread.php?tid=56513 update. 
I can close.

Original comment by login...@gmail.com on 7 Dec 2011 at 5:57