View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 71 posts ] 
Go to page 1, 2, 3, 4, 5  Next

Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject: manual database delete?
PostPosted: Thu Sep 22, 2005 5:19 pm 
Offline
Joined: Tue Aug 30, 2005 6:04 am
Posts: 39
Location: Madison, WI
I have a strange situation, Tripping the rift is shown as recorded but every time I have tried to delete it in mythfrontend has failed.
The box locked up right as it started to record the show. I think that is what is causing the problem.
Is it possible to open mysql and delete it manually? Is there a diagram of the database structure?

in the recorded table I see the show listed, but I am not sure what other tables are pointing at this record or if this is the best course of action.
thanks


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 22, 2005 5:33 pm 
Offline
Joined: Mon Oct 06, 2003 10:38 am
Posts: 4978
Location: Nashville, TN
easiest way is to go to mythweb and see where the link is pointing. then go to the directory and see if that file exists (most likely not) if not then touch longfilename.nuv then go back and try to delete it should work at that point.

_________________
Have a question search the forum and have a look at the KnoppMythWiki.

Xsecrets


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 22, 2005 7:26 pm 
Offline
Joined: Sun Jun 12, 2005 10:55 pm
Posts: 3161
Location: Warwick, RI
Hi,

I think I understand the problem.. some how in your web page of recorded show is displaying a show and you can't delete it, if you click on delete it stays?

If this is true, I find the easiest way to make things happy is to run mythlink.sh (may have to be root) mythlink.sh will complain about missing .nuv files and if you do a ls -al on the /myth/pretty/<missing-pretty-filename>.mpg it will then showw you the real file name.
simply copy the long string of numbers and paste
# echo " " > /myth/tv/paste the -lots of numbers here.nuv
this creates the missing file and now you may delete it.

Once in a while this seems to happen that the file is deleted however the database entry is not cleaned of that entry, (when it happens to me, my wife says I had a senior moment) forget to finish something because of a thousand reasons :)

Here are a couple links to maybe help you along.

Mike
Pretty script
http://mysettopbox.tv/phpBB2/viewtopic.php?t=4865&

Adding pretty
http://mysettopbox.tv/phpBB2/viewtopic.php?p=31031&


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 23, 2005 7:06 am 
Offline
Joined: Tue Aug 30, 2005 6:04 am
Posts: 39
Location: Madison, WI
Sorry it took me so long to get back, I was watching my shows :D

I don't have mythweb running...
I am not comfortable securing apache2 and I know it is a skill that I don't have so I never started it.

I issue
mysql -u mythtv -p

and then enter the password when prompted
USE mythconverg;
SELECT * FROM recorded;

this is where I can see the listing but the file doesn't exist.

MJL- I created a script and I made the directory(I used gentoo and I called the video directory mythtv, not myth.... and in mythtv all the videos I record are in the video directory and not the tv directory.

I have the mythlink.sh script in the contrib directory. could you post back whe mythlink.sh does? Since my install isn't standard I am afraid to run some script files.
thanks for your help, If I know what field in the recorded table has the file name is, maybe I could just get it and then create an empty file
for the frontend to delete.
thanks for your help.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 23, 2005 7:33 am 
Offline
Joined: Tue Aug 30, 2005 6:04 am
Posts: 39
Location: Madison, WI
thanks I got it.
I looked at the mythlink script and I issued the
Select title,subtitle,chanid,starttime,endtime from recorded where title like 'Tripping%'
I got the list and the subtile told me which episode it was, I knew what I was looking for.
I took the chanid_starttime_endtime.nuv(removed the mysql formatting. and did the echo that you recommended now the file is there.
when I get home I will try the delete, thanks for your help and taking it step by step.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 23, 2005 8:45 am 
Offline
Joined: Mon Oct 06, 2003 10:38 am
Posts: 4978
Location: Nashville, TN
no problem you should be good now, once the file exist 0byte or not it should delete fine.

_________________
Have a question search the forum and have a look at the KnoppMythWiki.

Xsecrets


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 23, 2005 8:50 am 
Offline
Joined: Tue Aug 30, 2005 6:04 am
Posts: 39
Location: Madison, WI
do I need the .png file as well?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 23, 2005 4:06 pm 
Offline
Joined: Mon May 10, 2004 8:08 pm
Posts: 1891
Location: Adelaide, Australia
no you dont need the png


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 23, 2005 7:42 pm 
Offline
Joined: Sun Jun 12, 2005 10:55 pm
Posts: 3161
Location: Warwick, RI
Hi,

What would be nice is if a kind hearted perl guru would modify the pretty script and change the error trapping to just simply fix the missing file(s). Then it would be a transparent and totally forgotten issue. It does happen more frequently than you think also.

It would also fix a side issue that when mythlink.sh runs (manually have to set it up in crontab), that if it finds a missing .nuv it aborts doing the rest of the pretty names. So if there was an error, and you were to record several shows a day and then on the weekend go to review what was recorded, they won't be there, but really they are recorded.

Anyway, glad it helped.
Mike


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 23, 2005 7:48 pm 
Offline
Joined: Mon May 10, 2004 8:08 pm
Posts: 1891
Location: Adelaide, Australia
The reason it doesnt delete the thing from the database is that the recordings may be stored on a network share that is temporarily unavailable. Deleting it from the database in that case would be a bad thing. I think the latest version of myth prompts you to ask if you still want to delete it when the file is not there.

If mythlink has a problem with this it is mythlink that should be fixed.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 23, 2005 8:19 pm 
Offline
Joined: Sun Jun 12, 2005 10:55 pm
Posts: 3161
Location: Warwick, RI
Hi Greg Frost,

A totally valid point,
Quote:
stored on a network share
and I have to agree. My system is a simple one machine frontend / backend so for this situation it is desired to fix a missing file. I have found that over a period of time an occasonal .nuv is gone however still hangs in the db. With R5A16 you must have the correct.nuv before it will be cleared.

Maybe make it an optional mythlink.sh tweak, fix or no fix, just add a #. Either way, I would love to see it fix the missing file and resume however, just to skip the missing file and resume would be great also and still work for the network share. I just don't have the perl skill to make that tweak.

Thanks for the different perspective!
Mike


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 24, 2005 8:49 am 
Offline
Joined: Tue Jan 18, 2005 2:07 am
Posts: 1530
Location: California
In the mythlink file look for a line of code that looks like this:

Code:
      if (!-s "$altpath/$nfn".".mpg"){
                  #  print "Creating $altpath/$nfn\n";
                  symlink "$mythpath/$ofn", "$altpath/$nfn".".mpg" or die "Failed to create symlink $altpath/$nfn".".mpg".": $!";


Change the "if" statement so that it looks like this:

Code:
if ((!-s "$altpath/$nfn".".mpg") && (-e "$mythpath/$ofn")) {


Warnings: This code change is untested; I have not done a lot of perl programming in my lifetime; I answered this question after finishing my second glass of wine.

Having said all that, I would give this a try...

Marc


Last edited by marc.aronson on Sun Oct 02, 2005 8:49 pm, edited 1 time in total.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 02, 2005 5:33 pm 
Offline
Joined: Sun Jun 12, 2005 10:55 pm
Posts: 3161
Location: Warwick, RI
Hi marc.aronson,
I was hoping to say, "have one more to celibrate" however the syntax isn't quite correct :(

root@mythtv-20:/myth/tools# /usr/local/bin/mythlink.sh
Missing files...
Skipping /myth/tv/1101_20050921231800_20050921232300.nuv
Skipping /myth/tv/1101_20050921235100_20050922000000.nuv
Skipping /myth/tv/1010_20050921020500_20050921030400.nuv
Skipping /myth/tv/1102_20050922233000_20050922234500.nuv
These files are valid
Argument "1101_20050927233500_20050927233800.nuv" isn't numeric in division (/) at -e line 41, <> line 8.
Argument "/myth/tv" isn't numeric in division (/) at -e line 41, <> line 8.
Argument "1643_20050929231800_20050929232800.nuv" isn't numeric in division (/) at -e line 41, <> line 9.
Argument "2010_20050930222500_20050930225400.nuv" isn't numeric in division (/) at -e line 41, <> line 10.
Argument "2010_20051001200200_20051001210000.nuv" isn't numeric in division (/) at -e line 41, <> line 11.
Argument "2010_20051001210000_20051001220000.nuv" isn't numeric in division (/) at -e line 41, <> line 12.
Did not create the missing files
Manually
echo " " > /myth/tv/1101_20050921231800_20050921232300.nuv
root@mythtv-20:/myth/tools# /usr/local/bin/mythlink.sh
Argument "1101_20050921231800_20050921232300.nuv" isn't numeric in division (/) at -e line 41, <> line 2.

Any adjustments I can make?
Thanks
Mike


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 02, 2005 8:54 pm 
Offline
Joined: Tue Jan 18, 2005 2:07 am
Posts: 1530
Location: California
Mike:

Whoops -- my mistake. I forgot to put quotes around the $mythpath/$ofn construct. I've edited my original post and corrected it, so if you use what's there now, it should work. Now that I'm back home I was able to run a test. I was able to reproduce the problem you encountered, and make the problem go away with the added quotes.

Marc


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 02, 2005 9:18 pm 
Offline
Joined: Sun Jun 12, 2005 10:55 pm
Posts: 3161
Location: Warwick, RI
Hi Marc,

Can't celebrate quite yet, but looks better!

root@mythtv-20:/myth/tools# /usr/local/bin/mythlink.sh
The next trick is to make it create the files instead of skipping them.
Skipping /myth/tv/1101_20050921235100_20050922000000.nuv
Skipping /myth/tv/1010_20050921020500_20050921030400.nuv
Skipping /myth/tv/1102_20050922233000_20050922234500.nuv
Failed to create symlink
Also would like to get rid of the double stamp..
/myth/pretty/The_Tonight_Show_With_Jay_Leno-Sep27_2005_2335_2005_2335.mpg: File exists at -e line 45, <> line 7.

Other files exsist, what makes it complain about this one?
The_Tonight_Show_With_Jay_Leno-Sep27_2005_2335_2005_2335.mpg -> /myth/tv/1101_20050927233500_20050928003700.nuv

I really appreciate the help. Once it works properly, it will mean that on a frontend/backend system, if there is a dead wood, you will have no issue deleting it.

Mike


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 71 posts ] 
Go to page 1, 2, 3, 4, 5  Next



All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu