home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Support
Watch / Listen Media
Television (MyTV frontend and TV-Server)
Recording freezing/stopping early - Hauppauge WinTV-HVR-955Q
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="mm1352000" data-source="post: 1184036" data-attributes="member: 82144"><p>Okay. Well, TV Server can only act on the details that are available in the program meta-data. For what it's worth, to me both your documentary/entertainment/interests and xxx/yyy/zzz levels seem like genres. However TV Server only has capacity to store one genre per program/recording. So there's a bit of a gap between what you want and what's currently possible.</p><p></p><p></p><p>This does sound similar to what the OP is doing after all.</p><p></p><p></p><p>That's because resume points are associated with the full file name/path. Moving the file changes the name and/or path. Therefore the resume point is lost. Nothing can be done about this.</p><p></p><p></p><p>This is where I think you and the OP differ. The OP indicated they want to re-import the recordings so that the entries in recorded TV work after the underlying files have been moved. Nevertheless, you may be able to write a script that invokes the MySQL command line client with a query to delete all recording entries that have been moved. A query such as <em>DELETE FROM Recording WHERE LOAD_FILE(fileName) IS NULL;</em> <strong>may</strong> work. However it may be veeeery sloooooooow. Unfortunately there doesn't seem to be any direct "does file exist" function available. I think you'd be much better off with a solution that involves more code/logic.</p><p></p><p></p><p>MP is probably generating thumbnails for the new videos. If you copied the recording thumbnail over when you move the recording itself then I suspect this wouldn't happen.</p><p></p><p></p><p>It <em>is </em>possible to write such scripts for moving, deleting and renaming individual recordings when source and target file names/paths are provided. The point when it becomes more challenging is when you're working with more than one file and/or incomplete information. For example: the generalised clean-up function. If you could tell the script which entries need to be cleaned up then it becomes possible again.</p><p></p><p>Here are some batch scripts that may give you some ideas.</p><p></p><p>rename/move:</p><p>[code]@echo off</p><p>set source=%1%</p><p>set target=%2%</p><p></p><p>echo UPDATE Recording SET fileName = %target% WHERE fileName = %source%; > temp.sql</p><p>"c:\Program Files\MySQL\MySQL Server 5.6\bin\mysql.exe" -h host_name -D database_name -u user_name -ppassword < temp.sql</p><p>del temp.sql</p><p></p><p>move %source% %target%[/code]</p><p></p><p>delete:</p><p>[code]@echo off</p><p>set target=%1%</p><p></p><p>echo DELETE FROM Recording WHERE fileName = %target%; > temp.sql</p><p>"c:\Program Files\MySQL\MySQL Server 5.6\bin\mysql.exe" -h host_name -D database_name -u user_name -ppassword < temp.sql</p><p>del temp.sql</p><p></p><p>del %target%[/code]</p><p></p><p>Note...</p><ul> <li data-xf-list-type="ul">if you don't have a MySQL database then these scripts won't work, but it's almost certainly possible to write equivalent scripts for your database<br /> </li> <li data-xf-list-type="ul">the path to your mysql.exe may vary</li> <li data-xf-list-type="ul">you should replace host_name, database_name, user_name and password with appropriate credentials for your database</li> <li data-xf-list-type="ul">when you run the scripts, arguments should be wrapped in quotation marks and back-slashes must be escaped; for example: <em>mpmove "e:\\my recording folder\\a recording.ts" "f:\\a video folder\\a sub-folder\\a recording.ts"</em></li> </ul><p><strong>Disclaimer</strong></p><p>These scripts can delete files, contain plaintext passwords, and do not check the inputs are sane/safe. As such they are somewhat dangerous. I urge extreme caution if you decide to use them. Also, I do not take any responsibility for any consequences arising from their use.</p></blockquote><p></p>
[QUOTE="mm1352000, post: 1184036, member: 82144"] Okay. Well, TV Server can only act on the details that are available in the program meta-data. For what it's worth, to me both your documentary/entertainment/interests and xxx/yyy/zzz levels seem like genres. However TV Server only has capacity to store one genre per program/recording. So there's a bit of a gap between what you want and what's currently possible. This does sound similar to what the OP is doing after all. That's because resume points are associated with the full file name/path. Moving the file changes the name and/or path. Therefore the resume point is lost. Nothing can be done about this. This is where I think you and the OP differ. The OP indicated they want to re-import the recordings so that the entries in recorded TV work after the underlying files have been moved. Nevertheless, you may be able to write a script that invokes the MySQL command line client with a query to delete all recording entries that have been moved. A query such as [I]DELETE FROM Recording WHERE LOAD_FILE(fileName) IS NULL;[/I] [B]may[/B] work. However it may be veeeery sloooooooow. Unfortunately there doesn't seem to be any direct "does file exist" function available. I think you'd be much better off with a solution that involves more code/logic. MP is probably generating thumbnails for the new videos. If you copied the recording thumbnail over when you move the recording itself then I suspect this wouldn't happen. It [I]is [/I]possible to write such scripts for moving, deleting and renaming individual recordings when source and target file names/paths are provided. The point when it becomes more challenging is when you're working with more than one file and/or incomplete information. For example: the generalised clean-up function. If you could tell the script which entries need to be cleaned up then it becomes possible again. Here are some batch scripts that may give you some ideas. rename/move: [code]@echo off set source=%1% set target=%2% echo UPDATE Recording SET fileName = %target% WHERE fileName = %source%; > temp.sql "c:\Program Files\MySQL\MySQL Server 5.6\bin\mysql.exe" -h host_name -D database_name -u user_name -ppassword < temp.sql del temp.sql move %source% %target%[/code] delete: [code]@echo off set target=%1% echo DELETE FROM Recording WHERE fileName = %target%; > temp.sql "c:\Program Files\MySQL\MySQL Server 5.6\bin\mysql.exe" -h host_name -D database_name -u user_name -ppassword < temp.sql del temp.sql del %target%[/code] Note... [LIST] [*]if you don't have a MySQL database then these scripts won't work, but it's almost certainly possible to write equivalent scripts for your database [*]the path to your mysql.exe may vary [*]you should replace host_name, database_name, user_name and password with appropriate credentials for your database [*]when you run the scripts, arguments should be wrapped in quotation marks and back-slashes must be escaped; for example: [I]mpmove "e:\\my recording folder\\a recording.ts" "f:\\a video folder\\a sub-folder\\a recording.ts"[/I] [/LIST] [B]Disclaimer[/B] These scripts can delete files, contain plaintext passwords, and do not check the inputs are sane/safe. As such they are somewhat dangerous. I urge extreme caution if you decide to use them. Also, I do not take any responsibility for any consequences arising from their use. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Support
Watch / Listen Media
Television (MyTV frontend and TV-Server)
Recording freezing/stopping early - Hauppauge WinTV-HVR-955Q
Contact us
RSS
Top
Bottom