Kodi Community Forum

Full Version: Can Media List Editor do this?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Can Media List Editor create these views?
  • Show movies with more than one audio track (eg: audiotrack count > 1)
  • Show movies with audio track with specific language (eg: eng or en or english or commentary)
  • Show movies with specific text in the media filename or path (helpful to identify specific editions/versions)
  • Show movies with specific artwork (eg: has clearart, has clearlogo)
(2021-06-25, 18:31)badbob001 Wrote: [ -> ]Show movies with more than one audio track (eg: audiotrack count > 1)
SELECT DISTINCT
  movielist.*
FROM
  movielist
  LEFT OUTER JOIN MoviesAStreams ON (movielist.idMovie = MoviesAStreams.MovieID)
GROUP BY
  movielist.idMovie
HAVING
  COUNT(MoviesAStreams.MovieID) > 1
(2021-06-25, 18:31)badbob001 Wrote: [ -> ]Show movies with audio track with specific language (eg: eng or en or english or commentary)
SELECT DISTINCT
  movielist.*
FROM
  movielist
  LEFT OUTER JOIN MoviesAStreams ON (movielist.idMovie = MoviesAStreams.MovieID)
WHERE
  MoviesAStreams.Audio_Language = 'eng' OR
  MoviesAStreams.Audio_Language = 'en' OR
  MoviesAStreams.Audio_Language = 'english' OR
  MoviesAStreams.Audio_Language = 'commentary'
(2021-06-25, 18:31)badbob001 Wrote: [ -> ]Show movies with specific text in the media filename or path (helpful to identify specific editions/versions)
Next release will support searching in path in the search bar, but here is a query:
SELECT DISTINCT
  movielist.*
FROM
  movielist
WHERE
  movielist.MoviePath LIKE '%avatar%'
(2021-06-25, 18:31)badbob001 Wrote: [ -> ]Show movies with specific artwork (eg: has clearart, has clearlogo)
You can use the column to sort by clearart and all other image types or use this query (possible image types are BannerPath, ClearArtPath, ClearLogoPath, DiscArtPath, FanartPath, KeyartPath, LandscapePath, PosterPath):
SELECT DISTINCT
  movielist.*
FROM
  movielist
WHERE
  movielist.KeyartPath IS NOT NULL
This is perfect. Thanks!
If I want to identify movies with no english track, the following doesn't seem to work. Guess my sql skill is bad. And do I need to worry about case sensitivity (eg: eng vs Eng vs ENG)?

SELECT DISTINCT
  movielist.*
FROM
  movielist
  INNER JOIN MoviesAStreams ON (movielist.idMovie = MoviesAStreams.MovieID)
WHERE
  MoviesAStreams.Audio_Language != 'eng' AND
  MoviesAStreams.Audio_Language != 'en' AND
  MoviesAStreams.Audio_Language != 'english'

And when pressing ENTER in the media list editor will just close the window with current work lost. How do you enter a new line into the query? Seems safer to type in an external text editor before pasting into EMM.
(2021-06-25, 20:14)badbob001 Wrote: [ -> ]And do I need to worry about case sensitivity (eg: eng vs Eng vs ENG)?
To disable CS you can use LIKE instead of =.
(2021-06-25, 20:14)badbob001 Wrote: [ -> ]And when pressing ENTER in the media list editor will just close the window with current work lost. How do you enter a new line into the query?
As described under the field: CTRL + ENTER
(2021-06-25, 20:14)badbob001 Wrote: [ -> ]If I want to identify movies with no english track, the following doesn't seem to work.
The negation is <> or NOT LIKE. But I think that doesn't work because if you have a movie with a ger and an eng audio stream one stream is  <> eng. But I can't tell you what the query should look like.