2013-01-28, 16:19
Disclaimer: DO NOT TRY THIS WITHOUT TESTING FIRST! I make no guarantees that this will work. I can only say that it *might* mess up your whole system - and that's not my fault!
Ok, I was reading in the Wiki the XBMC v12 (Frodo) FAQ about the new/different thumbnails names. I haven't updated my system since Dharma so there's a fair bit of changes for me. Here's my old setup:
TV/
-The Simpsons
--banner.jpg
--fanart.jpg
--folder.jpg
--logo.png
--season-all.tbn
--season-01.tbn
--The Simpsons.tbn
--Season 1/
---The Simpsons - S01E01 - Simpsons Roasting on an Open Fire.avi
---The Simpsons - S01E01 - Simpsons Roasting on an Open Fire.nfo
---The Simpsons - S01E01 - Simpsons Roasting on an Open Fire.tbn
etc... Frodo wants it to look like this:
TV/
-The Simpsons
--banner.jpg
--fanart.jpg
--poster.jpg
--logo.png
--season-all-poster.jpg
--season-01-poster.jpg
--The Simpsons.tbn <--not needed
--Season 1/
---The Simpsons - S01E01 - Simpsons Roasting on an Open Fire.avi
---The Simpsons - S01E01 - Simpsons Roasting on an Open Fire.nfo
---The Simpsons - S01E01 - Simpsons Roasting on an Open Fire-thumb.jpg
So I got together a few bash commands to do most of the work:
change .tbn to .jpg/png
rename "folder.jpg/png" to "poster.jpg/png"
Rename "season-specials.jpg" to "season-specials-poster.jpg"
Rename "Show - S##E## - name.jpg" to "show - S##E## - name-thumb.jpg
Having trouble with this one as OS X doesn't support -regextype in find and my QNAP doesn't even support -regex in find at all! I'm afraid it's going to take a perl script or something.
Remove "Show Name.jpg" from "Show Name/"
Haven't started on this one yet...
-----
Many of these can be adapted easily for other types of renaming (use png instead of jpg, etc...) and I have executed these listed above against my own TV folders FWIW.
Ok, I was reading in the Wiki the XBMC v12 (Frodo) FAQ about the new/different thumbnails names. I haven't updated my system since Dharma so there's a fair bit of changes for me. Here's my old setup:
TV/
-The Simpsons
--banner.jpg
--fanart.jpg
--folder.jpg
--logo.png
--season-all.tbn
--season-01.tbn
--The Simpsons.tbn
--Season 1/
---The Simpsons - S01E01 - Simpsons Roasting on an Open Fire.avi
---The Simpsons - S01E01 - Simpsons Roasting on an Open Fire.nfo
---The Simpsons - S01E01 - Simpsons Roasting on an Open Fire.tbn
etc... Frodo wants it to look like this:
TV/
-The Simpsons
--banner.jpg
--fanart.jpg
--poster.jpg
--logo.png
--season-all-poster.jpg
--season-01-poster.jpg
--The Simpsons.tbn <--not needed
--Season 1/
---The Simpsons - S01E01 - Simpsons Roasting on an Open Fire.avi
---The Simpsons - S01E01 - Simpsons Roasting on an Open Fire.nfo
---The Simpsons - S01E01 - Simpsons Roasting on an Open Fire-thumb.jpg
So I got together a few bash commands to do most of the work:
change .tbn to .jpg/png
Code:
find . -type f -iname "*.tbn" | while read FNAME; do mv "$FNAME" "${FNAME%.tbn}.jpg"; done
rename "folder.jpg/png" to "poster.jpg/png"
Code:
find . -type f -iname 'folder.*' -print0 | xargs -0 -n1 bash -c 'mv "$0" "${0/folder/poster}"'
Rename "season-specials.jpg" to "season-specials-poster.jpg"
Code:
find . -type f -iname 'season*.jpg' -print0 | xargs -0 -n1 bash -c 'mv "$0" "${0/.jpg/-poster.jpg}"'
Rename "Show - S##E## - name.jpg" to "show - S##E## - name-thumb.jpg
Having trouble with this one as OS X doesn't support -regextype in find and my QNAP doesn't even support -regex in find at all! I'm afraid it's going to take a perl script or something.
Remove "Show Name.jpg" from "Show Name/"
Haven't started on this one yet...
-----
Many of these can be adapted easily for other types of renaming (use png instead of jpg, etc...) and I have executed these listed above against my own TV folders FWIW.