metahandlers update - beta test!

jas0npc

Banned
May 5, 2012
2,449
0
0
UK
Not to annoy you in any way but just to be sure. Did you clear out your database by deleting /userdata/addon_data/script.module.metahandler/ folder first. And last but not least get the lastest version of beta metahandler (7hours old or so) plus latest beta 1Ch**nel. Because I can not replicate this no matter how hard I try. And it sounds like the error with the previus metahandler beta or a corrupt database created by the last beta. Like Eldorado writes an empty database would be the best to test with.
Where would I find the latest 1Ch**nel beta the one on https://github.com/bstrdsmkr/1Ch**nel is 6 days old, is that it.

@tuxen Thanks I didnt have the latest 1Ch**nel, mental note read read read lol
 
Last edited:

tuxen

Banned
Mar 23, 2012
2,235
0
0
Denmark
Yeah that's it I would think as it must be the same that I run. :)
It has -f32d584 in the end of the zip. 1Ch**nel that is.
 
Last edited:

tuxen

Banned
Mar 23, 2012
2,235
0
0
Denmark
@Eldorado: One thing I noticed though is if I start XBMC and do a normal exit (press "s" and then choose exit) XBMC just hangs and if I close it with alt-f4 instead the XBMC process also still hangs in the background. Similar to another test I remembered have you set some long time limit up again on something I do not remember what was now.

Edit: Very sorry wasps of cause the 1Ch**nel beta causing this :) nothing to do with the new metahandler. I should have been able to see through that as I remember now. :)

So everything still good here. No errors at all.
 
Last edited:

Eldorado

Moderator
Staff member
May 7, 2012
990
0
16
I have installed in this on to my ATV2, but on 1 channel tv series - most popular, the search gets to 5 out of 24 items and the script errors out, here is my pastbin log of xbmc.log http://pastebin.com/TdEhNkNV
Perfect thanks!

Testing with a loaded DB helps too.. adding this year column for tv shows had quite the ripple effect!

Just wondering where in 1Ch**nel you went to trip the error? It's hard to tell from the logs exactly where in the addon you are..

I pushed in a fix for this one, looks like it should be the last needed
 

tuxen

Banned
Mar 23, 2012
2,235
0
0
Denmark
He actually did say tv shows-->popular ;) I know a loaded database also help just thought the previus beta might had done something to it because I saved mine and got no error using that either it was not very big though. But very nice and impressive that you are able to nail it again and again..
/test_on

Edit: Oh hey post 100. Heh..
 
Last edited:

tuxen

Banned
Mar 23, 2012
2,235
0
0
Denmark
Again no errors at all in the 3 plugins using metahandler I have tried. No matter what pathway I may choose in them. Also tested with clean db and with the one I had before testing. (though it probably was not of much use as I can see)

So thumbs up from here!
Tested every 1st/2nd/3rd level entry in Ic*f*lms and 1Ch**nel and some random season/episodes, plus the random stuff in 1click.

On a sidetracking note; man it's nice to see Ic*f*lms finally move away from avi to mp4 (it's a world of difference) and also starting having some series or episodes for now in 720p. :D For someone who wants to test but can't find any "big bang 5x24" is a good concrete example of both. Ok sorry for that just got a little carried away there.
 
Last edited:

Eldorado

Moderator
Staff member
May 7, 2012
990
0
16
Ah.. I read to fast and didn't see where he said the tv shows - popular... where's that Bstrdsmkr, gotta get him to spruce up those 1Ch**nel logs :)

K, I'm going to get this one released to the repo... I'll post when it goes in!
 

Bstrdsmkr

New member
Mar 16, 2012
763
0
0
Sorry guys, got hung up IRL lol.

The logs are weird, unless you're intimately familiar with the insides, because all the different categories are handled by the same function: getfilteredresults(). The only difference in the categories are parameters added to the url based on the user's previous selection. Favorites and search are the only exceptions, and even then it's the same logic, I just put them in different functions to keep getfilteredresults() semi-readable.

I should be able to test things out tonight, but tuxen usually finds more bugs than me anyway lol
 

Eldorado

Moderator
Staff member
May 7, 2012
990
0
16
@Bstrdsmkr

One thing I wanted to mention when reading some 1Ch**nel logs, tuxen's in particular, it looks like metahandlers is initialized multiple times

See this snippet from his log, this looks like the startup of 1Ch**nel, metahandlers gets initialized 5 times :)

I haven't looked at your code to see what's up, but just an fyi in case you wanted to clean it up a bit

http://pastebin.com/3TCpTNpv

Code:
22:32:58 T:3528  NOTICE: Metahandlers - Loading sqlite3 as DB engine
22:32:58 T:3528  NOTICE: Metacontainers - Loading sqlite3 as DB engine
22:32:58 T:3528  NOTICE: Loading sqlite3 as DB engine
22:32:58 T:3528  NOTICE: Loading sqlite3 as DB engine
22:32:58 T:3528  NOTICE: Table movie_meta initialized
22:32:58 T:3528  NOTICE: Table tvshow_meta initialized
22:32:58 T:3528  NOTICE: Table season_meta initialized
22:32:58 T:3528  NOTICE: Table episode_meta initialized
22:32:58 T:3528  NOTICE: Table addons initialized
22:32:58 T:3528  NOTICE: 1Ch**nel: Building 1Ch**nel Database
22:32:58 T:3528  NOTICE: 1Ch**nel: {'mode': 'UpdateSubscriptions'}
22:32:58 T:3528  NOTICE: 1Ch**nel: Creating .strm for tvshow http://www.1Ch**nel.ch/watch-4292-CSI-Crime-Scene-Investigation CSI: Crime Scene Investigation  http://images.1Ch**nel.ch/thumbs/4292_CSI_Crime_Scene_Investigation_2000.jpg 2000
22:32:59 T:3528  NOTICE: 1Ch**nel: Creating .strm for tvshow http://www.1Ch**nel.ch/watch-4291-CSI-Miami CSI: Miami  http://images.1Ch**nel.ch/thumbs/4291_CSI_Miami_2002.jpg 2002
22:32:59 T:3528  NOTICE: 1Ch**nel: Creating .strm for tvshow http://www.1Ch**nel.ch/watch-4290-CSI-NY-New-York CSI: NY / New York  http://images.1Ch**nel.ch/thumbs/4290_CSI_NY_New_York_2004.jpg 2004
22:32:59 T:3528  NOTICE: 1Ch**nel: Creating .strm for tvshow http://www.1Ch**nel.ch/watch-9837-Criminal-Minds Criminal Minds  http://images.1Ch**nel.ch/thumbs/9837_Criminal_Minds_2008.jpg 2005
22:33:02 T:880  NOTICE: -->Python Interpreter Initialized<--
22:33:02 T:880  NOTICE: Metahandlers - Loading sqlite3 as DB engine
22:33:02 T:880  NOTICE: Metacontainers - Loading sqlite3 as DB engine
22:33:02 T:880  NOTICE: Loading sqlite3 as DB engine
22:33:02 T:880  NOTICE: Loading sqlite3 as DB engine
22:33:02 T:880  NOTICE: Table movie_meta initialized
22:33:02 T:880  NOTICE: Table tvshow_meta initialized
22:33:02 T:880  NOTICE: Table season_meta initialized
22:33:02 T:880  NOTICE: Table episode_meta initialized
22:33:02 T:880  NOTICE: Table addons initialized
22:33:02 T:880  NOTICE: 1Ch**nel: Building 1Ch**nel Database
22:33:02 T:880  NOTICE: 1Ch**nel: {'mode': 'main'}
22:33:02 T:880  NOTICE: 1Ch**nel menu
22:33:02 T:2388  NOTICE: -->Python Interpreter Initialized<--
22:33:02 T:2388  NOTICE: Metahandlers - Loading sqlite3 as DB engine
22:33:02 T:2388  NOTICE: Metacontainers - Loading sqlite3 as DB engine
22:33:02 T:2388  NOTICE: Loading sqlite3 as DB engine
22:33:02 T:2388  NOTICE: Loading sqlite3 as DB engine
22:33:02 T:2388  NOTICE: Table movie_meta initialized
22:33:02 T:2388  NOTICE: Table tvshow_meta initialized
22:33:02 T:2388  NOTICE: Table season_meta initialized
22:33:02 T:2388  NOTICE: Table episode_meta initialized
22:33:02 T:2388  NOTICE: Table addons initialized
22:33:02 T:2388  NOTICE: 1Ch**nel: Building 1Ch**nel Database
22:33:02 T:2388  NOTICE: 1Ch**nel: {'mode': 'main'}
22:33:02 T:2388  NOTICE: 1Ch**nel menu
22:33:04 T:2808  NOTICE: -->Python Interpreter Initialized<--
22:33:04 T:2808  NOTICE: Metahandlers - Loading sqlite3 as DB engine
22:33:04 T:2808  NOTICE: Metacontainers - Loading sqlite3 as DB engine
22:33:04 T:2808  NOTICE: Loading sqlite3 as DB engine
22:33:04 T:2808  NOTICE: Loading sqlite3 as DB engine
22:33:04 T:2808  NOTICE: Table movie_meta initialized
22:33:04 T:2808  NOTICE: Table tvshow_meta initialized
22:33:04 T:2808  NOTICE: Table season_meta initialized
22:33:04 T:2808  NOTICE: Table episode_meta initialized
22:33:04 T:2808  NOTICE: Table addons initialized
22:33:04 T:2808  NOTICE: 1Ch**nel: Building 1Ch**nel Database
22:33:04 T:2808  NOTICE: 1Ch**nel: {'mode': 'BrowseListMenu'}
22:33:04 T:2808  NOTICE: Browse Options
22:33:06 T:1924  NOTICE: -->Python Interpreter Initialized<--
22:33:07 T:1924  NOTICE: Metahandlers - Loading sqlite3 as DB engine
22:33:07 T:1924  NOTICE: Metacontainers - Loading sqlite3 as DB engine
22:33:07 T:1924  NOTICE: Loading sqlite3 as DB engine
22:33:07 T:1924  NOTICE: Loading sqlite3 as DB engine
22:33:07 T:1924  NOTICE: Table movie_meta initialized
22:33:07 T:1924  NOTICE: Table tvshow_meta initialized
22:33:07 T:1924  NOTICE: Table season_meta initialized
22:33:07 T:1924  NOTICE: Table episode_meta initialized
22:33:07 T:1924  NOTICE: Table addons initialized
 

Eldorado

Moderator
Staff member
May 7, 2012
990
0
16
Also, since I've wrapped my head around metahandlers code again.. can you refresh me on the issues you were finding in 1Ch**nel?

I think it was all based around TV Shows, I believe I nailed the one problem where the episodes were not coming back as int, have added Year to please the Media Info view

Still have to take care of the title to return the one from TVDB/IMDB.. and I think there was something else needed at the episode level for subtitles to work?
 

Bstrdsmkr

New member
Mar 16, 2012
763
0
0
It's init'd once per "trip" through the plugin. I just made the init part of the startup sequence instead of init'ing inside certain functions. The only ones the don't use it are like the first 3 menu's lol

Episodes need to return TVShowTitle for subtitles to set correctly. The other trouble I was having was changing the metadata for TV shows. It seems to work fine for movies, but shows were giving me trouble. Here's the code I'm using:
Code:
def RefreshMetadata(video_type, old_title, imdb, alt_id, year, new_title=''):
	metaget=metahandlers.MetaData()
	if new_title: search_title = new_title
	else: search_title = old_title
	try:
		search_meta = metaget.search_movies(search_title)
		movie_list = ['Manual Search...']
		for movie in search_meta:
			if movie['year']: disptitle = '%s (%s)' %(movie['title'],movie['year'])
			else: disptitle = movie['title']
			movie_list.append(disptitle)
		dialog = xbmcgui.Dialog()
		index = dialog.select('Choose', movie_list)

		if index == 0:
			RefreshMetadata_manual(video_type, old_title, imdb, alt_id, year)
		if index > -1:
			new_imdb_id = search_meta[index-1]['imdb_id']
			if video_type =='tvshow':
				new_tmdb_id = search_meta[index-1]['tmdb_id']

				#Temporary work around for problem in metahandlers:
				#'Error attempting to delete from cache table: no such column: year'
				year = ''

			else: new_tmdb_id = ''
			addon.log(search_meta[index-1])
			meta = metaget.update_meta(video_type, old_title, imdb_id=imdb, tmdb_id=alt_id, new_imdb_id=new_imdb_id, new_tmdb_id=new_tmdb_id, year=year)
			xbmc.executebuiltin('Container.Refresh')
	except: RefreshMetadata_manual(video_type, old_title, imdb, alt_id, year)

def RefreshMetadata_manual(video_type, old_title, imdb, alt_id, year):
	keyboard = xbmc.Keyboard()
	if year: disptitle = '%s (%s)' %(old_title,year)
	keyboard.setHeading('Enter a title')
	keyboard.setDefault(disptitle)
	keyboard.doModal()
	if (keyboard.isConfirmed()):
		search_string = keyboard.getText()
		RefreshMetadata(video_type, old_title, imdb, alt_id, year, search_string)
 
Thread starter Similar threads Forum Replies Date
S Amazon Fire TV 0
W Video Addons 5
E Addon Development 52