Revert "Fix missing playurl/pathid references"

This reverts commit 601b36e9b3.
This commit is contained in:
angelblue05 2016-04-26 03:51:24 -05:00
parent 601b36e9b3
commit 3dbdab79a9

View file

@ -406,12 +406,12 @@ class Movies(Items):
"UPDATE movie", "UPDATE movie",
"SET c00 = ?, c01 = ?, c02 = ?, c03 = ?, c04 = ?, c05 = ?, c06 = ?,", "SET c00 = ?, c01 = ?, c02 = ?, c03 = ?, c04 = ?, c05 = ?, c06 = ?,",
"c07 = ?, c09 = ?, c10 = ?, c11 = ?, c12 = ?, c14 = ?, c15 = ?,", "c07 = ?, c09 = ?, c10 = ?, c11 = ?, c12 = ?, c14 = ?, c15 = ?,",
"c16 = ?, c18 = ?, c19 = ?, c21 = ?, c22 = ?, c23 = ?", "c16 = ?, c18 = ?, c19 = ?, c21 = ?",
"WHERE idMovie = ?" "WHERE idMovie = ?"
)) ))
kodicursor.execute(query, (title, plot, shortplot, tagline, votecount, rating, writer, kodicursor.execute(query, (title, plot, shortplot, tagline, votecount, rating, writer,
year, imdb, sorttitle, runtime, mpaa, genre, director, title, studio, trailer, year, imdb, sorttitle, runtime, mpaa, genre, director, title, studio, trailer,
country, playurl, pathid, movieid)) country, movieid))
# Update the checksum in emby table # Update the checksum in emby table
emby_db.updateReference(itemid, checksum) emby_db.updateReference(itemid, checksum)
@ -430,14 +430,14 @@ class Movies(Items):
''' '''
INSERT INTO movie( INSERT INTO movie(
idMovie, idFile, c00, c01, c02, c03, c04, c05, c06, c07, idMovie, idFile, c00, c01, c02, c03, c04, c05, c06, c07,
c09, c10, c11, c12, c14, c15, c16, c18, c19, c21, c22, c23) c09, c10, c11, c12, c14, c15, c16, c18, c19, c21)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
''' '''
) )
kodicursor.execute(query, (movieid, fileid, title, plot, shortplot, tagline, votecount, kodicursor.execute(query, (movieid, fileid, title, plot, shortplot, tagline, votecount,
rating, writer, year, imdb, sorttitle, runtime, mpaa, genre, director, title, rating, writer, year, imdb, sorttitle, runtime, mpaa, genre, director, title,
studio, trailer, country, playurl, pathid)) studio, trailer, country))
# Create the reference in emby table # Create the reference in emby table
emby_db.addReference(itemid, movieid, "Movie", "movie", fileid, pathid, None, checksum, viewid) emby_db.addReference(itemid, movieid, "Movie", "movie", fileid, pathid, None, checksum, viewid)
@ -1377,24 +1377,23 @@ class TVShows(Items):
"UPDATE episode", "UPDATE episode",
"SET c00 = ?, c01 = ?, c03 = ?, c04 = ?, c05 = ?, c09 = ?, c10 = ?,", "SET c00 = ?, c01 = ?, c03 = ?, c04 = ?, c05 = ?, c09 = ?, c10 = ?,",
"c12 = ?, c13 = ?, c14 = ?, c15 = ?, c16 = ?, c18 = ?, c19 = ?,", "c12 = ?, c13 = ?, c14 = ?, c15 = ?, c16 = ?, idSeason = ?",
"idSeason = ?",
"WHERE idEpisode = ?" "WHERE idEpisode = ?"
)) ))
kodicursor.execute(query, (title, plot, rating, writer, premieredate, kodicursor.execute(query, (title, plot, rating, writer, premieredate,
runtime, director, season, episode, title, airsBeforeSeason, runtime, director, season, episode, title, airsBeforeSeason,
airsBeforeEpisode, playurl, pathid, seasonid, episodeid)) airsBeforeEpisode, seasonid, episodeid))
else: else:
query = ' '.join(( query = ' '.join((
"UPDATE episode", "UPDATE episode",
"SET c00 = ?, c01 = ?, c03 = ?, c04 = ?, c05 = ?, c09 = ?, c10 = ?,", "SET c00 = ?, c01 = ?, c03 = ?, c04 = ?, c05 = ?, c09 = ?, c10 = ?,",
"c12 = ?, c13 = ?, c14 = ?, c15 = ?, c16 = ?, c18 = ?, c19 = ?", "c12 = ?, c13 = ?, c14 = ?, c15 = ?, c16 = ?",
"WHERE idEpisode = ?" "WHERE idEpisode = ?"
)) ))
kodicursor.execute(query, (title, plot, rating, writer, premieredate, kodicursor.execute(query, (title, plot, rating, writer, premieredate,
runtime, director, season, episode, title, airsBeforeSeason, runtime, director, season, episode, title, airsBeforeSeason,
airsBeforeEpisode, playurl, pathid, episodeid)) airsBeforeEpisode, episodeid))
# Update the checksum in emby table # Update the checksum in emby table
emby_db.updateReference(itemid, checksum) emby_db.updateReference(itemid, checksum)
@ -1417,27 +1416,27 @@ class TVShows(Items):
''' '''
INSERT INTO episode( INSERT INTO episode(
idEpisode, idFile, c00, c01, c03, c04, c05, c09, c10, c12, c13, c14, idEpisode, idFile, c00, c01, c03, c04, c05, c09, c10, c12, c13, c14,
idShow, c15, c16, c18, c19, idSeason) idShow, c15, c16, idSeason)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
''' '''
) )
kodicursor.execute(query, (episodeid, fileid, title, plot, rating, writer, kodicursor.execute(query, (episodeid, fileid, title, plot, rating, writer,
premieredate, runtime, director, season, episode, title, showid, premieredate, runtime, director, season, episode, title, showid,
airsBeforeSeason, airsBeforeEpisode, playurl, pathid, seasonid)) airsBeforeSeason, airsBeforeEpisode, seasonid))
else: else:
query = ( query = (
''' '''
INSERT INTO episode( INSERT INTO episode(
idEpisode, idFile, c00, c01, c03, c04, c05, c09, c10, c12, c13, c14, idEpisode, idFile, c00, c01, c03, c04, c05, c09, c10, c12, c13, c14,
idShow, c15, c16, c18, c19) idShow, c15, c16)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
''' '''
) )
kodicursor.execute(query, (episodeid, fileid, title, plot, rating, writer, kodicursor.execute(query, (episodeid, fileid, title, plot, rating, writer,
premieredate, runtime, director, season, episode, title, showid, premieredate, runtime, director, season, episode, title, showid,
airsBeforeSeason, airsBeforeEpisode, playurl, pathid)) airsBeforeSeason, airsBeforeEpisode))
# Create the reference in emby table # Create the reference in emby table
emby_db.addReference(itemid, episodeid, "Episode", "episode", fileid, pathid, emby_db.addReference(itemid, episodeid, "Episode", "episode", fileid, pathid,