Kodi Community Forum
Library Auto Updater - Version 1.1.0 - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Service Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=152)
+---- Thread: Library Auto Updater - Version 1.1.0 (/showthread.php?tid=119520)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32


RE: XBMC Library Updater Addon - keiron99 - 2013-01-28

Is this add on supposed to work with Apple TV?

I have installed it on mine but quite simply, it doesn't work. Nothing happens. I have set the intervals for 1 hour, and waited several hours, but the library has not updated.






RE: XBMC Library Updater Addon - robweber - 2013-01-28

(2013-01-26, 17:30)kurtlewis Wrote: ++100 on this request- Share path availability should always be checked first! For my example, I have my QNAP 419 NAS (which hosts all media files for the XBMC libraries via Samba path) set to auto-power-down at 1am and auto-power-up at 7am. Adding a "resource availability" check such as a simple ping test, connect success /fail test, would easily resolve any issues. Process would suspend itself if resource availability fails, and resume on next successful check. Maybe have an option to "fail silent" if the user has a situation such as mine, where the NAS powers down on a schedule. - Or, let's say the router dies, switch went down, bad network cable, or any number of typical things that could cause a remote resource share path to lose availability.

Be default XBMC will not do any "online" checking of paths when doing a library clean operations.

This addon, however, can do much of what you are asking for. If you enable "clean library" via the addon, and enable "verify paths" it will only issue the clean library command when all of your sources are verified to be online and accessible.

(2013-01-27, 05:23)Ghostdivision Wrote: Can I do it when my library is available and online? Or will that not provide you with any info?

Because if you need to see it when it can clean paths on update, and the library is not available right away i will loose my entire library again.

I guess ideally I'd like to see what happens when the library is cleaned and it is not supposed to be. I guess what I'm trying to see, via the logs, is that a) a clean operation is happening after the update when you are not asking it to and b) that it is indeed removing your items.

What kind of DB are you using? If you are using the regular SQLite databases could you copy your db files, run the update/clean, and then just restore them afterwards so you library will remain in tact. I realize it's a pain but it would help to have the log. Also, according to what I'm reading this clean operation happens every time xbmc does a library scan - this is totally outside of if you have "clean after update" selected in this addon correct?

(2013-01-28, 00:00)keiron99 Wrote: Is this add on supposed to work with Apple TV?

I have installed it on mine but quite simply, it doesn't work. Nothing happens. I have set the intervals for 1 hour, and waited several hours, but the library has not updated.

As far as I know this will run on an Apple TV. What version of xbmc are you using? Have your restarted the Apple TV after you've installed the service. I know there was a bug in some older versions of XBMC where service addons were not started until an application reboot when you first installed them.



RE: XBMC Library Updater Addon - Ghostdivision - 2013-01-29

I dont have an sqlite database, i guess i could just re-import the library, i dont have a ton of music.

And yes from what i have noticed, it happened outside of the addon, so I will turn on update library on startup and we can see what happens.


RE: XBMC Library Updater Addon - Stildawn - 2013-02-02

Hi All

I did a search but couldn't find anything, I'm just wondering will this addon automatically turn on xbmc and run the update? Or do I need to leave xbmc running all the time?


RE: XBMC Library Updater Addon - Ghostdivision - 2013-02-02

So here is what i did, i put my hard drive to sleep, enabled update music library startup in xbmc, and suddenly a little over a thousand songs were gone when i started up xbmc

If you cant find anything in this log, it has to be in the other log that was created just prior when I launched xbmc previously. But it should be in this one, its when a huge chunk of my library went missing again. I cant see a clean on update in the log, but it removed 3 quarters of my library on startup.

http://xbmclogs.com/show.php?id=31987


RE: XBMC Library Updater Addon - Ghostdivision - 2013-02-02

And here was the other log, it might have been deleted in this startup im not totally sure, i get alot of this in the previous log, i apologize for all the stuff in here, but the debug spits out a ton of stuff. All i can say is i put my hard drive to sleep twice, shut down xbmc, and when update library on startup is enabled in music 3 quarters of my music goes missing, if not all of it. As soon as i turned update library on startup off for music, my library is fine.... As others have pointed out.

http://xbmclogs.com/show.php?id=31990

01:44:51 T:2564 DEBUG: GOT ANNOUNCEMENT, type: 32, from xbmc, message OnRemove
01:44:51 T:2564 DEBUG: CAnnouncementManager - Announcement: OnRemove from xbmc
01:44:51 T:2564 DEBUG: GOT ANNOUNCEMENT, type: 32, from xbmc, message OnRemove
01:44:51 T:2564 ERROR: XFILE::CDirectory::GetDirectory - Error getting smb://ADMIN/G/Music/Placebo/Placebo - B Sides 1996-2006 CD2/
01:44:51 T:2564 DEBUG: MUSIC_INFO::CMusicInfoScanner:Big GrinoScan Rescanning dir 'smb://ADMIN/G/Music/Placebo/Placebo - B Sides 1996-2006 CD2/' due to change
01:44:51 T:2564 DEBUG: CAnnouncementManager - Announcement: OnRemove from xbmc


RE: XBMC Library Updater Addon - robweber - 2013-02-03

(2013-02-02, 09:30)Stildawn Wrote: Hi All

I did a search but couldn't find anything, I'm just wondering will this addon automatically turn on xbmc and run the update? Or do I need to leave xbmc running all the time?

This addon will not turn on xbmc to run updates. It runs in the same "space" as xbmc so if the application is turned off, the computer sleeping, etc then the addon isn't running either. You'll need a outside service to wake up you computer. On the plus side, if you do miss an update because xbmc is off, the addon will just trigger an update the next time you turn it on. It keeps track of the last time it ran and will play "catch-up" if something is missed.

(2013-02-02, 11:06)Ghostdivision Wrote: So here is what i did, i put my hard drive to sleep, enabled update music library startup in xbmc, and suddenly a little over a thousand songs were gone when i started up xbmc

If you cant find anything in this log, it has to be in the other log that was created just prior when I launched xbmc previously. But it should be in this one, its when a huge chunk of my library went missing again. I cant see a clean on update in the log, but it removed 3 quarters of my library on startup.

http://xbmclogs.com/show.php?id=31987

Thanks for the logs. If you've created a Trac ticket about this I would recommend posting links to them in the ticket as well. I have a feeling an xbmc dev is going to have to look at the source to give a final ruling on this behavior. Lots of time for stuff like this you won't get any help without a log, so this is a good start. Based on what I can tell it seems like there may be a delay in reading your music directories on xbmc startup. Still not sure why it would remove things though. In your logs I didn't see any settings related to cleaning operations after updates being turned on. Unless this is default behavior now for music?


RE: XBMC Library Updater Addon - Ghostdivision - 2013-02-03

It almost seems to be default behavior based on what a few moderators said in threads I researched, but I have no idea why, or no explanation was given....its just the way it was for music is all that they seemed to imply.

Yet on movies and tv shows, no such issue, i just really wish it would stop removing my music library.

Since turning off update music library on startup i have had no such issues as others have also pointed out in other threads, but it would be nice to enable this option without worrying about my music library going missing.




RE: XBMC Library Updater Addon - Ghostdivision - 2013-02-04

Is there any chance you would consider a check path or verify sources before update like we discussed earlier or is that just not going to happen?

I am not sure what the check path does if the hard drive is sleeping? Does it ping it or do something to wake it up and wait for a response before deciding to clean? Something like that would be ideal to fix this music update issue.


RE: XBMC Library Updater Addon - robweber - 2013-02-04

(2013-02-04, 11:40)Ghostdivision Wrote: Is there any chance you would consider a check path or verify sources before update like we discussed earlier or is that just not going to happen?

I am not sure what the check path does if the hard drive is sleeping? Does it ping it or do something to wake it up and wait for a response before deciding to clean? Something like that would be ideal to fix this music update issue.

I'd consider this as a last resort. It really seems like a closer look needs to happen here. I've updated your trac ticket to include the logs you've posted. I'm not sure if you can do this, but is it possible for you (as the op) to change the component section of your ticket? I see it is Uncategorized, please change it to Database/Library for Music. I believe Trac is setup so that certain devs are notified of certain categories. Uncategorized probably didn't get anyone to look at it, especially with everyone busy the past few months with Frodo. If you can't change the component category perhaps make another ticket with the right category and link to the first one. This is not exactly the right way to do it but it may get a dev to look at the original ticket and at least give you a better response.



RE: XBMC Library Updater Addon - fungify - 2013-02-06

Hi

Great add-on! I do have one request: The add-on MyPicsDB (http://forum.xbmc.org/showthread.php?tid=133905) is a database for storing images, which IMHO should be part of native XBMC, but anyway. I'm running a script to auto update my image database each night.

Would you consider including auto update of the image database in your add-on?

FFY


RE: XBMC Library Updater Addon - Exos - 2013-02-07

Hi, just wanted to support one of the previous comments.

Updated to 12.0 Frodo on ATV2 5.1.1 and since the update after a scan both my "TV Shows" library and "Movies" library are completely erased and I have to set the scraper again and re-scan. If I run it manually it seems to not be able to browse the SMB share, so i can only assume the cleaning operation is removing the entries because it can't verify the source. I know it's not an issue with the share itself because I have two other ATV's running EDEN and it works fine.

It's not a killer for me at the moment because I've simply disabled the app, but thought I should add my two penneth.

Cheers


RE: XBMC Library Updater Addon - Ghostdivision - 2013-02-07

HHmm i never seen my movie shares go missing, but now im thinking i should be watching more carefully.....maybe some movies are going missing.

If your bothered by this hidden cleaning behavior when trying to simply update your library please let them know on the link, i dont really understand why an update function has a hidden clean function built in.

http://trac.xbmc.org/ticket/13970#comment:5


The troubling part is the latest comment is this is normal, and by design.... I fear rob might be our only hope if they refuse to change this.


RE: XBMC Library Updater Addon - robweber - 2013-02-07

(2013-02-06, 21:43)fungify Wrote: Hi

Great add-on! I do have one request: The add-on MyPicsDB (http://forum.xbmc.org/showthread.php?tid=133905) is a database for storing images, which IMHO should be part of native XBMC, but anyway. I'm running a script to auto update my image database each night.

Would you consider including auto update of the image database in your add-on?

FFY

I don't really want to add the ability to launch other scripts from this addon, trying to keep the core purpose for what it is. You could check out this addon though, it was made specifically for scheduling XBMC functions on a timer. I would recommend pulling from the "testing" repo at the moment as that will give you that latest GUI updates. As long as the MyPicsDB can be updated via an xbmc command call this should work for you.

http://forum.xbmc.org/showthread.php?tid=124888
https://github.com/robweber/cronxbmc/tree/gui_testing

(2013-02-07, 01:58)Exos Wrote: Hi, just wanted to support one of the previous comments.

Updated to 12.0 Frodo on ATV2 5.1.1 and since the update after a scan both my "TV Shows" library and "Movies" library are completely erased and I have to set the scraper again and re-scan. If I run it manually it seems to not be able to browse the SMB share, so i can only assume the cleaning operation is removing the entries because it can't verify the source. I know it's not an issue with the share itself because I have two other ATV's running EDEN and it works fine.

It's not a killer for me at the moment because I've simply disabled the app, but thought I should add my two penneth.

Cheers

I want to make sure I'm understanding the order of operations right.

1) You updated your ATV2
2) You have the library update addon set to "clean library after update"
3) It ran an automated scan and erased your TV shows and Movies
4) It appears that your SMB share cannot be accessed via the scanner

If this is correct - did you also have verify sources checked in the clean library settings? If the share can't be found and this is checked it should abort the clean library call. If you didn't have this checked its going to call clean library no matter what, so if xbmc can't see the share for some reason your library is going to be blown away. Also, please confirm you don't have any advancedsettings in place that would trigger a library clean anyway.

Just as an FYI for everyone, please keep in mind that this addon is only a glorified timer. It is calling the same UpdateLibrary() and CleanLibrary() functions that XBMC calls internally when running these processes manually. The fact that you are using the addon vs running manually should make no difference - except maybe in the timing. If you are doing it manually with no issues but the timer is causing problems; maybe your shares are unavailable when the timer is triggered (ie hard drives asleep).

(2013-02-07, 05:37)Ghostdivision Wrote: HHmm i never seen my movie shares go missing, but now im thinking i should be watching more carefully.....maybe some movies are going missing.

If your bothered by this hidden cleaning behavior when trying to simply update your library please let them know on the link, i dont really understand why an update function has a hidden clean function built in.

http://trac.xbmc.org/ticket/13970#comment:5


The troubling part is the latest comment is this is normal, and by design.... I fear rob might be our only hope if they refuse to change this.

I've been following the Trac discussion. As I read it only the music library does a clean integrated with the update, the video library does not. As a confirmation I checked and the <cleanonupdate> advanced setting is only available for video, which lead me to believe it's enabled for music whether you want it or not. jmarshall's comments regarding the reason for this (music tags changing, etc) make sense in the context that music files can have meta information as part of the file. You shouldn't be worried about items being removed from your video library, even if the hard drive is asleep when the update runs.

I'm sort of on the fence regarding the whole thing. I can see jmarshall's justification. How is xbmc supposed to tell the difference between something that was removed on purpose, and the fact that the share is just unavailable? There is a genuine conflict between automation efficiency, and real world setup issues.



RE: XBMC Library Updater Addon - Ghostdivision - 2013-02-08

Well I might not be understanding this completely as it relates to music, i am more of a video guy but in my experience with video and i would like music to act the same. An update simply detects a change, it does not remove anything, i have moved files, or altered a video files, changed the name of movies or tv episodes...ect..., and then update the library, after that you get two entries then, the new one and the old one, and hence you need to clean it before the old entry is removed, or you can click on it and remove it manually, or in my case i use this program to atuomate it.

I just dont get why music cannot do this, if you change the tag it will add the new cd/song entry, so you may have two entires, the old one that will need to be cleaned and the new updated one, then leave it to the user or this very program to clean it or remove it safely. I hoped updating a library would simply update the library like video, detecting new entries, not trying to remove it to.

In my case as someone who uses automation i leave it to this program to clean for me once a day.

RIght now im having to update my library manually out of fear libraries will be going to go missing.

And if people like the clean on update, let them add it to the advanced settings like video. Unfortunately for some us, their is no solution on the other side of the fence, i cant add a script as far as i know to not clean on update, were stuck with this making sure a single hard drive is always spinning, and then having to manually update it.

I would add this opinion to the trac ticket, but im worried im over stepping my bounds, jmarshall was incredibly nice to me, some other developers have the attitude this is the way it is and is going to be, so im happy he at least took the time to hear me, i dont want to step on any toes and make this a personal battle. Other users around the forum will need to chime in if they have an opinion, but im sure we will continue to see why is my music library going missing on the forum instead.

The discussion about this with jmarshall came up in 2011 about letting users manually add the clean argument if they want to music, so im doubting a change will happen.

http://forum.xbmc.org/showthread.php?tid=97430