Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ALTER VIEW `MyVideos76`.`files` AS
- SELECT idFile, idPath, strFilename, playCount0 AS playCount, lastPlayed0 AS lastPlayed, dateAdded FROM `MyVideos76`.`globalfiles`;
- ALTER VIEW `User1Videos76`.`files` AS
- SELECT idFile, idPath, strFilename, playCount1 AS playCount, lastPlayed1 AS lastPlayed, dateAdded FROM `MyVideos76`.`globalfiles`;
- ALTER VIEW `User1Videos76`.`actorlinkepisode` AS
- SELECT * FROM `MyVideos76`.`actorlinkepisode`;
- ALTER VIEW `User1Videos76`.`actorlinkmovie` AS
- SELECT * FROM `MyVideos76`.`actorlinkmovie`;
- ALTER VIEW `User1Videos76`.`actorlinktvshow` AS
- SELECT * FROM `MyVideos76`.`actorlinktvshow`;
- ALTER VIEW `User1Videos76`.`actors` AS
- SELECT * FROM `MyVideos76`.`actors`;
- ALTER VIEW `User1Videos76`.`art` AS
- SELECT * FROM `MyVideos76`.`art`;
- ALTER VIEW `User1Videos76`.`artistlinkmusicvideo` AS
- SELECT * FROM `MyVideos76`.`artistlinkmusicvideo`;
- ALTER VIEW `User1Videos76`.`country` AS
- SELECT * FROM `MyVideos76`.`country`;
- ALTER VIEW `User1Videos76`.`countrylinkmovie` AS
- SELECT * FROM `MyVideos76`.`countrylinkmovie`;
- ALTER VIEW `User1Videos76`.`directorlinkepisode` AS
- SELECT * FROM `MyVideos76`.`directorlinkepisode`;
- ALTER VIEW `User1Videos76`.`directorlinkmovie` AS
- SELECT * FROM `MyVideos76`.`directorlinkmovie`;
- ALTER VIEW `User1Videos76`.`directorlinkmusicvideo` AS
- SELECT * FROM `MyVideos76`.`directorlinkmusicvideo`;
- ALTER VIEW `User1Videos76`.`directorlinktvshow` AS
- SELECT * FROM `MyVideos76`.`directorlinktvshow`;
- ALTER VIEW `User1Videos76`.`episode` AS
- SELECT * FROM `MyVideos76`.`episode`;
- ALTER VIEW `User1Videos76`.`genre` AS
- SELECT * FROM `MyVideos76`.`genre`;
- ALTER VIEW `User1Videos76`.`genrelinkmovie` AS
- SELECT * FROM `MyVideos76`.`genrelinkmovie`;
- ALTER VIEW `User1Videos76`.`genrelinkmusicvideo` AS
- SELECT * FROM `MyVideos76`.`genrelinkmusicvideo`;
- ALTER VIEW `User1Videos76`.`genrelinktvshow` AS
- SELECT * FROM `MyVideos76`.`genrelinktvshow`;
- ALTER VIEW `User1Videos76`.`movie` AS
- SELECT * FROM `MyVideos76`.`movie`;
- ALTER VIEW `User1Videos76`.`movielinktvshow` AS
- SELECT * FROM `MyVideos76`.`movielinktvshow`;
- ALTER VIEW `User1Videos76`.`musicvideo` AS
- SELECT * FROM `MyVideos76`.`musicvideo`;
- ALTER VIEW `User1Videos76`.`path` AS
- SELECT * FROM `MyVideos76`.`path`;
- ALTER VIEW `User1Videos76`.`seasons` AS
- SELECT * FROM `MyVideos76`.`seasons`;
- ALTER VIEW `User1Videos76`.`sets` AS
- SELECT * FROM `MyVideos76`.`sets`;
- ALTER VIEW `User1Videos76`.`settings` AS
- SELECT * FROM `MyVideos76`.`settings`;
- ALTER VIEW `User1Videos76`.`stacktimes` AS
- SELECT * FROM `MyVideos76`.`stacktimes`;
- ALTER VIEW `User1Videos76`.`streamdetails` AS
- SELECT * FROM `MyVideos76`.`streamdetails`;
- ALTER VIEW `User1Videos76`.`studio` AS
- SELECT * FROM `MyVideos76`.`studio`;
- ALTER VIEW `User1Videos76`.`studiolinkmovie` AS
- SELECT * FROM `MyVideos76`.`studiolinkmovie`;
- ALTER VIEW `User1Videos76`.`studiolinkmusicvideo` AS
- SELECT * FROM `MyVideos76`.`studiolinkmusicvideo`;
- ALTER VIEW `User1Videos76`.`studiolinktvshow` AS
- SELECT * FROM `MyVideos76`.`studiolinktvshow`;
- ALTER VIEW `User1Videos76`.`tag` AS
- SELECT * FROM `MyVideos76`.`tag`;
- ALTER VIEW `User1Videos76`.`taglinks` AS
- SELECT * FROM `MyVideos76`.`taglinks`;
- ALTER VIEW `User1Videos76`.`tvshow` AS
- SELECT * FROM `MyVideos76`.`tvshow`;
- ALTER VIEW `User1Videos76`.`tvshowlinkpath` AS
- SELECT * FROM `MyVideos76`.`tvshowlinkpath`;
- ALTER VIEW `User1Videos76`.`version` AS
- SELECT * FROM `MyVideos76`.`version`;
- ALTER VIEW `User1Videos76`.`writerlinkepisode` AS
- SELECT * FROM `MyVideos76`.`writerlinkepisode`;
- ALTER VIEW `User1Videos76`.`writerlinkmovie` AS
- SELECT * FROM `MyVideos76`.`writerlinkmovie`;
- ALTER VIEW `User1Videos76`.`movieview` AS select
- `User1Videos76`.`movie`.`idMovie` AS `idMovie`,
- `User1Videos76`.`movie`.`idFile` AS `idFile`,
- `User1Videos76`.`movie`.`c00` AS `c00`,
- `User1Videos76`.`movie`.`c01` AS `c01`,
- `User1Videos76`.`movie`.`c02` AS `c02`,
- `User1Videos76`.`movie`.`c03` AS `c03`,
- `User1Videos76`.`movie`.`c04` AS `c04`,
- `User1Videos76`.`movie`.`c05` AS `c05`,
- `User1Videos76`.`movie`.`c06` AS `c06`,
- `User1Videos76`.`movie`.`c07` AS `c07`,
- `User1Videos76`.`movie`.`c08` AS `c08`,
- `User1Videos76`.`movie`.`c09` AS `c09`,
- `User1Videos76`.`movie`.`c10` AS `c10`,
- `User1Videos76`.`movie`.`c11` AS `c11`,
- `User1Videos76`.`movie`.`c12` AS `c12`,
- `User1Videos76`.`movie`.`c13` AS `c13`,
- `User1Videos76`.`movie`.`c14` AS `c14`,
- `User1Videos76`.`movie`.`c15` AS `c15`,
- `User1Videos76`.`movie`.`c16` AS `c16`,
- `User1Videos76`.`movie`.`c17` AS `c17`,
- `User1Videos76`.`movie`.`c18` AS `c18`,
- `User1Videos76`.`movie`.`c19` AS `c19`,
- `User1Videos76`.`movie`.`c20` AS `c20`,
- `User1Videos76`.`movie`.`c21` AS `c21`,
- `User1Videos76`.`movie`.`c22` AS `c22`,
- `User1Videos76`.`movie`.`c23` AS `c23`,
- `User1Videos76`.`movie`.`idSet` AS `idSet`,
- `User1Videos76`.`sets`.`strSet` AS `strSet`,
- `User1Videos76`.`files`.`strFilename` AS `strFileName`,
- `User1Videos76`.`path`.`strPath` AS `strPath`,
- `User1Videos76`.`files`.`playCount` AS `playCount`,
- `User1Videos76`.`files`.`lastPlayed` AS `lastPlayed`,
- `User1Videos76`.`files`.`dateAdded` AS `dateAdded`,
- `User1Videos76`.`bookmark`.`timeInSeconds` AS `resumeTimeInSeconds`,
- `User1Videos76`.`bookmark`.`totalTimeInSeconds` AS `totalTimeInSeconds`
- from ((`User1Videos76`.`movie` left join `User1Videos76`.`sets` on((`User1Videos76`.`sets`.`idSet` = `User1Videos76`.`movie`.`idSet`)) join `User1Videos76`.`files` on((`User1Videos76`.`files`.`idFile` = `User1Videos76`.`movie`.`idFile`))) join `User1Videos76`.`path` on((`User1Videos76`.`path`.`idPath` = `User1Videos76`.`files`.`idPath`))left join `User1Videos76`.`bookmark` on((`User1Videos76`.`bookmark`.`idFile` = `User1Videos76`.`movie`.`idFile` AND `User1Videos76`.`bookmark`.`type` = 1)));
- ALTER VIEW `User1Videos76`.`musicvideoview` AS select
- `User1Videos76`.`musicvideo`.`idMVideo` AS `idMVideo`,
- `User1Videos76`.`musicvideo`.`idFile` AS `idFile`,
- `User1Videos76`.`musicvideo`.`c00` AS `c00`,
- `User1Videos76`.`musicvideo`.`c01` AS `c01`,
- `User1Videos76`.`musicvideo`.`c02` AS `c02`,
- `User1Videos76`.`musicvideo`.`c03` AS `c03`,
- `User1Videos76`.`musicvideo`.`c04` AS `c04`,
- `User1Videos76`.`musicvideo`.`c05` AS `c05`,
- `User1Videos76`.`musicvideo`.`c06` AS `c06`,
- `User1Videos76`.`musicvideo`.`c07` AS `c07`,
- `User1Videos76`.`musicvideo`.`c08` AS `c08`,
- `User1Videos76`.`musicvideo`.`c09` AS `c09`,
- `User1Videos76`.`musicvideo`.`c10` AS `c10`,
- `User1Videos76`.`musicvideo`.`c11` AS `c11`,
- `User1Videos76`.`musicvideo`.`c12` AS `c12`,
- `User1Videos76`.`musicvideo`.`c13` AS `c13`,
- `User1Videos76`.`musicvideo`.`c14` AS `c14`,
- `User1Videos76`.`musicvideo`.`c15` AS `c15`,
- `User1Videos76`.`musicvideo`.`c16` AS `c16`,
- `User1Videos76`.`musicvideo`.`c17` AS `c17`,
- `User1Videos76`.`musicvideo`.`c18` AS `c18`,
- `User1Videos76`.`musicvideo`.`c19` AS `c19`,
- `User1Videos76`.`musicvideo`.`c20` AS `c20`,
- `User1Videos76`.`musicvideo`.`c21` AS `c21`,
- `User1Videos76`.`musicvideo`.`c22` AS `c22`,
- `User1Videos76`.`musicvideo`.`c23` AS `c23`,
- `User1Videos76`.`files`.`strFilename` AS `strFileName`,
- `User1Videos76`.`path`.`strPath` AS `strPath`,
- `User1Videos76`.`files`.`playCount` AS `playCount`,
- `User1Videos76`.`files`.`lastPlayed` AS `lastPlayed`,
- `User1Videos76`.`files`.`dateAdded` AS `dateAdded`,
- `User1Videos76`.`bookmark`.`timeInSeconds` AS `resumeTimeInSeconds`,
- `User1Videos76`.`bookmark`.`totalTimeInSeconds` AS `totalTimeInSeconds`
- from ((`User1Videos76`.`musicvideo` join `User1Videos76`.`files` on((`User1Videos76`.`files`.`idFile` = `User1Videos76`.`musicvideo`.`idFile`))) join `User1Videos76`.`path` on((`User1Videos76`.`path`.`idPath` = `User1Videos76`.`files`.`idPath`))left join `User1Videos76`.`bookmark` on((`User1Videos76`.`bookmark`.`idFile` = `User1Videos76`.`musicvideo`.`idFile` AND `User1Videos76`.`bookmark`.`type` = 1)));
- /* fine to here debug rest episodeview/tvshowview */
- ALTER VIEW `User1Videos76`.`episodeview` AS select
- `User1Videos76`.`episode`.`idEpisode` AS `idEpisode`,
- `User1Videos76`.`episode`.`idFile` AS `idFile`,
- `User1Videos76`.`episode`.`c00` AS `c00`,
- `User1Videos76`.`episode`.`c01` AS `c01`,
- `User1Videos76`.`episode`.`c02` AS `c02`,
- `User1Videos76`.`episode`.`c03` AS `c03`,
- `User1Videos76`.`episode`.`c04` AS `c04`,
- `User1Videos76`.`episode`.`c05` AS `c05`,
- `User1Videos76`.`episode`.`c06` AS `c06`,
- `User1Videos76`.`episode`.`c07` AS `c07`,
- `User1Videos76`.`episode`.`c08` AS `c08`,
- `User1Videos76`.`episode`.`c09` AS `c09`,
- `User1Videos76`.`episode`.`c10` AS `c10`,
- `User1Videos76`.`episode`.`c11` AS `c11`,
- `User1Videos76`.`episode`.`c12` AS `c12`,
- `User1Videos76`.`episode`.`c13` AS `c13`,
- `User1Videos76`.`episode`.`c14` AS `c14`,
- `User1Videos76`.`episode`.`c15` AS `c15`,
- `User1Videos76`.`episode`.`c16` AS `c16`,
- `User1Videos76`.`episode`.`c17` AS `c17`,
- `User1Videos76`.`episode`.`c18` AS `c18`,
- `User1Videos76`.`episode`.`c19` AS `c19`,
- `User1Videos76`.`episode`.`c20` AS `c20`,
- `User1Videos76`.`episode`.`c21` AS `c21`,
- `User1Videos76`.`episode`.`c22` AS `c22`,
- `User1Videos76`.`episode`.`c23` AS `c23`,
- `User1Videos76`.`episode`.`idShow` AS `idShow`,
- `User1Videos76`.`files`.`strFilename` AS `strFileName`,
- `User1Videos76`.`path`.`strPath` AS `strPath`,
- `User1Videos76`.`files`.`playCount` AS `playCount`,
- `User1Videos76`.`files`.`lastPlayed` AS `lastPlayed`,
- `User1Videos76`.`files`.`dateAdded` AS `dateAdded`,
- `User1Videos76`.`tvshow`.`c00` AS `strTitle`,
- `User1Videos76`.`tvshow`.`c14` AS `strStudio`,
- `User1Videos76`.`tvshow`.`c05` AS `premiered`,
- `User1Videos76`.`tvshow`.`c13` AS `mpaa`,
- `User1Videos76`.`tvshow`.`c16` AS `strShowPath`,
- `User1Videos76`.`bookmark`.`timeInSeconds` AS `resumeTimeInSeconds`,
- `User1Videos76`.`bookmark`.`totalTimeInSeconds` AS `totalTimeInSeconds`,
- `User1Videos76`.`seasons`.`idSeason` AS `idSeason`
- from ((`User1Videos76`.`episode` join `User1Videos76`.`files` on((`User1Videos76`.`files`.`idFile` = `User1Videos76`.`episode`.`idFile`))) join `User1Videos76`.`tvshow` on((`User1Videos76`.`tvshow`.`idShow` = `User1Videos76`.`episode`.`idShow`)) left join `User1Videos76`.`seasons` on((`User1Videos76`.`seasons`.`idShow` = `User1Videos76`.`episode`.`idShow` AND `User1Videos76`.`seasons`.`season` = `User1Videos76`.`episode`.`c12`)) join `User1Videos76`.`path` on((`User1Videos76`.`files`.`idPath` = `User1Videos76`.`path`.`idPath`))left join `User1Videos76`.`bookmark` on((`User1Videos76`.`bookmark`.`idFile` = `User1Videos76`.`episode`.`idFile` AND `User1Videos76`.`bookmark`.`type` = 1)) );
- ALTER VIEW `User1Videos76`.`tvshowview` AS select
- `User1Videos76`.`tvshow`.`idShow` AS `idShow`,
- `User1Videos76`.`tvshow`.`c00` AS `c00`,
- `User1Videos76`.`tvshow`.`c01` AS `c01`,
- `User1Videos76`.`tvshow`.`c02` AS `c02`,
- `User1Videos76`.`tvshow`.`c03` AS `c03`,
- `User1Videos76`.`tvshow`.`c04` AS `c04`,
- `User1Videos76`.`tvshow`.`c05` AS `c05`,
- `User1Videos76`.`tvshow`.`c06` AS `c06`,
- `User1Videos76`.`tvshow`.`c07` AS `c07`,
- `User1Videos76`.`tvshow`.`c08` AS `c08`,
- `User1Videos76`.`tvshow`.`c09` AS `c09`,
- `User1Videos76`.`tvshow`.`c10` AS `c10`,
- `User1Videos76`.`tvshow`.`c11` AS `c11`,
- `User1Videos76`.`tvshow`.`c12` AS `c12`,
- `User1Videos76`.`tvshow`.`c13` AS `c13`,
- `User1Videos76`.`tvshow`.`c14` AS `c14`,
- `User1Videos76`.`tvshow`.`c15` AS `c15`,
- `User1Videos76`.`tvshow`.`c16` AS `c16`,
- `User1Videos76`.`tvshow`.`c17` AS `c17`,
- `User1Videos76`.`tvshow`.`c18` AS `c18`,
- `User1Videos76`.`tvshow`.`c19` AS `c19`,
- `User1Videos76`.`tvshow`.`c20` AS `c20`,
- `User1Videos76`.`tvshow`.`c21` AS `c21`,
- `User1Videos76`.`tvshow`.`c22` AS `c22`,
- `User1Videos76`.`tvshow`.`c23` AS `c23`,
- `User1Videos76`.`path`.`strPath` AS `strPath`,
- `User1Videos76`.`path`.`dateAdded` AS `dateAdded`,
- MAX(`User1Videos76`.`files`.`lastPlayed`) AS `lastPlayed`,
- nullif(count(`User1Videos76`.`episode`.`c12`),0) AS `totalCount`,
- count(`User1Videos76`.`files`.`playCount`) AS `watchedcount`,
- nullif(count(distinct `User1Videos76`.`episode`.`c12`),0) AS `totalSeasons`
- from (((`User1Videos76`.`tvshow` left join `User1Videos76`.`tvshowlinkpath` on((`User1Videos76`.`tvshowlinkpath`.`idShow` = `User1Videos76`.`tvshow`.`idShow`))) left join `User1Videos76`.`path` on((`User1Videos76`.`path`.`idPath` = `User1Videos76`.`tvshowlinkpath`.`idPath`))) left join `User1Videos76`.`episode` on((`User1Videos76`.`episode`.`idShow` = `User1Videos76`.`tvshow`.`idShow`)) left join `User1Videos76`.`files` on((`User1Videos76`.`files`.`idFile` = `User1Videos76`.`episode`.`idFile`))) group by `User1Videos76`.`tvshow`.`idShow`;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement