Find SUM of your entire library runtime

I would really be in love with the person who showed me how to do this. I guess all I would need to do is pull the runtimes out of the sql and then sum them up. Only problem is that I have no idea how to go about this. The guy who wrote Plexexport said this feature is coming but that was around 6 months ago.



Anybody have any ideas?



Thanks,

John

This was a super easy thing to add to my script, so I did :slight_smile:

Read more about the tool here:

http://forums.plexapp.com/index.php/topic/27944-tool-to-embed-pms-held-metadata-in-to-mp4-file/page__view__findpost__p__179405



Basically, run the tool using something like:

plexmediatagger.py --stats -bq



And it will print out something like:

============ Items Processed Statistics ===========

Number of items: 6654

---------------------------------------------

Number of Movies: 1358

Number of TV Episodes: 5296

---------------------------------------------

Total Duration: 6 months, 22 days, 16 hours, 33 minutes, 16 seconds

Average Duration: 44 minutes, 4 seconds

---------------------------------------------

Total TV Episodes Duration: 4 months, 18 days, 14 hours, 15 minutes, 13 seconds

Average TV Episode Duration: 37 minutes, 41 seconds

---------------------------------------------

Total Movies Duration: 2 months, 6 days, 2 hours, 18 minutes, 3 seconds

Average Movie Duration: 1 hour, 9 minutes, 1 second

Thank you so much for helping me out! I was always curious as to the how long it would take to watch everything in my library.



It didn’t work for me though. This is the output I got.



Mac-mini:plextagger jtw5$ python plexmediatagger.py --stats -bq<br />
============ Plex Media Tagger Started ============<br />
Connecting to PMS at localhost:32400<br />
Processing sections...<br />
Processing section 1/5 : 'Concerts'...<br />
Processing section 2/5 : 'Extras'...<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
Processing section 3/5 : 'Late Night TV'...<br />
Processing section 4/5 : 'Movies'...<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
ERROR: No duration!!! Let the developer know about this<br />
Processing section 5/5 : 'TV Shows'...<br />
ERROR: No duration!!! Let the developer know about this<br />
Traceback (most recent call last):<br />
  File "plexmediatagger.py", line 194, in <module><br />
    sys.exit(main())<br />
  File "plexmediatagger.py", line 167, in main<br />
    section_processor.process_section(section_element)<br />
  File "/Users/jtw5/Downloads/plextagger/SectionProcessor.py", line 31, in process_section<br />
    self.process_show_section_element(section_element)<br />
  File "/Users/jtw5/Downloads/plextagger/SectionProcessor.py", line 134, in process_show_section_element<br />
    self.process_season_section_element(show_item)<br />
  File "/Users/jtw5/Downloads/plextagger/SectionProcessor.py", line 148, in process_season_section_element<br />
    self.process_episode_section_element(season_item)<br />
  File "/Users/jtw5/Downloads/plextagger/SectionProcessor.py", line 163, in process_episode_section_element<br />
    logging.warning( "processing %d/%d %ss : %s" % (index+1, len(selected_episode_items), contents_type, full_episode_item.name()) )<br />
  File "/Users/jtw5/Downloads/plextagger/Items/EpisodeItem.py", line 42, in name<br />
    return "%s - S%02dE%02d - %s" % (self.season.show.name(), int(self.season.index), int(self.index), self.title)<br />
ValueError: invalid literal for int() with base 10: ''

Thanks for giving it a shot.



Now, the first issue, the “ERROR: No duration!!! Let the developer know about this” messages I was kinda expecting, so I have put in a “fix” for those. That said, a video item with no duration is going to skew the results (obviously) and does indicate that the media scanning that plex performed was faulty. It has improved a lot over the later versions, so it might be worth trying to get those rescanned if you’ve had the library around for several versions. Stop by the plex chat for help on how to do that.



Second issue I was not expecting. It seems you have a (or several) tv show episodes that are “missing” the season or episode number. Do you perhaps have some episodes/shows that organize the episodes differently?

I have put in a fix for episodes that are missing these pieces of information (I think), so please give it a try again.

If it’s still not working, try running:

plexmediatagger.py --stats -bvv

The double v instead of q will go from ‘quiet mode’ to ‘debug’ so it will print out a ton of extra stuff, but then the lines leading up to the error should help us narrow down what media item it’s choking on.

It works! Thank you again so much. I deep scanned my whole library which fixed the no duration errors.





=========== Plex Media Tagger Completed ===========

Items processed: 26915

Execution Duration: 0:16:48

============ Items Processed Statistics ===========

Number of items: 26915

---------------------------------------------

Number of Movies: 1239

Number of TV Episodes: 25676

---------------------------------------------

Total Duration: 1 year, 8 months, 28 days, 20 hours, 35 minutes, 42 seconds

Average Duration: 34 minutes, 4 seconds

---------------------------------------------

Total TV Episodes Duration: 1 year, 6 months, 16 days, 17 hours, 8 minutes, 50 seconds

Average TV Episode Duration: 31 minutes, 33 seconds

---------------------------------------------

Total Movies Duration: 2 months, 15 days, 3 hours, 26 minutes, 52 seconds

Average Movie Duration: 1 hour, 26 minutes, 10 seconds

What was the algorithm that was used like? Does it sum it all up in seconds, and then convert from there?


Awesome!


That's a lot of tv show episodes :)


So each media file gets scanned, and a duration is stored. This duration is in milliseconds, though it does generally seem that it's rounded up to a full second.

I am currently calculating how long time (days, months, etc) from the 01/01/0001 it would take to watch all the media. Obviously, this means that february is only 28 days, etc, so this might not be the optimal way of showing the total durations. It would probably better to do days and years, and skip months as months are of variable length…. Any opinions?

I guess I do have quite a bit of TV lol…




Ok. That looks like it should work fine. Or a month could equal (365/12) days. Either way it works. I just think that total duration is such a fun number to tell people (especially with my large library lol)

Thanks again!

ok, so I decided to use weeks instead of months, and it's no longer based upon actual dates (i.e. I am not calculating with a starting point of 1/1/0001). Instead of I am just basing it upon that there are 60 seconds in a min, 60 min in an hour, 24 hours in a day, 365 days in a year, and the remaining days are split up into weeks of 7 days, and then whatever days remain are left as days :)

Glad to help. As I mentioned, it was pretty easy to add to the script and it was already within the scope of the tool!

I have a favor to ask, could you download this version of the plexmediatagger (it’s got some extra debug logging), and run it on your entire library:

http://dl.dropbox.com/u/7837/PlexMediaTagger-gamblore.zip



I am trying to figure out why the script was crashing that first time, and this will help us figure out which items it was choking on (hopefully the deep scan didn’t remove the issue).

Thanks

Sure, no problem. Running it now.



So far it’s printing a bunch of



“[%s] season has no index” in the TV sections. Seems at least like it’s printing that for every TV show



$ python plexmediatagger.py --stats -bq<br />
============ Plex Media Tagger Started ============<br />
Connecting to PMS at localhost:32400<br />
Processing sections...<br />
Processing section 1/5 : 'Concerts'...<br />
Processing section 2/5 : 'Extras'...<br />
Processing section 3/5 : 'Late Night TV'...<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
Processing section 4/5 : 'Movies'...<br />
Processing section 5/5 : 'TV Shows'...<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] episode has no index<br />
[%s] episode has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
[%s] season has no index<br />
Processing sections completed<br />
=========== Plex Media Tagger Completed ===========<br />
Items processed: 		26915<br />
Execution Duration: 		0:09:07<br />
============ Items Processed Statistics ===========<br />
Number of items: 		26915<br />
---------------------------------------------<br />
Number of Movies: 		1239<br />
Number of TV Episodes: 		25676<br />
---------------------------------------------<br />
Total Duration: 		1 year, 38 weeks, 5 days, 20 hours, 35 minutes, 42 seconds<br />
Average Duration: 		34 minutes, 4 seconds<br />
---------------------------------------------<br />
Total TV Episodes Duration: 	1 year, 28 weeks, 1 day, 17 hours, 8 minutes, 50 seconds<br />
Average TV Episode Duration: 	31 minutes, 33 seconds<br />
---------------------------------------------<br />
Total Movies Duration: 		10 weeks, 4 days, 3 hours, 26 minutes, 52 seconds<br />
Average Movie Duration: 	1 hour, 26 minutes, 10 seconds<br />
---------------------------------------------<br />
NOTES:<br />
  No Duration:<br />
	Management (2009)<br />
	The Ugly Truth (2009)<br />
	Gunsmoke (1955) - S03E38 - Overland Express

Sorry, forgot some debug stuff. try it again please?

http://dl.dropbox.com/u/7837/PlexMediaTagger-gamblore-v2.zip



Thanks for helping debug this for me! Much appriciated!



No, thank you! Running now...

 python plexmediatagger.py --stats -bq<br />
============ Plex Media Tagger Started ============<br />
Connecting to PMS at localhost:32400<br />
Processing sections...<br />
Processing section 1/5 : 'Concerts'...<br />
Processing section 2/5 : 'Extras'...<br />
Processing section 3/5 : 'Late Night TV'...<br />
[Conan (2010) (2010) - All episodes] season has no index<br />
[The Late Late Show with Craig Ferguson (2005) - All episodes] season has no index<br />
[Late Night with Jimmy Fallon (2009) - All episodes] season has no index<br />
[Late Show with David Letterman (1993) - All episodes] season has no index<br />
[Saturday Night Live (1975) - All episodes] season has no index<br />
[The Tonight Show with Jay Leno (1992) - All episodes] season has no index<br />
Processing section 4/5 : 'Movies'...<br />
Processing section 5/5 : 'TV Shows'...<br />
[24 (2001) - All episodes] season has no index<br />
[30 Rock (2006) - All episodes] season has no index<br />
[3rd Rock from the Sun (1996) - All episodes] season has no index<br />
[8 Simple Rules (2002) - All episodes] season has no index<br />
[The A-Team (1983) - All episodes] season has no index<br />
[The Abbott and Costello Show (1952) - All episodes] season has no index<br />
[According to Jim (2001) - All episodes] season has no index<br />
[Adventures of Superman (1952) - All episodes] season has no index<br />
[Alfred Hitchcock Presents (1985) (1985) - All episodes] season has no index<br />
[All in the Family (1971) - All episodes] season has no index<br />
[American Dad! (2005) - All episodes] season has no index<br />
[The Andy Griffith Show (1960) - All episodes] season has no index<br />
[Andy Richter Controls the Universe (2002) - All episodes] season has no index<br />
[Animaniacs (1993) - All episodes] season has no index<br />
[Aqua Unit Patrol Squad 1 (2000) - All episodes] season has no index<br />
[Archer (2009) (2009) - All episodes] season has no index<br />
[Arrested Development (2003) - All episodes] season has no index<br />
[Babylon 5 (1993) - All episodes] season has no index<br />
[Batman (1966) - All episodes] season has no index<br />
[Battlestar Galactica (2003) (2003) - All episodes] season has no index<br />
[Beavis and Butt-head (1993) - All episodes] season has no index<br />
[Becker (1998) - All episodes] season has no index<br />
[The Beverly Hillbillies (1962) - All episodes] season has no index<br />
[Bewitched (1964) - All episodes] season has no index<br />
[The Big Bang Theory (2007) - All episodes] season has no index<br />
[Big Love (2005) - All episodes] season has no index<br />
[Boardwalk Empire (2010) - All episodes] season has no index<br />
[The Bob Newhart Show (1972) - All episodes] season has no index<br />
[Bones (2005) - All episodes] season has no index<br />
[Bored to Death (2009) - All episodes] season has no index<br />
[Boston Legal (2004) - All episodes] season has no index<br />
[Boy Meets World (1993) - All episodes] season has no index<br />
[Breaking Bad (2008) - All episodes] season has no index<br />
[Buffy the Vampire Slayer (1997) - All episodes] season has no index<br />
[Burn Notice (2007) - All episodes] season has no index<br />
[Californication (2007) - All episodes] season has no index<br />
[Captain Planet and the Planeteers (1990) - All episodes] season has no index<br />
[Chappelle's Show (2003) - All episodes] season has no index<br />
[Cheers (1982) - All episodes] season has no index<br />
[Childrens Hospital (2008) - All episodes] season has no index<br />
[The Cleveland Show (2009) - All episodes] season has no index<br />
[Columbo (1968) - All episodes] season has no index<br />
[Community (2009) - All episodes] season has no index<br />
[The Cosby Show (1984) - All episodes] season has no index<br />
[Cougar Town (2009) - All episodes] season has no index<br />
[Curb Your Enthusiasm (2000) - All episodes] season has no index<br />
[Cybill (1995) - All episodes] season has no index<br />
[Daria (1997) - All episodes] season has no index<br />
[Darkwing Duck (1991) - All episodes] season has no index<br />
[Deadwood (2004) - All episodes] season has no index<br />
[Dexter (2006) - All episodes] season has no index<br />
[The Dick Van ■■■■ Show (1961) - All episodes] season has no index<br />
[Dinosaurs (1991) - All episodes] season has no index<br />
[Doctor in the House (1969) - All episodes] season has no index<br />
[Doogie Howser, M.D. (1989) - All episodes] season has no index<br />
[Doug (1991) - All episodes] season has no index<br />
[Dragon Ball Z (1989) - All episodes] season has no index<br />
[The Drew Carey Show (1995) - All episodes] season has no index<br />
[Duckman (1994) - All episodes] season has no index<br />
[Due South (1994) - All episodes] season has no index<br />
[Eastbound & Down (2009) - All episodes] season has no index<br />
[Entourage (2004) - All episodes] season has no index<br />
[Everybody Hates Chris (2005) - All episodes] season has no index<br />
[Everybody Loves Raymond (1996) - All episodes] season has no index<br />
[Family Guy (1999) - All episodes] season has no index<br />
[Fawlty Towers (1975) - All episodes] season has no index<br />
[Flight of the Conchords (2007) - All episodes] season has no index<br />
[The Flintstones (1960) - All episodes] season has no index<br />
[Frasier (1993) - All episodes] season has no index<br />
[The Fresh Prince of Bel-Air (1990) - All episodes] season has no index<br />
[Friends (1994) - All episodes] season has no index<br />
[Full House (1987) - All episodes] season has no index<br />
[Funny or Die Presents (2010) - All episodes] season has no index<br />
[Futurama (1999) - All episodes] season has no index<br />
[Get Smart (1965) - All episodes] season has no index<br />
[Gilligan's Island (1964) - All episodes] season has no index<br />
[Green Acres (1965) - All episodes] season has no index<br />
[Gunsmoke (1955) - All episodes] season has no index<br />
[Happy Days (1974) - All episodes] season has no index<br />
[Have Gun, Will Travel (1957) - All episodes] season has no index<br />
[Hawaii Five-O (1968) - All episodes] season has no index<br />
[Hogan's Heroes (1965) - All episodes] season has no index<br />
[Home Improvement (1991) - All episodes] season has no index<br />
[Homicide: Life On The Street (1993) - All episodes] season has no index<br />
[The Honeymooners (1952) - All episodes] season has no index<br />
[House (2004) - All episodes] season has no index<br />
[How I Met Your Mother (2005) - All episodes] season has no index<br />
[Huff (2004) - All episodes] season has no index<br />
[Hung (2009) - All episodes] season has no index<br />
[I Dream of Jeannie (1965) - All episodes] season has no index<br />
[In Living Color (1990) - All episodes] season has no index<br />
[It's Always Sunny in Philadelphia (2005) - All episodes] season has no index<br />
[It's Garry Shandling's Show (1986) - All episodes] season has no index<br />
[The Jeffersons (1975) - All episodes] season has no index<br />
[The Jetsons (1962) - All episodes] season has no index<br />
[Joey (2004) - All episodes] season has no index<br />
[Just Shoot Me (1997) - All episodes] season has no index<br />
[Justified (2010) - All episodes] season has no index<br />
[Keeping Up Appearances (1990) - All episodes] season has no index<br />
[The Kids in the Hall (1989) - All episodes] season has no index<br />
[The King of Queens (1998) - All episodes] season has no index<br />
[King of the Hill (1997) - All episodes] season has no index<br />
[The Larry Sanders Show (1992) - All episodes] season has no index<br />
[Laverne & Shirley (1976) - All episodes] season has no index<br />
[Law & Order (1990) - All episodes] season has no index<br />
[Law & Order: Special Victims Unit (1999) - All episodes] season has no index<br />
[Leave It to Beaver (1957) - All episodes] season has no index<br />
[Leverage (2008) - All episodes] season has no index<br />
[The Life & Times of Tim (2008) - All episodes] season has no index<br />
[Looney Tunes () - All episodes] season has no index<br />
[Lost (2004) - All episodes] season has no index<br />
[Louie (2010) (2010) - All episodes] season has no index<br />
[M*A*S*H (1972) - All episodes] season has no index<br />
[MacGyver (1985) - All episodes] season has no index<br />
[Mad About You (1992) - All episodes] season has no index<br />
[Mad Men (2007) - All episodes] season has no index<br />
[Magnum, P.I. (1980) - All episodes] season has no index<br />
[Malcolm in the Middle (2000) - All episodes] season has no index<br />
[Married ... with Children (1987) - All episodes] season has no index<br />
[Martin (1992) - All episodes] season has no index<br />
[The Mary Tyler Moore Show (1970) - All episodes] season has no index<br />
[Matlock (1986) - All episodes] season has no index<br />
[Miami Vice (1984) - All episodes] season has no index<br />
[The Middle (2009) - All episodes] season has no index<br />
[Mike & Molly (2010) - All episodes] season has no index<br />
[Mission: Impossible (1966) - All episodes] season has no index<br />
[Modern Family (2009) - All episodes] season has no index<br />
[Monk (2002) - All episodes] season has no index<br />
[Monty Python's Flying Circus (1969) - All episodes] season has no index<br />
[Moonlighting (1985) - All episodes] season has no index<br />
[Mork & Mindy (1978) - All episodes] season has no index<br />
[Mr. Show (1995) - All episodes] season has no index<br />
[Murphy Brown (1988) - All episodes] season has no index<br />
[My Name Is Earl (2005) - All episodes] season has no index<br />
[My Wife and Kids (2001) - All episodes] season has no index<br />
[Mystery Science Theater 3000 (1988) - All episodes] season has no index<br />
[MythBusters (2003) - All episodes] season has no index<br />
[The Nanny (1993) - All episodes] season has no index<br />
[The New Adventures of Old Christine (2006) - All episodes] season has no index<br />
[Newhart (1982) - All episodes] season has no index<br />
[NewsRadio (1995) - All episodes] season has no index<br />
[Night Court (1984) - All episodes] season has no index<br />
[Nip/Tuck (2003) - All episodes] season has no index<br />
[Norm (1999) - All episodes] season has no index<br />
[Northern Exposure (1990) - All episodes] season has no index<br />
[Numb3rs (2005) - All episodes] season has no index<br />
[Nurse Jackie (2009) - All episodes] season has no index<br />
[NYPD Blue (1993) - All episodes] season has no index<br />
[The Odd Couple (1970) - All episodes] season has no index<br />
[The Office (US) (2005) - All episodes] season has no index<br />
[The Outer Limits (1963) - All episodes] season has no index<br />
[Oz (1997) - All episodes] season has no index<br />
[Parenthood (2010) (2010) - All episodes] season has no index<br />
[Parks and Recreation (2009) - All episodes] season has no index<br />
[Penn & Teller: Bullshit! (2003) - All episodes] season has no index<br />
[Prison Break (2005) - All episodes] season has no index<br />
[Quantum Leap (1989) - All episodes] season has no index<br />
[Raising Hope (2010) - All episodes] season has no index<br />
[Red Dwarf (1988) - All episodes] season has no index<br />
[The Ren and Stimpy Show (1991) - All episodes] season has no index<br />
[Renegade (1992) - All episodes] season has no index<br />
[Reno 911! (2003) - All episodes] season has no index<br />
[Robot Chicken (2005) - All episodes] season has no index<br />
[The Rockford Files (1974) - All episodes] season has no index<br />
[Rocko's Modern Life (1993) - All episodes] season has no index<br />
[Rome (2006) - All episodes] season has no index<br />
[Roseanne (1988) - All episodes] season has no index<br />
[Rugrats (1991) - All episodes] season has no index<br />
[Rules of Engagement (2007) - All episodes] season has no index<br />
[Sabrina The Teenage Witch (1996) - All episodes] season has no index<br />
[Salute Your Shorts (1991) - All episodes] season has no index<br />
[Saved by the Bell (1989) - All episodes] season has no index<br />
[Schoolhouse Rock! (1973) - All episodes] season has no index<br />
[Scrubs (2001) - All episodes] season has no index<br />
[Seinfeld (1989) - All episodes] season has no index<br />
[■■■ and the City (1998) - All episodes] season has no index<br />
[Shameless (US) (2011) - All episodes] season has no index<br />
[The Shield (2002) - All episodes] season has no index<br />
[The Simpsons (1989) - All episodes] season has no index<br />
[Six Feet Under (2001) - All episodes] season has no index<br />
[The Six Million Dollar Man (1974) - All episodes] season has no index<br />
[Sledge Hammer! (1986) - All episodes] season has no index<br />
[The Sopranos (1999) - All episodes] season has no index<br />
[South Park (1997) - All episodes] season has no index<br />
[Spin City (1996) - All episodes] season has no index<br />
[Sports Night (1998) - All episodes] season has no index<br />
[Star Trek (1966) - All episodes] season has no index<br />
[Star Trek: Deep Space Nine (1993) - All episodes] season has no index<br />
[Star Trek: Enterprise (2001) - All episodes] season has no index<br />
[Star Trek: The Animated Series (1973) - All episodes] season has no index<br />
[Star Trek: The Next Generation (1987) - All episodes] season has no index<br />
[Star Trek: Voyager (1995) - All episodes] season has no index<br />
[Stargate Atlantis (2004) - All episodes] season has no index<br />
[Stargate SG-1 (1997) - All episodes] season has no index<br />
[Step by Step (1991) - All episodes] season has no index<br />
[Strangers with Candy (1999) - All episodes] season has no index<br />
[Tales from the Crypt (1989) - All episodes] season has no index<br />
[Taxi (1978) - All episodes] season has no index<br />
[Teenage Mutant Ninja Turtles (1987) (1987) - All episodes] season has no index<br />
[That '70s Show (1998) - All episodes] season has no index<br />
[The Three Stooges (1930) - All episodes] season has no index<br />
[The Tom Green Show (1994) (1994) - All episodes] season has no index<br />
[Top Gear (2002) - All episodes] season has no index<br />
Traceback (most recent call last):<br />
  File "plexmediatagger.py", line 194, in <module><br />
    sys.exit(main())<br />
  File "plexmediatagger.py", line 167, in main<br />
    section_processor.process_section(section_element)<br />
  File "/Users/jtw5/Desktop/PlexMediaTagger/SectionProcessor.py", line 31, in process_section<br />
    self.process_show_section_element(section_element)<br />
  File "/Users/jtw5/Desktop/PlexMediaTagger/SectionProcessor.py", line 134, in process_show_section_element<br />
    self.process_season_section_element(show_item)<br />
  File "/Users/jtw5/Desktop/PlexMediaTagger/SectionProcessor.py", line 148, in process_season_section_element<br />
    self.process_episode_section_element(season_item)<br />
  File "/Users/jtw5/Desktop/PlexMediaTagger/SectionProcessor.py", line 163, in process_episode_section_element<br />
    logging.warning( "processing %d/%d %ss : %s" % (index+1, len(selected_episode_items), contents_type, full_episode_item.name()) )<br />
  File "/Users/jtw5/Desktop/PlexMediaTagger/Items/EpisodeItem.py", line 42, in name<br />
    return "%s - S%02dE%02d - %s" % (self.season.show.name(), int(self.season.index), int(self.index), self.title)<br />
ValueError: invalid literal for int() with base 10: ''<br />
John-Wagners-Mac-mini:PlexMediaTagger jtw5$ son.show.name(), int(self.season.index), int(self.index), self.title)<br />
-bash: syntax error near unexpected token `,'<br />
John-Wagners-Mac-mini:PlexMediaTagger jtw5$ ValueError: invalid literal for int() with base 10: ''

Ok, we are getting closer. Run this one:

http://dl.dropbox.com/u/7837/PlexMediaTagger-gamblore-v3.zip



with:

plexmediatagger.py --stats -bq

and see if you hit any snags.



Sorry about all the forwards and backwards. Just let me know when you get sick of it and we can stop :slight_smile:

No problem at all, I want to help.


$ python plexmediatagger.py --stats -bq<br />
============ Plex Media Tagger Started ============<br />
Connecting to PMS at localhost:32400<br />
Processing sections...<br />
Processing section 1/5 : 'Concerts'...<br />
Processing section 2/5 : 'Extras'...<br />
Processing section 3/5 : 'Late Night TV'...<br />
Processing section 4/5 : 'Movies'...<br />
Processing section 5/5 : 'TV Shows'...<br />
Oops! Failed to print for [Top Gear (2002) - 2006-01-09]. Season: [8], Episode: []<br />
Processing sections completed<br />
=========== Plex Media Tagger Completed ===========<br />
Items processed: 		26922<br />
Execution Duration: 		0:09:08<br />
============ Items Processed Statistics ===========<br />
Number of items: 		26922<br />
---------------------------------------------<br />
Number of Movies: 		1239<br />
Number of TV Episodes: 		25683<br />
---------------------------------------------<br />
Total Duration: 		1 year, 38 weeks, 5 days, 23 hours, 40 minutes, 22 seconds<br />
Average Duration: 		34 minutes, 4 seconds<br />
---------------------------------------------<br />
Total TV Episodes Duration: 	1 year, 28 weeks, 1 day, 20 hours, 13 minutes, 30 seconds<br />
Average TV Episode Duration: 	31 minutes, 33 seconds<br />
---------------------------------------------<br />
Total Movies Duration: 		10 weeks, 4 days, 3 hours, 26 minutes, 52 seconds<br />
Average Movie Duration: 	1 hour, 26 minutes, 10 seconds<br />
---------------------------------------------<br />
NOTES:<br />
  No Duration:<br />
	Management (2009)<br />
	The Ugly Truth (2009)<br />
	Gunsmoke (1955) - S03E38 - Overland Express


Looks like there is no top gear episode in season 8 with the date 2006-01-09:
http://thetvdb.com/?tab=season&seriesid=74608&seasonid=7739&lid=7

If you look at this episode in the desktop plex client, what episode number does it list it as?

It is just listed as "8." instead of 8.1 or 8.2...etc. Weird! It has no episode number.