Kodi Community Forum
Sick Beard - Automatic TV Show Episode download/sort/rename, nfo/tbn maker & TV Guide - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Supplementary Tools for Kodi (https://forum.kodi.tv/forumdisplay.php?fid=116)
+--- Thread: Sick Beard - Automatic TV Show Episode download/sort/rename, nfo/tbn maker & TV Guide (/showthread.php?tid=63591)



- Nick8888 - 2010-02-02

midgetspy Wrote:I'm not sure what you mean - it already does have the option to prefer HD rips...

Yes but from what I can see, you cannot choose between HR, 720p or 1080p


- xexe - 2010-02-02

This probably answers your question:

http://code.google.com/p/sickbeard/issues/detail?id=66


- midgetspy - 2010-02-02

xexe Wrote:This probably answers your question:

http://code.google.com/p/sickbeard/issues/detail?id=66

Yep, what xexe said. And since I'm not aware of a single show that comes out in anything but 720p x264 it's pretty low on the totem pole for me.


- midgetspy - 2010-02-02

xexe Wrote:Running SVN r290 I cant see any obvious issues with Python 2.5.4 and cheetah 2.0.1. Nice work

Since XBMC sqlite library has tvdb id along with season and ep is there any plans to allow using this dump to change the status of historically episodes to downloaded?

Getting tvdbid, season, ep, x resolution and y resolution exported is rather easy from XBMC.

Getting the data isn't the problem, the problem is that the whole architecture is based on assuming that "Downloaded" means it's on your filesystem. That could be changed, but I don't see the advantage.

I'm a bit confused though - how are you going to have episodes in your XBMC library that aren't on your filesystem? Do you just never clean it? Or are you talking about episodes that are in multiple directories?


- xexe - 2010-02-03

Once you get past the basic users of XBMC library there are quite a few disadvantages to relying purely on a directory scan to populate the already downloaded status.

Of the top of my head:

Multiple Directory's per show
Multiple NAS's per show
HD/SD folder split
DVD ordered numbering
Complex/obscure naming
Offline disks
Home recordings/catalogs
Sickbeard used as a remote downloader and not able to see filesystem

The means XBMC uses to correctly populate the library are complex and ever evolving. It seems sensible to me to not reinvent the wheel for these cases and let XBMC do it.

I would also suggest a simple export to CSV would be more flexible than a direct XBMC dbase lookup. I do something similar with sqlite3 to export a complete list and it is trivial to achieve.


Torrent Postprocessing - edog1973 - 2010-02-04

Hi, I just discovered this a couple of days ago and I have to say that I love it!

The only issue I have right now is the lack of postprocessing for torrent downloads. I took a quick look at the code and decided that I could fix that. Here is what I came up with. I'm hoping that perhaps you would consider including the changes?

My approach is quite a bit different from the the current postprocessing. Your current approach had the downloading application essentially call back to notify when a download is finished where my idea is to periodically search through a download dir to find any video files and then try to process them.

First of all I have my torrent client set to move completed downloads to a specific folder. I set the TV Download Dir config option to point to the dir.

I slightly modified the doit() in processTV.py and added processDownloadDir(). See linked files. (I put big ugly comments in show exactly what I changed). Also I added processDownloadDir() to webserve.py. I then manually enter the url into the browser to call the page. My thought is that processDownloadDir would be called every x minuets / hours, perhaps at the search frequency.

processTV.py
webserve.py

Thanks


- midgetspy - 2010-02-04

edog1973 Wrote:Hi, I just discovered this a couple of days ago and I have to say that I love it!

The only issue I have right now is the lack of postprocessing for torrent downloads. I took a quick look at the code and decided that I could fix that. Here is what I came up with. I'm hoping that perhaps you would consider including the changes?

My approach is quite a bit different from the the current postprocessing. Your current approach had the downloading application essentially call back to notify when a download is finished where my idea is to periodically search through a download dir to find any video files and then try to process them.

First of all I have my torrent client set to move completed downloads to a specific folder. I set the TV Download Dir config option to point to the dir.

I slightly modified the doit() in processTV.py and added processDownloadDir(). See linked files. (I put big ugly comments in show exactly what I changed). Also I added processDownloadDir() to webserve.py. I then manually enter the url into the browser to call the page. My thought is that processDownloadDir would be called every x minuets / hours, perhaps at the search frequency.

processTV.py
webserve.py

Thanks

For starters, are you saying that it's working reliably with torrents? I haven't heard of anybody actually using it with torrents so that's great news for me :0)

About the post processing, what you've done is basically implemented this for me: https://code.google.com/p/sickbeard/issues/detail?id=3

One reason I haven't implemented it is because of the worry of incomplete files during the postprocessing (aka if Sick Beard scans the folder and post processes an episode while it's being copied). My solution (in my head) was to make an isFileBeingCopied() function that polls a file's size and if it's constant over a few seconds then assume it's not currently being copied, but I haven't gotten around to that yet. Sounds like if I do that you've done the rest :0)

Can you please attach your changes to the issue linked above? (in the form of a patch, if possible). Thanks for the help, I'll take a look at it when I have some time.


- edog1973 - 2010-02-04

midgetspy Wrote:For starters, are you saying that it's working reliably with torrents? I haven't heard of anybody actually using it with torrents so that's great news for me :0)

About the post processing, what you've done is basically implemented this for me: https://code.google.com/p/sickbeard/issues/detail?id=3

One reason I haven't implemented it is because of the worry of incomplete files during the postprocessing (aka if Sick Beard scans the folder and post processes an episode while it's being copied). My solution (in my head) was to make an isFileBeingCopied() function that polls a file's size and if it's constant over a few seconds then assume it's not currently being copied, but I haven't gotten around to that yet. Sounds like if I do that you've done the rest :0)

Can you please attach your changes to the issue linked above? (in the form of a patch, if possible). Thanks for the help, I'll take a look at it when I have some time.
I've uploaded the two files to the issue as requested.

Torrents seem to be working fine for me so far. However, I'm really not doing much yet. With this still being alpha and all, I'll feel more comfortable with more testing before throwing my entire collection at it. I'm sure that I'll be working with it more and will providing feedback.

Every torrent client I've used has a feature to move the completed download to a different directory when the download is complete. Since I use this feature, there is no need to keep track of file size; if it's there it's done. Also, not that I would want to blow a hole in your idea, but on Linux systems torrent clients allocate all the storage for a download when it starts (that way the files system can grab a continuous chunk and avoid fragmentation). Because of this the file size does not change during the download. But like I said earlier I don't think it would be necessary.


- funkydude101 - 2010-02-04

Hello hello! I just want to thank the developer for working on this software!

However I haven't been able to get this working properly yet- strangely. I've configured it properly, set to use tvnzb and nzbmatrix and connect with SABnzbd. However when I try to search for ANY episode or force a backlog it does nothing. Before I set up nzbmatrix, I would get a no download found error with just TVNZB. Now with both sources set up, when I click search I get sent back to the same page with no indication that it's doing anything.

SABnzbd notices new episodes (I think) as it did for Modern Family, but I get an error in the log:

Code:
Feb-03 23:42:02 INFO     SEARCH :: Sending NZB to SABnzbd
Feb-03 23:42:02 DEBUG    SEARCH :: URL: http://localhost:8080/sabnzbd/api?ma_password=&pp=3&apikey=*********************&name=http%3A%2F%2Fnzbmatrix.com%2Fapi-nzb-download.php%3Fid%3D576798%26username%3D**********%26apikey%3D*******************************&cat=tv&priority=1&mode=addurl&ma_username=

Feb-03 23:42:02 DEBUG    SEARCH :: Result text from SAB: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Feb-03 23:42:02 ERROR    SEARCH :: Unknown failure sending NZB to sab. Return text is: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">



- midgetspy - 2010-02-04

edog1973 Wrote:Every torrent client I've used has a feature to move the completed download to a different directory when the download is complete. Since I use this feature, there is no need to keep track of file size; if it's there it's done. Also, not that I would want to blow a hole in your idea, but on Linux systems torrent clients allocate all the storage for a download when it starts (that way the files system can grab a continuous chunk and avoid fragmentation). Because of this the file size does not change during the download. But like I said earlier I don't think it would be necessary.

I didn't mean if the file was still being downloaded, I mean if it's still being copied to the completed dir. The file doesn't get moved to the completed dir instantly, it takes time to copy. Especially if it's a larger HD episode to or from a network share it takes a not inconsequential amount of time and if SB scans the watch folder during that time things will break. Of course people would still need to use the correct settings on their torrent client (no pre-allocation) regardless.


- midgetspy - 2010-02-04

funkydude101 Wrote:Hello hello! I just want to thank the developer for working on this software!

However I haven't been able to get this working properly yet- strangely. I've configured it properly, set to use tvnzb and nzbmatrix and connect with SABnzbd. However when I try to search for ANY episode or force a backlog it does nothing. Before I set up nzbmatrix, I would get a no download found error with just TVNZB. Now with both sources set up, when I click search I get sent back to the same page with no indication that it's doing anything.

SABnzbd notices new episodes (I think) as it did for Modern Family, but I get an error in the log:

Code:
Feb-03 23:42:02 INFO     SEARCH :: Sending NZB to SABnzbd
Feb-03 23:42:02 DEBUG    SEARCH :: URL: http://localhost:8080/sabnzbd/api?ma_password=&pp=3&apikey=*********************&name=http%3A%2F%2Fnzbmatrix.com%2Fapi-nzb-download.php%3Fid%3D576798%26username%3D**********%26apikey%3D*******************************&cat=tv&priority=1&mode=addurl&ma_username=

Feb-03 23:42:02 DEBUG    SEARCH :: Result text from SAB: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Feb-03 23:42:02 ERROR    SEARCH :: Unknown failure sending NZB to sab. Return text is: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Are you using SAB 0.4? Have you tried using a black hole/watch folder?


- xexe - 2010-02-04

According to the docs sab can tell you the version

Version

http://host:port/sabnzbd/api?mode=version&output=json|xml

Since this is going to come up alot perhaps some sort of test to enable the feature?


- Nick8888 - 2010-02-04

xexe Wrote:According to the docs sab can tell you the version

Version

http://host:port/sabnzbd/api?mode=version&output=json|xml

Since this is going to come up alot perhaps some sort of test to enable the feature?

If you mean disabling the import to sab feature I disagree.

If you mean disabling the priority parameter I agree.

As I mentioned in a previous post.. everything works fine in sab 0.4 by removing the one line of code regarding the priority param.


- xexe - 2010-02-04

Obviously I mean use the version string when adding the sab server to do whatever is necessary to SB. If this is disable features or change config so be it.

Regardless Sab 0.4 is not long for this world since the 6th RC for 5 is in the SVN


- funkydude101 - 2010-02-04

midgetspy Wrote:Are you using SAB 0.4? Have you tried using a black hole/watch folder?

I figured it out after some searching. You are right, I need to be using the 0.5 beta.

Thanks!