Script to delete Epg database
#1
Hello,

Can someone help with script to delete Epg database. This is what I have so far, but its not deleting:
Code:
import xbmc, xbmcgui
import os, sys, urllib, datetime, time, shutil, re


EPGDB = xbmc.translatePath('special://home/userdata/Database/Epg12.db')
def delete_file(EPGDB):
    if os.path.exists(EPGDB):
        os.remove(EPGDB)
Reply
#2
(2020-01-28, 03:32)james739 Wrote: Hello,

Can someone help with script to delete Epg database. This is what I have so far, but its not deleting:
Code:
import xbmc, xbmcgui
import os, sys, urllib, datetime, time, shutil, re


EPGDB = xbmc.translatePath('special://home/userdata/Database/Epg12.db')
def delete_file(EPGDB):
    if os.path.exists(EPGDB):
        os.remove(EPGDB)
Any reason why you don't use the "Clear guidedata" option in Kodi's LiveTV section?
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Twitter | Help?
Reply
#3
Thumbs Up 
(2020-01-28, 03:55)Lunatixz Wrote:
(2020-01-28, 03:32)james739 Wrote: Hello,

Can someone help with script to delete Epg database. This is what I have so far, but its not deleting:
Code:
import xbmc, xbmcgui
import os, sys, urllib, datetime, time, shutil, re


EPGDB = xbmc.translatePath('special://home/userdata/Database/Epg12.db')
def delete_file(EPGDB):
    if os.path.exists(EPGDB):
        os.remove(EPGDB)
Any reason why you don't use the "Clear guidedata" option in Kodi's LiveTV section? 

Thanks Man! I didn't know about that option
Reply
#4
(2020-01-28, 03:55)Lunatixz Wrote:
(2020-01-28, 03:32)james739 Wrote: Hello,

Can someone help with script to delete Epg database. This is what I have so far, but its not deleting:
Code:
import xbmc, xbmcgui
import os, sys, urllib, datetime, time, shutil, re


EPGDB = xbmc.translatePath('special://home/userdata/Database/Epg12.db')
def delete_file(EPGDB):
    if os.path.exists(EPGDB):
        os.remove(EPGDB)
Any reason why you don't use the "Clear guidedata" option in Kodi's LiveTV section? 

So,  I tried that and Epg12.db is still in database folder. Can you give me pointers on how to do it via script?

Thanks
Reply
#5
(2020-01-28, 04:23)james739 Wrote:
(2020-01-28, 03:55)Lunatixz Wrote:
(2020-01-28, 03:32)james739 Wrote: Hello,

Can someone help with script to delete Epg database. This is what I have so far, but its not deleting:
Code:
import xbmc, xbmcgui
import os, sys, urllib, datetime, time, shutil, re


EPGDB = xbmc.translatePath('special://home/userdata/Database/Epg12.db')
def delete_file(EPGDB):
    if os.path.exists(EPGDB):
        os.remove(EPGDB)
Any reason why you don't use the "Clear guidedata" option in Kodi's LiveTV section?    

So,  I tried that and Epg12.db is still in database folder. Can you give me pointers on how to do it via script?

Thanks   
Using "reset/clear" removes DB entries and does not delete the file... Why would you need to manually delete the files? Kodi DB's are file locked while in use.
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Twitter | Help?
Reply
#6
(2020-01-28, 18:25)Lunatixz Wrote:
(2020-01-28, 04:23)james739 Wrote:
(2020-01-28, 03:55)Lunatixz Wrote: Any reason why you don't use the "Clear guidedata" option in Kodi's LiveTV section?    

So,  I tried that and Epg12.db is still in database folder. Can you give me pointers on how to do it via script?

Thanks    
Using "reset/clear" removes DB entries and does not delete the file... Why would you need to manually delete the files? Kodi DB's are file locked while in use. 
How can I access "reset/clear" with a custom button?
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
Script to delete Epg database00