[mythtv-users] import / export between systems
Michael T. Dean
mtdean at thirdcontact.com
Mon Jun 17 00:51:03 UTC 2013
On 06/16/2013 07:41 PM, Raymond Wagner wrote:
> On Jun 16, 2013, at 19:24, Ian Evans wrote:
>
>> On Sun, Jun 16, 2013 at 4:53 PM, Michael T. Dean wrote:
>>
>> Best bet is to put the recordings from one system into Video Library.
>>
>> Use mythlink.pl to create useful file names (
>> http://www.mythtv.org/wiki/MythVideo_File_Parsing ), and then put
>> the videos into the directories under your Videos Storage Group.
>>
>>
>> I was thinking of doing this with some of the series I've been
>> recording. When I ripped a series DVD, I used the filename
>> Series_SeasonxEpisode.mkv and MythVideo picked up the metadata just fine.
>>
>> Just looking at http://www.mythtv.org/wiki/Mythlink.pl and I don't
>> see a way to put the Season/Episode numbers in when I run it on
>> Recordings. Will MythVideo be able to find the metadata just based on
>> Series and Subtitle?
>
> Mythlink.pl does not currently support season and episode number, as
> that information is not available for use until the additional
> metadata scripts have run to grab it. The Video Library should be
> able to operate just fine without it, but you may not like the
> filename it produces for you own organizational pattern.
>
>> Also...still kinda new at the symlink thing...if I move the files
>> from the Recording group to the Video group, don't the symlinks
>> break? Or is there a special command to do this?
>
> When you copy the symlinks, have it dereference the symlinks and copy
> the file directly, rather than just the symlink.
Right, something like "copy -L" or "rsync -L" or, better, write a little
script that uses readlink to get the target file name and basename to
get the symlink name and then mv the existing file to the new location
using the old/symlink name. Something like the attached (very lightly
tested) script... Please feel free to make improvements and share results.
Mike
-------------- next part --------------
#!/bin/bash
if [ "$#" -lt 2 ]; then
echo "Usage: mvlinked.sh <path/to/link> <destination/dir>"
exit 1
fi
LINK_PATH="${1}"
DEST_DIR="${2}"
if [ ! -L "${LINK_PATH}" ]; then
echo "Invalid symbolic link: ${LINK_PATH}"
exit 2
fi
if [ ! -d "${DEST_DIR}" ]; then
echo "Destination directory is missing: ${DEST_DIR}"
exit 3
fi
LINK_NAME=`basename ${LINK_PATH}`
SOURCE_FILE=`readlink -e ${LINK_PATH}`
DEST_FILE="${DEST_DIR}/${LINK_NAME}"
if [ ! -f "${SOURCE_FILE}" ]; then
echo "Source file is missing: ${SOURCE_FILE}"
exit 4
fi
echo "Moving:"
echo " ${SOURCE_FILE}"
echo "To:"
echo " ${DEST_FILE}"
mv "${SOURCE_FILE}" "${DEST_FILE}"
STATUS=$?
if [ "${STATUS}" ]; then
rm "${LINK_PATH}"
fi
More information about the mythtv-users
mailing list