Created
August 18, 2015 13:38
-
-
Save mperlet/000001d5a571a5aa8045 to your computer and use it in GitHub Desktop.
Problem: minidlna use the title from the metadata, sometimes its better when the title = the filename. This script change the title from "'HERE THE NONE UNIQUE TITLE'" to the filename.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for line in $(sqlite3 /root/minidlna/files.db "SELECT ID,PATH FROM DETAILS WHERE TITLE='HERE THE NONE UNIQUE TITLE';"); | |
do | |
id=$(echo $line | cut -d"|" -f1); | |
path=$(echo $line | cut -d"|" -f2); | |
echo $id; | |
echo $path; | |
sqlite3 /root/minidlna/files.db "UPDATE DETAILS SET TITLE='$(basename $path)' WHERE ID=$id;"; | |
done; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment