Add the ability to list untagged files in core.
This commit is contained in:
parent
eb17561d77
commit
26922edd12
@ -503,6 +503,17 @@ public class ORM {
|
||||
return sql.rows(query, sqlParams).collect {
|
||||
recordToModel(MediaFile, it) } }
|
||||
|
||||
public List<MediaFile> getUntaggedFiles() {
|
||||
String query = """
|
||||
SELECT mf.*
|
||||
FROM media_files mf LEFT JOIN
|
||||
media_files_tags mft ON
|
||||
mf.id = mft.media_file_id
|
||||
WHERE mft.media_file_id IS NULL"""
|
||||
|
||||
logger.debug('Finding untagged media files.\n\tSQL: {}', query)
|
||||
return sql.rows(query).collect { recordToModel(MediaFile, it) } }
|
||||
|
||||
public def associateMediaFileWithAlbum(int mediaFileId, int albumId) {
|
||||
return associate(Album, MediaFile, albumId, mediaFileId) }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user