WWE Raw and Smackdown

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
lrusak Offline
Fan
Posts: 552
Joined: Sep 2011
Reputation: 4
Location: Canada
Post: #1
Soooo since thetvdb.com stopped updating WWE shows back in january I have been searching for the best way to keep it up to date with minimal effort.

I am a complete beginner at scripting but I did my best and what I have works for me so I thought I'd share it with other WWE fans.

The first problem I wanted to tackle is to create the .nfo files used by xbmc's database.
I created this script (and had some fun learning how to do it) to create nfo's for raw and smack down.

how it works is it takes inputs from a user and calculates the amount of nfo's needed. there is no error correction so you need to make sure you put in a monday to a monday for RAW and friday to friday for SmackDown. It will only do one season at a time.

folders are like this

WWE
-----------> RAW
-----------> Smackdown

and the script and template sit in the WWE folder. it looks at the template file for the text needed to fill the nfo and changes the date and episode number and saves it with the corresponding filename. (I cd into each folder (raw or smack down) then run the script so it outputs the nfos into the folder. You could edit out the read functions for the variables to just be static variables (I just wanted to learn how to do it).

Code:
depreciated

The next thing I did was create a script for SABnzbd to run when it downloads a file. I have created an RSS feed from nzb matrix that searches for specific files. i.e. (WWE Monday Night Raw 2012 04 09 HDTV x264 RUDOS NZB) it limits results to HDTV x264 RUDOS, then in sabs rss options I set filters for RAW and Smackdown, so it can run a different script for each (I'm sure it could be combined into one). and I have a specific catagory setup for wrestling so it downloads to a specific location as not to interfere with other downloads. you only need to change ID, DATE, EXT, and DIRPATH. I run sabnzbd on my freenas server so some of the scripting is different and commented out for ubuntu use. (I made it on ubuntu and move it to my server).
Code:
Depreciated

Anyways if you have an suggestions for improvement (as I said I am a complete beginner) that would be welcome or if you have any questions feel free to ask. I may try and edit it so I don't need separate scripts for raw and smack down.

thanks for viewing


UPDATE:
The most recent script is available here http://forum.xbmc.org/showthread.php?tid...pid1131324
It will work for all releases (ie, rudos, kyr, c4tv), for both RAW and SmackDown, and for any quality (HDTV, 720P,etc)
The script will exit if it cannot find the proper file, this keeps it from moving/deleting the wrong one.
The script will automatically generate an NFO file for scanning into your XBMC library (just the basics, season, episode, title, air date).
This script has only been tested on OSX, it will fail on any other system (it works on freebsd, or freenas though).

If you want your own NFOs but don't want the script to rename and move files for you, you can use this simple NFO file generator. It is currently setup to create all the nessecary NFO files for RAW this year
it can be found here http://forum.xbmc.org/showthread.php?tid...pid1126223

"PPC is too slow, your CPU has no balls to handle HD content." ~ Davilla
"Maybe it's a toaster. Who knows, but it has nothing to do with us." ~ Ned Scott

OpenELEC Community Moderator
(This post was last modified: 2012-06-20 20:04 by lrusak.)
find quote
lrusak Offline
Fan
Posts: 552
Joined: Sep 2011
Reputation: 4
Location: Canada
Post: #2
does anyone know how I can improve this step?

Code:
mv "$FILE" $DIRPATH
cd $DIRPATH
mv "$FILE" "$NEWFILE"

I had to make it like that in the first place because it would give me errors and I assume it's because of spaces in the filename, but I could only get it to work by moving the file then renaming it after

"PPC is too slow, your CPU has no balls to handle HD content." ~ Davilla
"Maybe it's a toaster. Who knows, but it has nothing to do with us." ~ Ned Scott

OpenELEC Community Moderator
find quote
lrusak Offline
Fan
Posts: 552
Joined: Sep 2011
Reputation: 4
Location: Canada
Post: #3
it's too bad no one has interest in this! anyways, I updated it to use just one script instead of one each for raw and smack down

Code:
Depreciated

"PPC is too slow, your CPU has no balls to handle HD content." ~ Davilla
"Maybe it's a toaster. Who knows, but it has nothing to do with us." ~ Ned Scott

OpenELEC Community Moderator
(This post was last modified: 2012-06-20 19:48 by lrusak.)
find quote
BrEEdAA Offline
Junior Member
Posts: 28
Joined: Nov 2011
Reputation: 0
Post: #4
Just found this mate, looks good. Should this work on a mac ok?
find quote
lrusak Offline
Fan
Posts: 552
Joined: Sep 2011
Reputation: 4
Location: Canada
Post: #5
The BSD formatted lines should work on OSX. I'll test it out

"PPC is too slow, your CPU has no balls to handle HD content." ~ Davilla
"Maybe it's a toaster. Who knows, but it has nothing to do with us." ~ Ned Scott

OpenELEC Community Moderator
find quote
lrusak Offline
Fan
Posts: 552
Joined: Sep 2011
Reputation: 4
Location: Canada
Post: #6
if you just run this, it will create the neccassary nfo files for you. (it is setup for RAW, if you need smackdown as well you just have to change the dates and seasons. let me know if you need help.

nfo.sh for mac
Code:
#!/bin/bash

# input season #
SEASON="17"

# input episode #
ID="1"

# input start date (YYYY-MM-DD)
START="2012-01-02"

# input end date (YYYY-MM-DD)
END="2012-12-31"

# input series name
SERIES="WWE Monday Night RAW"


DAYS=$(((`date -j -f "%Y-%m-%d" "$END" "+%s"` - `date -j -f "%Y-%m-%d" "$START" "+%s"`)/(60*60*24*7)))
AIRED=$START

for (( i=1; i<=$DAYS; i++))
do    
    FILE="$SERIES - 17x$ID - $AIRED.nfo"
    touch "$FILE"
    echo "<episodedetails xsd="http://www.w3.org/2001/XMLSchema" xsi="http://www.w3.org/2001/XMLSchema-instance">
  <title>Episode ${ID}</title>
  <season>${SEASON}</season>
  <episode>${ID}</episode>
  <aired>${AIRED}</aired>
  <plot />
  <displayseason />
  <displayepisode />
  <thumb />
  <watched>false</watched>
  <credits />
  <director />
  <rating />
</episodedetails>" > "$FILE"
    ID=$(($ID+1))
    AIRED=`date -j -f "%Y-%m-%d" "$AIRED" +%s`
    AIRED=$((($AIRED)+(604800)))
    AIRED=`date -j -f "%s" "$AIRED" +%Y-%m-%d`
done

"PPC is too slow, your CPU has no balls to handle HD content." ~ Davilla
"Maybe it's a toaster. Who knows, but it has nothing to do with us." ~ Ned Scott

OpenELEC Community Moderator
find quote
lrusak Offline
Fan
Posts: 552
Joined: Sep 2011
Reputation: 4
Location: Canada
Post: #7
ok so I edited it so it's easier to understand and for use on a mac. place it in your SABnzbd scripts folder. then assign it to a download. IT WILL ONLY WORK WITH FILES NAMED AS FOLLOWS "WWE.Monday.Night.RAW.2012.01.02.HDTV.x264-RUDOS" this is because I am a beginner at scripting and I haven't spent much time at it but it works for me as long as I download RUDOS releases. KYR releases don't work as of now.

PS, this does work for RAW and Smackdown, as long as they are RUDOS releases.

DISCLAIMER: this script involves the rm command, if you aren't careful you can delete important files. if you don't feel comfortable then just comment the rm line out at the end of the script.

*** make sure to edit the paths to your own locations ***

wrestling.sh for mac (don't forget to chmod +x)
Code:
Depreciated

"PPC is too slow, your CPU has no balls to handle HD content." ~ Davilla
"Maybe it's a toaster. Who knows, but it has nothing to do with us." ~ Ned Scott

OpenELEC Community Moderator
(This post was last modified: 2012-06-20 19:49 by lrusak.)
find quote
BrEEdAA Offline
Junior Member
Posts: 28
Joined: Nov 2011
Reputation: 0
Post: #8
Good works thanks, Will setup for Fridays Smackdown and let you know how it goes :-)
find quote
lrusak Offline
Fan
Posts: 552
Joined: Sep 2011
Reputation: 4
Location: Canada
Post: #9
(2012-06-13 11:05)BrEEdAA Wrote:  Good works thanks, Will setup for Fridays Smackdown and let you know how it goes :-)

I forgot to say that this will only work for .avi and .mp4 filetypes. if you download the 720P versions that are .mkv it will not work and I will have to change it for you.

PS you can always test it first by creating a sample file.
Code:
touch WWE.Monday.Night.RAW.2012.06.11.HDTV.x264-RUDOS.mp4
Then run the script (be in the folder that contains the file you just made) and hopefully you don't get any errors and the file moves to where it should with proper naming.

"PPC is too slow, your CPU has no balls to handle HD content." ~ Davilla
"Maybe it's a toaster. Who knows, but it has nothing to do with us." ~ Ned Scott

OpenELEC Community Moderator
find quote
BrEEdAA Offline
Junior Member
Posts: 28
Joined: Nov 2011
Reputation: 0
Post: #10
Ah! yeah i generally get the 720p .mkv versions, also of which RUDOS doesnt seem to be releasing any more, they are usually either KYR/CB4
find quote
Baldy54 Offline
Junior Member
Posts: 9
Joined: Jun 2012
Reputation: 0
Post: #11
Hello I am new at this apple tv thing. So With this scripting that you made I just copy the script that you made in my apple tv and then it will do the rest?? Will it show up in main apple tv scree to watch it??
find quote
jakks Offline
Senior Member
Posts: 124
Joined: Jun 2009
Reputation: 0
Post: #12
Would it be possible to create one that just downloads the monthly ppv shows?

Hardware - HP Proliant MicroServer N36L 5TB / Raspberry Pi 512mb / iPad 2
Software - SABnzbd / CouchPotato / NZBDrone / uTorrent / MySQL
Extras - NZB 360
find quote
lrusak Offline
Fan
Posts: 552
Joined: Sep 2011
Reputation: 4
Location: Canada
Post: #13
(2012-06-15 16:36)Baldy54 Wrote:  Hello I am new at this apple tv thing. So With this scripting that you made I just copy the script that you made in my apple tv and then it will do the rest?? Will it show up in main apple tv scree to watch it??
No. this is for use with SABnzbd and usenet. All this does is renames the files properly after they have downloaded and moves them to the appropriate location.

jakks Wrote:Would it be possible to create one that just downloads the monthly ppv shows?
Again, this doesn't download anything, it just sorts the downloads after sabnzbd finishes downloading the file.

BrEEdAA Wrote:Ah! yeah i generally get the 720p .mkv versions, also of which RUDOS doesnt seem to be releasing any more, they are usually either KYR/CB4
I could look into doing the mkv files as well as implementing it for KYR. I'll see how busy I am at work today and try it out.

"PPC is too slow, your CPU has no balls to handle HD content." ~ Davilla
"Maybe it's a toaster. Who knows, but it has nothing to do with us." ~ Ned Scott

OpenELEC Community Moderator
find quote
BrEEdAA Offline
Junior Member
Posts: 28
Joined: Nov 2011
Reputation: 0
Post: #14
Thanks again lrusak, that would be great if you get working woth 720 mkv releases
find quote
lrusak Offline
Fan
Posts: 552
Joined: Sep 2011
Reputation: 4
Location: Canada
Post: #15
here it is, this should be good for releases by anyone and of any type.

wrestling_mac.sh (remember to chmod +x)
Code:
Depreciated

"PPC is too slow, your CPU has no balls to handle HD content." ~ Davilla
"Maybe it's a toaster. Who knows, but it has nothing to do with us." ~ Ned Scott

OpenELEC Community Moderator
(This post was last modified: 2012-06-20 19:49 by lrusak.)
find quote
Post Reply