Introducing tretflix - An HTPC Companion

Got a program that plays well with SABnzbd? Share it here!
tret
Full Member
Full Member
Posts: 148
Joined: August 2nd, 2008, 2:07 pm

Re: Introducing tretflix - An HTPC Companion

Post by tret »

tretflix v1.2 CLI preview:

Code: Select all

sysadmin@tretflix:~$ tretflix
Usage: tretflix [COMMAND] .....

COMMANDS:
  tretflix config
  tretflix downloads
  tretflix network
  tretflix service
  tretflix shares

sysadmin@tretflix:~$ tretflix config
Usage: tretflix config [COMMAND] [INPUT]

COMMANDS:
  tretflix config setup
  tretflix config backup
  tretflix config restore [FILE]

sysadmin@tretflix:~$ tretflix downloads
Usage: tretflix downloads [COMMAND] [OPTION] [INPUT]

COMMANDS:
  tretflix downloads set path [OPTION] [PATH]
  tretflix downloads show config

OPTIONS:
  -l, --link-only

  Note: Downloads are copied to the new path by default. Use the '-l'
        option to change the path without copying the existing files.

sysadmin@tretflix:~$ tretflix network
Usage: tretflix network [COMMAND] [OPTION] [INPUT]

COMMANDS:
  tretflix network add ip [IPv4] [NETMASK] [GATEWAY]
  tretflix network del ip [IPv4]
  tretflix network show config

sysadmin@tretflix:~$ tretflix service
Usage: tretflix service [OPTION] [COMMAND] [INPUT]

COMMANDS:
  tretflix service [OPTION] enable
  tretflix service [OPTION] disable
  tretflix service [OPTION] set username [USERNAME]
  tretflix service [OPTION] set password [PASSWORD]
  tretflix service [OPTION] set port [PORT]
  tretflix service [OPTION] new apikey
  tretflix service [OPTION] show config
  tretflix service [OPTION] reset config

OPTIONS:
  -b, --sickbeard
  -c, --couchpotato
  -m, --maraschino
  -s, --sabnzbd
  -t, --transmission

  Note: Service commands will be applied to all applications by default
        except 'set port' which requires the application to be specified.

sysadmin@tretflix:~$ tretflix shares
Usage: tretflix shares [COMMAND] [INPUT] [OPTION]

COMMANDS:
  tretflix shares add cifs [HOST] [SHARE] [OPTION] ...
  tretflix shares del cifs [HOST] [SHARE]
  tretflix shares add nfs [HOST] [SHARE]
  tretflix shares del nfs [HOST] [SHARE]
  tretflix shares show config

OPTIONS:
  -u, --user [USERNAME] [PASSWORD]
tret
Full Member
Full Member
Posts: 148
Joined: August 2nd, 2008, 2:07 pm

Re: Introducing tretflix - An HTPC Companion

Post by tret »

tretflix v1.2 CLI preview (Adding a static IP):

Code: Select all

sysadmin@tretflix:~$ tretflix network show config

eth0      Link encap:Ethernet  HWaddr 00:50:56:ac:cd:92  
          inet addr:192.168.1.155  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

sysadmin@tretflix:~$ tretflix network add ip 192.168.1.193 255.255.255.0 192.168.1.1
sysadmin@tretflix:~$ tretflix network show config

eth0      Link encap:Ethernet  HWaddr 00:50:56:ac:cd:92  
          inet addr:192.168.1.155  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth0:1    Link encap:Ethernet  HWaddr 00:50:56:ac:cd:92  
          inet addr:192.168.1.193  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
tret
Full Member
Full Member
Posts: 148
Joined: August 2nd, 2008, 2:07 pm

Re: Introducing tretflix - An HTPC Companion

Post by tret »

tretflix v1.2 CLI preview (Adding network shares):

Code: Select all

sysadmin@tretflix:~$ tretflix shares show config
There are no mounted shares
sysadmin@tretflix:~$ tretflix shares add cifs caprica6 movies -u tretflix abc123
CIFS share added
sysadmin@tretflix:~$ tretflix shares add nfs caprica6 /c/test
NFS share added
sysadmin@tretflix:~$ tretflix shares show config

Filesystem                    Type      Size  Used Avail Use% Mounted on
//caprica6/movies             cifs      9.1T  8.6T  509G  95% /mnt/caprica6/movies
caprica6:/c/test              nfs       9.1T  8.6T  509G  95% /mnt/caprica6/c/test
billplowman
Newbie
Newbie
Posts: 3
Joined: November 30th, 2013, 5:59 pm

Re: Introducing tretflix - An HTPC Companion

Post by billplowman »

Loving Tretflix so far! This project has inspired me to throw together a little ESXi server and it's been a great learning experience. Quick question: If I wanted to increase the size of the 2nd hard disk (1TB) is it simply a matter of adjusting the "Provisioned Size" of the disk under the VM Properties (vSphere Client)? Thanks again for putting all of this together!
tret
Full Member
Full Member
Posts: 148
Joined: August 2nd, 2008, 2:07 pm

Re: Introducing tretflix - An HTPC Companion

Post by tret »

billplowman wrote:Loving Tretflix so far! This project has inspired me to throw together a little ESXi server and it's been a great learning experience. Quick question: If I wanted to increase the size of the 2nd hard disk (1TB) is it simply a matter of adjusting the "Provisioned Size" of the disk under the VM Properties (vSphere Client)? Thanks again for putting all of this together!
I'm not familiar with doing this however a quick search shows that people are doing it. Take a look at this one: http://askubuntu.com/questions/294889/h ... rtual-disk

Let me know how it goes! Glad you're enjoying tretflix thus far!

- tret
billplowman
Newbie
Newbie
Posts: 3
Joined: November 30th, 2013, 5:59 pm

Re: Introducing tretflix - An HTPC Companion

Post by billplowman »

tret wrote:I'm not familiar with doing this however a quick search shows that people are doing it. Take a look at this one: http://askubuntu.com/questions/294889/h ... rtual-disk

Let me know how it goes! Glad you're enjoying tretflix thus far!

- tret
Hey, thanks for pointing me in the right direction and not just telling me to "Google it stupid!" I hadn't thought ahead far enough to realize I'd have to resize the partition and the file system. Anyway, I Googled it :D and found this: http://codesilence.wordpress.com/2013/0 ... -on-linux/

I increased the size of disk2 to 2TB (max size for MBR disks) and it's worked without a hitch (so far!) The best part is that this can be done on a live system. No need to unmount the file system or boot from a live CD. Here's what I did at the command line after adjusting the Provisioned Size of the disk in the VM Properties:

Code: Select all

gerty@tretflix:~$ sudo fdisk /dev/sdb

Command (m for help): p

Disk /dev/sdb: 2199.0 GB, 2199023254528 bytes
173 heads, 2 sectors/track, 12413200 cylinders, total 4294967294 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xcbb698fa

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048  2147483647  1073740800   83  Linux

Command (m for help): d
Selected partition 1

Command (m for help): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-4294967293, default 2048): 2048
Last sector, +sectors or +size{K,M,G} (2048-4294967293, default 4294967293): 4294967293

Command (m for help): p

Disk /dev/sdb: 2199.0 GB, 2199023254528 bytes
173 heads, 2 sectors/track, 12413200 cylinders, total 4294967294 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xcbb698fa

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048  4294967293  2147482623   83  Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.
gerty@tretflix:~$ sudo reboot
Then, after rebooting:

Code: Select all

gerty@tretflix:~$ sudo resize2fs /dev/sdb1

resize2fs 1.42 (29-Nov-2011)
Filesystem at /dev/sdb1 is mounted on /media/disk2; on-line resizing required
old_desc_blocks = 64, new_desc_blocks = 128
The filesystem on /dev/sdb1 is now 536870655 blocks long.

gerty@tretflix:~$ sudo reboot
And the results, after another reboot:

Code: Select all

gerty@tretflix:~$ df -h

Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/ubuntu-root   15G  2.8G   11G  21% /
udev                     2.0G  4.0K  2.0G   1% /dev
tmpfs                    791M  400K  791M   1% /run
none                     5.0M     0  5.0M   0% /run/lock
none                     2.0G  4.0K  2.0G   1% /run/shm
/dev/sda1                228M   29M  188M  14% /boot
/dev/sdb1                2.0T  327G  1.6T  17% /media/disk2
Hope this is of use to anyone looking to do the same!
tret
Full Member
Full Member
Posts: 148
Joined: August 2nd, 2008, 2:07 pm

Re: Introducing tretflix - An HTPC Companion

Post by tret »

billplowman wrote:
tret wrote:I'm not familiar with doing this however a quick search shows that people are doing it. Take a look at this one: http://askubuntu.com/questions/294889/h ... rtual-disk

Let me know how it goes! Glad you're enjoying tretflix thus far!

- tret
Hey, thanks for pointing me in the right direction and not just telling me to "Google it stupid!" I hadn't thought ahead far enough to realize I'd have to resize the partition and the file system. Anyway, I Googled it :D and found this: http://codesilence.wordpress.com/2013/0 ... -on-linux/

I increased the size of disk2 to 2TB (max size for MBR disks) and it's worked without a hitch (so far!) The best part is that this can be done on a live system. No need to unmount the file system or boot from a live CD. Here's what I did at the command line after adjusting the Provisioned Size of the disk in the VM Properties:

Hope this is of use to anyone looking to do the same!
Excellent, thanks for taking the time to document this for others! One of the things I'm really excited about with v1.2 (still working on it) is the ability to add a cifs/nfs share and redirect/move the downloads to the mounted share. This will allow the VM to stay relatively small and offload the downloads elsewhere in your environment.

- tret
s0rce
Newbie
Newbie
Posts: 8
Joined: June 25th, 2011, 7:51 pm

Re: Introducing tretflix - An HTPC Companion

Post by s0rce »

I'm really excited about tretflix, definitely will try it out when I upgrade my server to ESXI, currently running solaris bare metal with sab/sickbeard/etc.

I was hoping it might be possible to have each of the services hosted behind an apache/lighttpd revese proxy with SSL+https for security. I like to have these services available outside my home network and not only do you get better security but you get nice urls, example.com/sickbeard and example.com/sabnzbd instead of having to specify ports and forward a whole bunch of ports you can just expose https (443).

I'm reasonably competent with *nix and would be happy to help in any way I can.

Have you thought about putting some of the stuff on github for easier collaboration (if you wanted of course).

Looks like great work!
tret
Full Member
Full Member
Posts: 148
Joined: August 2nd, 2008, 2:07 pm

Re: Introducing tretflix - An HTPC Companion

Post by tret »

The Tretflix subreddit is live.

http://www.reddit.com/r/tretflix

- tret
tret
Full Member
Full Member
Posts: 148
Joined: August 2nd, 2008, 2:07 pm

Re: Introducing tretflix - An HTPC Companion

Post by tret »

s0rce wrote:I'm really excited about tretflix, definitely will try it out when I upgrade my server to ESXI, currently running solaris bare metal with sab/sickbeard/etc.

I was hoping it might be possible to have each of the services hosted behind an apache/lighttpd revese proxy with SSL+https for security. I like to have these services available outside my home network and not only do you get better security but you get nice urls, example.com/sickbeard and example.com/sabnzbd instead of having to specify ports and forward a whole bunch of ports you can just expose https (443).

I'm reasonably competent with *nix and would be happy to help in any way I can.

Have you thought about putting some of the stuff on github for easier collaboration (if you wanted of course).

Looks like great work!
I'm glad to hear that you're excited about this project. I am very interested in hearing about the security tweaks you mention. Can you put together a quick summary of how this can be integrated into Tretflix? I'm very interested in hearing more.

As for github, I am planning to post the master branch for Tretflix CLI once I go GA w/ Tretflix v1.2. This should allow for some collaboration and allow an easy method for updating the CLI when I've added new features, fixes, etc.

- tret
s0rce
Newbie
Newbie
Posts: 8
Joined: June 25th, 2011, 7:51 pm

Re: Introducing tretflix - An HTPC Companion

Post by s0rce »

I'm super busy right now so I can't write up a lot but this page on the sabnzbd wiki explains a bit of what I was saying

http://wiki.sabnzbd.org/howto-apache

I'll try to update time permitting.
tret
Full Member
Full Member
Posts: 148
Joined: August 2nd, 2008, 2:07 pm

Re: Introducing tretflix - An HTPC Companion

Post by tret »

That's a great start, thank you. I'm right in the middle of finalizing Tretflix v1.2 but this is definitely on my list for v1.3 features. I'm also interested in adding an OpenVPN client, are you familiar with best practices for doing so?

- tret
EAF72C79FB5B
Newbie
Newbie
Posts: 1
Joined: June 1st, 2014, 1:47 pm

Re: Introducing tretflix - An HTPC Companion

Post by EAF72C79FB5B »

I'm loving the TretFlix Project but I'm having trouble figuring out how to get tretflix and couchpotato within it to see my external USB hard drive that I have mounted.

I'm running the appliance with VirtualBox, I have the x64 Tretflix Standalone version installed. Its not the NAS edition. The base system I'm using is a machine with x64 Ubuntu and 12GB of Ram... I know Ill have to adjust the volume of the internal hard drive, my local SSD drive is a lot small than 1TB ... But I have many USB drives and also a couple servers which together comprise of almost 35TB of media and I'd like to point everything to Tretflix so i can have sickbeard, Plex, couchpotato,etc see all the existing media I have.

I already have everything configured OUTSIDE of tretflix on a different machine, but I want to redo everything incorporating Tretflix.

Any help on how to get TretFlix to see both my local USB devices and also the Devices which are on the same network sharing via SMB.

Thanks!
Shled
Newbie
Newbie
Posts: 7
Joined: June 21st, 2014, 12:46 am

Re: Introducing tretflix - An HTPC Companion

Post by Shled »

Has anyone updated TretFlix 1.3 to use SABnzb 8.0 yet? How? Is it too soon?
Post Reply