Sign up here and you can log into the forum!

Plugin: TransmissionOsd v0.9.8.1

The WDTVExt plugin depot. Plugins/libraries/code only

Re: Plugin: TransmissionOsd v0.9.8.1   

Postby dentex » Tue Nov 20, 2012 5:43 am

Thanks recliq for your valuable comment. Compiling for the WDTV it's something I've never tried. But when I have time I should try!
And thanks again bloodflower.
User avatar
dentex
Supporter
 
Posts: 179
Joined: Fri Apr 15, 2011 4:57 am
Location: Italy

Re: Plugin: TransmissionOsd v0.9.8.1   

Postby KAD » Wed Nov 21, 2012 8:43 am

just a thought, if python was previously in the firmware

couldn't you pull it from the old firmware, I'd guess it would still work
although, that's going to be a pretty old firmware, so it's probably largely out of date
If you like my work please consider a Donation. Donate
Please read the appropriate documentation before posting questions! READ ME FAQ WIKI
PM's are for private matters. Post support questions to the appropriate forum, or they will be ignored.
User avatar
KAD
Global Moderator
 
Posts: 5103
Joined: Mon Apr 12, 2010 4:59 pm
Location: Seattle, WA USA

EZTV episodes collector script   

Postby dentex » Sun Nov 25, 2012 6:59 am

Hi KAD, mmmhh... I think I don't know how to start here...

But, in the meantime, I wrote a fairly simple (bash) script that fetches and loads the latest episodes of my preferred series on my Transmission torrent list.
Since previously bloodflower asked for something similar (an RSS feed reader), I'll post the script here.
Should be easy enough to modify to anyone's needs:

Code: Select all
#!/usr/bin/bash

# where to put the log file.
log="/tmp/mnt/9fceedc9-86bc-48ce-a757-72f0cfb0ad64/eztv_collector.log"

# episode' s CODE (i.e.: S05E02, etc) regular expression.
SE_rEx="(S|s)[0-9]{2}(E|e)[0-9]{2}"

# on first run creates the log file.
if [ ! -f $log ]; then
    touch $log;
fi

# retrieves the last episode added to the torrent list.
d_dwnl=`grep -i "Latest Dexter" $log | tail -1 | grep -oE $SE_rEx`
f_dwnl=`grep -i "Latest Fringe" $log | tail -1 | grep -oE $SE_rEx`

date=`date`

# retrives the latest episode's MAGNET LINKS released on eztv.
d_mag=`curl -s 'http://eztv.it/shows/78/dexter/' | grep -oE 'magnet:\?xt.+" class="magnet"' | grep -v 720p | sed 's/" class="magnet"//' | head -1`
f_mag=`curl -s 'http://eztv.it/shows/101/fringe/' | grep -oE 'magnet:\?xt.+" class="magnet"' | grep 720p | sed 's/" class="magnet"//' | head -1`

# retrives the latest episode' s CODE released on eztv.
d_latest=`echo $d_mag | grep -oE $SE_rEx`
f_latest=`echo $f_mag | grep -oE $SE_rEx`

# exports to make the 'transmission-remote' executable to work.
export TRANSMISSION_WEB_HOME=/apps/transmission/usr/share/transmission/web
export LD_LIBRARY_PATH=/apps/transmission/usr/lib

# user and password for your transmission configuration.
# if not implemented, comment the next two lines
# and change all the 'transmission-remote' subsequent commands removing '-n $user:$pw'.
user=dentex
pw=*****************

# auto-start the added torrents.
/apps/transmission/usr/bin/transmission-remote -n $user:$pw --no-start-paused;
echo -e "\n[ $date ]" >> $log

# if a new episode is found adds the relative magnet link to the downloads and adds anyway an entry in the log for future reference.
if [ "$d_latest" != "$d_dwnl" ]; then

    /apps/transmission/usr/bin/transmission-remote -n $user:$pw -a $d_mag;
   
    if [ "$?" -eq 0 ]; then
        echo "--------------------------------"                 >> $log
        echo "Latest Dexter episode: $d_latest"                 >> $log
        echo -e "Dexter magnet link: \n   $d_mag"               >> $log
    else
        echo "### ERROR adding latest Dexter torrent" >> $log
    fi
else
    echo "*** No new Dexter torrent added" >> $log
fi

if [ "$f_latest" != "$f_dwnl" ]; then

    /apps/transmission/usr/bin/transmission-remote -n $user:$pw -a $d_mag;

    if [ "$?" -eq 0 ]; then
        echo "--------------------------------"                 >> $log
        echo "Latest Fringe episode: $f_latest"                 >> $log
        echo -e "Fringe magnet link: \n   $f_mag"               >> $log
    else
        echo "### ERROR adding latest Fringe torrent" >> $log
    fi
    echo "--------------------------------"                 >> $log
else
    echo "*** No new Fringe torrent added" >> $log
fi

# do not auto-start the added torrents.
/apps/transmission/usr/bin/transmission-remote -n $user:$pw --start-paused;

# 8-)


My script is located in /conf and runs in crontab on monday and saturday, every hour, until finds the shows:
Code: Select all
0 * * * 1,6 /bin/sh /conf/eztv_collector.sh


EDIT: modified script.
Last edited by dentex on Sat May 24, 2014 11:19 pm, edited 2 times in total.
User avatar
dentex
Supporter
 
Posts: 179
Joined: Fri Apr 15, 2011 4:57 am
Location: Italy

Re: Plugin: TransmissionOsd v0.9.8.1   

Postby KAD » Sun Nov 25, 2012 10:52 am

I was just suggesting if python is required and compiling in not a task you'd be willing to do

maybe try and pull python from this
http://forum.wdlxtv.com/viewtopic.php?f=61&t=104
firmware 4.2.0 was the last firmware to include python as far as I can tell

once you've got it, you could try and insert it into a current ext3 firmware and see if it works
If you like my work please consider a Donation. Donate
Please read the appropriate documentation before posting questions! READ ME FAQ WIKI
PM's are for private matters. Post support questions to the appropriate forum, or they will be ignored.
User avatar
KAD
Global Moderator
 
Posts: 5103
Joined: Mon Apr 12, 2010 4:59 pm
Location: Seattle, WA USA

Re: Plugin: TransmissionOsd v0.9.8.1   

Postby dentex » Mon Nov 26, 2012 3:54 am

thanks for the link KAD!
since all I need, at the moment, is just to auto-add a couple of torrents, I think I'll stick with a simple bash script.
;)
User avatar
dentex
Supporter
 
Posts: 179
Joined: Fri Apr 15, 2011 4:57 am
Location: Italy

Re: Plugin: TransmissionOsd v0.9.8.1   

Postby recliq » Mon Nov 26, 2012 4:50 am

If all you need is a simple parser for RSS feeds, have a look at php, since it brings a XML parser it's maybe a cleaner/more easy solution than a bash script.
Bash sucks for parsing XML... (been there, done that , have a look at plugman scripts ;))
­WDLXTV Project Maintainer
-:] If you like my contributions feel free to donate for a beer or a new flash drive. ...and always remember: RTFM! (README, FAQ, WIKI) [:-
User avatar
recliq
WDLXTV Team
 
Posts: 5513
Joined: Thu Apr 15, 2010 8:09 am
Location: Kiel, Germany

Re: Plugin: TransmissionOsd v0.9.8.1   

Postby dentex » Mon Nov 26, 2012 5:05 am

thanks for the heads up recliq!
User avatar
dentex
Supporter
 
Posts: 179
Joined: Fri Apr 15, 2011 4:57 am
Location: Italy

Re: Plugin: TransmissionOsd v0.9.8.1   

Postby kdavid » Tue Oct 21, 2014 9:14 am

Hello dentex. Is there any way that I can install your plugin on 2.02.32-EXT3_Palace_Plus-0.1.4 on WDTV gen3?
kdavid
n00b
 
Posts: 8
Joined: Sun Oct 19, 2014 6:16 am

Re: Plugin: TransmissionOsd v0.9.8.1   

Postby dentex » Tue Oct 21, 2014 9:32 am

kdavid wrote:Hello dentex. Is there any way that I can install your plugin on 2.02.32-EXT3_Palace_Plus-0.1.4 on WDTV gen3?

Hello!
Years have passed from when I touched this plugin the last time and I really don't recall what you can use it with. I'm sure it works with the firmware version supporting WDTVExt, but nothing more, sorry.
Probably there's someone else that can answer!
User avatar
dentex
Supporter
 
Posts: 179
Joined: Fri Apr 15, 2011 4:57 am
Location: Italy

Re: Plugin: TransmissionOsd v0.9.8.1   

Postby aeksakis21 » Sun Dec 21, 2014 6:47 pm

Hello,
Thanks! for wonderful firmware.

FW Base: 1.02.21Device: WDLXTV_LIVE
Latest version: 0.5.1.1

i have problem with TransmissionOsd for Apps Transmission 2.52.Apps Transmission 2.52 work perfectly, Transmission directory:"/tmp/mnt/B6023F7B023F4023/Transmission". The TransmissionOSD Menu in tab Backup folder put option :"tmp/mnt/B6023F7B023F4023/Transmission" but not responding. No start - No stop, no anything else.
What can i do?
Sorry for my english
Many thanks.
aeksakis21
WDTVer
 
Posts: 20
Joined: Wed Jun 20, 2012 11:29 am

PreviousNext

Return to WDTVExt plugins

Who is online

Users browsing this forum: No registered users and 1 guest