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)



- thebusiness - 2010-10-23

The new alpha 463 shows up as alpha 444


- WingmanNZ - 2010-10-23

WingmanNZ Wrote:Where in the code would i have to edit for SickBeard to create season folders with double digits eg. Season 01, Season 02. I know it will use them if they exist but it creates folders that are single digit eg Season 1, Season 2. Any Help would be greatly appreciated.

midgetspy Wrote:processTV.py, just search for seasonFolder and it'll get you in the right area.

I have found the area but I cant seem to get the code quite right to create leading zeros for season less than Season "10"

EG

Season 01
Season 02
Season 03
Season 04
Season 05
Season 06
Season 07
Season 08
Season 09
Season 10

I have found what you described as the correct code but i am not sure how to do an "if season number less than "10" add leading zero when creating season folder"

Code:
# if we're supposed to put it in a season folder then figure out what folder to use
    seasonFolder = ''
    if rootEp.show.seasonfolders == True:
        
        # search the show dir for season folders
        for curDir in os.listdir(rootEp.show.location):

            if not os.path.isdir(os.path.join(rootEp.show.location, curDir)):
                continue
            
            # if it's a season folder, check if it's the one we want
            match = re.match(".*[Ss]eason\s*(\d+)", curDir)
            if match != None:
                # if it's the correct season folder then stop looking
                if int(match.group(1)) == int(rootEp.season):
                    seasonFolder = curDir
                    break

        # if we couldn't find the right one then just assume "Season X" format is what we want
        if seasonFolder == '':
            seasonFolder = 'Season ' + str(rootEp.season)

    returnStr += logHelper("Season folders were " + str(rootEp.show.seasonfolders) + " which gave " + seasonFolder, logger.DEBUG)


any help to add this as a feature or simply help me with the correct code would be greatly appreciated.

cheers and thanks for this awesome software!


- grither - 2010-10-23

thebusiness Wrote:The new alpha 463 shows up as alpha 444

yep just installed and noticed this too... would be no big deal but because its showing as 444 its also saying there's a new version available, which of course there isn't because 463 is already installed!


- midgetspy - 2010-10-24

Hah oops... I'll re-upload it, one sec

WingmanNZ: This could be done with just string concatenation or string formatting... I'm not going to write it for you but it is very trivial code. Maybe take a look at http://docs.python.org/index.html if you're not sure where to start.


- WingmanNZ - 2010-10-24

midgetspy Wrote:Hah oops... I'll re-upload it, one sec

WingmanNZ: This could be done with just string concatenation or string formatting... I'm not going to write it for you but it is very trivial code. Maybe take a look at http://docs.python.org/index.html if you're not sure where to start.

Thanks Mate. I have tried a few times and thing ive got it working. (not elegant but simple and effective)

Code:
# if we couldn't find the right one then just assume "Season XX" format is what we want
        if seasonFolder == '':
            if rootEp.season<10:
                seasonFolder = 'Season 0' + str(rootEp.season)
            else:
                seasonFolder = 'Season ' + str(rootEp.season)



- mtehonica - 2010-10-25

Does SB now omit the 720p when file renaming is enabled and you choose to include the quality in the filename? SB used to name things: "Eastbound and Down - s02e04 - 720p TV.mkv" but just started renaming them "Eastbound and Down - s02e05 - HD TV.mkv" regardless of whether it is HDTV or 720p TV.


- midgetspy - 2010-10-25

WingmanNZ: Yep that looks like it'll work perfectly :0)

mtehonica: It's just because I renamed the category from "720p TV" to "HD TV". The reason for that is because I added HR.WS.PDTV to that category which isn't 720p but counts as HD for all intents and purposes.


- WingmanNZ - 2010-10-25

midgetspy Wrote:WingmanNZ: Yep that looks like it'll work perfectly :0)

If i do a GIT sync... will i lose the changes ive made to the code?


- mtehonica - 2010-10-25

midgetspy Wrote:mtehonica: It's just because I renamed the category from "720p TV" to "HD TV". The reason for that is because I added HR.WS.PDTV to that category which isn't 720p but counts as HD for all intents and purposes.

I figured it was something like that. Now is there a way to tell if the file is just HDTV like "Eastbound.and.Down.S02E05.HDTV.XviD-FQM" or 720p like "Eastbound.and.Down.S02E05.720p.HDTV.x264-IMMERSE". Would they be named the same thing or different? It's nice to be able to tell from the filename if it's 720p or not.


- WingmanNZ - 2010-10-26

mtehonica Wrote:I figured it was something like that. Now is there a way to tell if the file is just HDTV like "Eastbound.and.Down.S02E05.HDTV.XviD-FQM" or 720p like "Eastbound.and.Down.S02E05.720p.HDTV.x264-IMMERSE". Would they be named the same thing or different? It's nice to be able to tell from the filename if it's 720p or not.


From what ive seen, files named like so ""Eastbound.and.Down.S02E05.HDTV.XviD-FQM"" would infact be named as "SD TV" as even thought the source was HDTV it is actually a standard def video file and is not 720p.

Sickbeard doesn't yet check if the file is actually 720p, it just relies on it being part of the file name. integrating mediainfo would fix this... (but ive been told this is not any time soon)


- skunkfu - 2010-10-26

Sorry if a little cheeky but baah why not.

midgetspy + RuudBurger = Shocked


- ECEC - 2010-10-28

@midgetspy: Sickbeard is still consuming all my CPU on a nightly basis. I'm kind of at a loss as to what to try next. I reinstalled TGit, I've deleted my Sickbeard folder and pulled everything fresh. Can you think of anything else I can do to troubleshoot or narrow down the issue?


- gorgeth - 2010-10-28

ECEC Wrote:@midgetspy: Sickbeard is still consuming all my CPU on a nightly basis. I'm kind of at a loss as to what to try next. I reinstalled TGit, I've deleted my Sickbeard folder and pulled everything fresh. Can you think of anything else I can do to troubleshoot or narrow down the issue?

How many tv shows is Sickbeard watching? how frequently do you have it set to search for backlog/current episodes?

How large are your current collection of episodes? there are several processes that SB runs that involve scanning your entire collection of shows, then looking through all the online sources for any missing episodes etc.. Its entirely possible that with a very large collection some of these may go into a state where they are racing (in theory only midgetspy can actually answer these for real I guess)


- ECEC - 2010-10-28

According to Sickbeard: 86 shows (53 active) | 2915/6014 episodes downloaded . I've been slowly removing the inactive shows from the DB over time, especially shows with many episodes I don't care about any more (like the Simpsons).

Hmm...now that I'm thinking about it, this could have started when I added the Daily Show and Colbert Report in. There were several thousand episodes in each show, so I can try removing them and see if it gets any better.

As far as scanning, Backlog is set to once a week and current episodes every 15 minutes.

Edit: after removing those two Sickbeard says 84 shows (51 active) | 2903/3315 episodes downloaded. So we'll see if dropping 2700 episodes helps at all.


- midgetspy - 2010-10-29

Shouldn't matter, there are people with way bigger libraries without problems. The fact that it has anything to do with tgit.exe makes me think it's not just a straight up SB bug... maybe try running it from a source zip rather than git and see if that helps?