LinuxMCE Forums

General => Users => Topic started by: jgaffney on January 14, 2008, 10:54:54 pm

Title: Disable flickr?
Post by: jgaffney on January 14, 2008, 10:54:54 pm
What is the easiest way to remove the filckr pictures from being used by the screensaver.

Is just deleting the files in the flickr folder enough?  or will they get replaced?

I want the screen saver to run with my own pics (which I have figured out) but want to remove all the flickr pics also.

Thank you.
Title: Re: Disable flickr?
Post by: darrenmason on January 15, 2008, 04:29:59 am
You will need to disable the process that retrieves them first.
In web admin go through the processes that run on the core and there is one related to downloading the flickr files (Not in front of it at the moment or I would give you more accurate info)

Then to get rid of the existing ones, ideally you would just remove the screen save attribute for them in the database. But removing the actual files will also stop them being displayed as there is a file existence check when forming a list of pictures to display. This will leave the database a bit messy but if you can live with that then that is fine.

Regards
Darren
Title: Re: Disable flickr?
Post by: fibres on January 20, 2008, 09:24:55 pm
Hi

Can anyone give more info on how to disable flickr from retrieving the files.

I have tried removing the screen saver attributes on the web admin, however it seems to reset some of them.

I have looking in the web admin but cannot find where to show processes running on the core.

Regards
Title: Re: Disable flickr?
Post by: totallymaxed on January 20, 2008, 09:30:00 pm
Hi

Can anyone give more info on how to disable flickr from retrieving the files.

I have tried removing the screen saver attributes on the web admin, however it seems to reset some of them.

I have looking in the web admin but cannot find where to show processes running on the core.

Regards

To stop new flickr images from being downloaded do this...

Open a Console window or ssh into your core and do this;

sudo rn /usr/pluto/bin/flickr.pl /usr/pluto/bin/flickr.pl.back <return>

to rename the flickr.pl perl script to flickr.pl.back. Just rename it again to flickr.pl if you'd like flickr images again
Title: Re: Disable flickr?
Post by: jgaffney on January 20, 2008, 09:42:31 pm
Thanx, but I think you meant "mv" instead of "rn"
Title: Re: Disable flickr?
Post by: totallymaxed on January 20, 2008, 09:43:23 pm
Thanx, but I think you meant "mv" instead of "rn"

Ooops... yep ;-)
Title: Re: Disable flickr?
Post by: lon22 on January 22, 2008, 12:28:47 am
Has anyone actually had success in disabling flickr. I followed the advice in multiple post, including this one, but with no success. I renamed flicker.pl to flickr.pl.back and I also deleted the flickr directory under pictures. Is there a step that I'm missing?

thanks

lon22
Title: Re: Disable flickr?
Post by: hari on January 22, 2008, 12:43:58 am
maybe the process is still running..
regards,
hari
Title: Re: Disable flickr?
Post by: jgaffney on January 22, 2008, 12:50:46 am
Just deleting the files did it for me, I've also renamed the flicker script since.

Maybe you need to assign the screensaver attribute to one of your own pics, if you haven't already.
Title: Re: Disable flickr?
Post by: RichardP on January 22, 2008, 01:20:15 am
Has anyone actually had success in disabling flickr. I followed the advice in multiple post, including this one, but with no success. I renamed flicker.pl to flickr.pl.back and I also deleted the flickr directory under pictures. Is there a step that I'm missing?

thanks

lon22

I think you've done it all, and probably correctly. What you're probably forgetting is that the process is still running in memory. Renaming the script will only stop it from being found the next time the system starts up. A reboot should stop new images arriving.
Title: Re: Disable flickr?
Post by: hari on January 22, 2008, 01:35:29 am
Has anyone actually had success in disabling flickr. I followed the advice in multiple post, including this one, but with no success. I renamed flicker.pl to flickr.pl.back and I also deleted the flickr directory under pictures. Is there a step that I'm missing?

thanks

lon22

I think you've done it all, and probably correctly. What you're probably forgetting is that the process is still running in memory. Renaming the script will only stop it from being found the next time the system starts up. A reboot should stop new images arriving.

a "sudo killall flickr.pl" would be sufficient

regards,
Hari
Title: Re: Disable flickr?
Post by: lon22 on January 22, 2008, 01:53:15 am
I have pictures of my own that show up, which I assign the screen saver attribute.

I restarted and regenerated the core numerous times.

There is no flickr process to kill. The only process I see running related to flickr is:
"14043 pts/22   SLl+   0:03 ./Photo_Screen_Saver -d 28 -r 127.0.0.1 -l /var/log/pluto/"

I took a look at the flickr log file under /var/log/pluto and the directory where it has been getting images from was deleted by myself for some time now.
Title: Re: Disable flickr?
Post by: fibres on January 22, 2008, 03:33:58 pm
Hi 
Well I moved the flickr.pl file and rebooted the machine. I then removed the attributes froom the file and removed the files from the disk and al works fine.
The first lot of pictures i uploaded were about 900k each and they load fine. However the second lot were 2.5mb each and they dont seem to work. Is there a limit on the file size the screensaver can use?

Regards
Title: Re: Disable flickr?
Post by: totallymaxed on January 22, 2008, 05:23:42 pm
Has anyone actually had success in disabling flickr. I followed the advice in multiple post, including this one, but with no success. I renamed flicker.pl to flickr.pl.back and I also deleted the flickr directory under pictures. Is there a step that I'm missing?

thanks

lon22

Yes we do it all the time ;-)

Follow the rename procedure earlier in the thread - that stops flickr.pl from running in the future. If its already running kill its PID. Having done that you have stopped any more flickr images from being downloaded. However any images already downloaded will still be used by the photoscreensaver. So remove the flickr directory or any specific subdirectories or individual images as required.

Thats it.

Hope that helps you.

Andrew
Title: Re: Disable flickr?
Post by: RichardP on January 23, 2008, 03:19:44 am
Hi 
Well I moved the flickr.pl file and rebooted the machine. I then removed the attributes froom the file and removed the files from the disk and al works fine.
The first lot of pictures i uploaded were about 900k each and they load fine. However the second lot were 2.5mb each and they dont seem to work. Is there a limit on the file size the screensaver can use?

Regards

Make sure the pictures are no more than 1240x1240 pixels.

Best Regards,
Richard.
Title: Re: Disable flickr?
Post by: colinjones on January 27, 2008, 12:03:29 pm
I have renamed the script and killed the process (and subsequently rebooted), added my own pictures and set the attributes using the new feature. And deleted the Flickr files that it had already downloaded.

Unfortunately, before I thought it through, I just deleted the Flickr photos and directories with a sudo rm command...

Then subsequently realised that this wasn't going to clear out the database - no matter, I thought I would just resync. Did that successfully, but it seems that this won't delete it from the database. When I use the file sync section and browse the folders for my pics, it has "Screensaver for MD: *" next to each of them. When I click on the "*" it takes me to the list of all pics marked with the screensaver attribute, and it still lists hundreds of Flickr photos, albeit with "!" next to their name. I could delete them manually, but this would take hours as there are about 14 pages of them and you can't multiple select!

How can I clean up the database given that resync doesn't do it? I have tried to recreate the flickr folder, resync, and then delete it again using the web site, but this doesn't seem to reconnect with the database and clean it up....

Any advice?
Title: Re: Disable flickr?
Post by: RichardP on January 27, 2008, 12:35:02 pm
I have renamed the script and killed the process (and subsequently rebooted), added my own pictures and set the attributes using the new feature. And deleted the Flickr files that it had already downloaded.

Unfortunately, before I thought it through, I just deleted the Flickr photos and directories with a sudo rm command...

Then subsequently realised that this wasn't going to clear out the database - no matter, I thought I would just resync. Did that successfully, but it seems that this won't delete it from the database. When I use the file sync section and browse the folders for my pics, it has "Screensaver for MD: *" next to each of them. When I click on the "*" it takes me to the list of all pics marked with the screensaver attribute, and it still lists hundreds of Flickr photos, albeit with "!" next to their name. I could delete them manually, but this would take hours as there are about 14 pages of them and you can't multiple select!

How can I clean up the database given that resync doesn't do it? I have tried to recreate the flickr folder, resync, and then delete it again using the web site, but this doesn't seem to reconnect with the database and clean it up....

Any advice?

I had the same issue this morning. Does anyone have any suggestions? If not, I'll see if I can write a script that will remove all pictures out of the database that are not on the disk.

Title: Re: Disable flickr?
Post by: colinjones on January 27, 2008, 09:46:29 pm
Richard - the other thing is, has anybody noticed that the playback of the images you add isn't random (don't know if this was true for the Flickr stuff as well) it seems to get stuck on 2 images and goes back and forth between them up to 7 or 8 times, then suddenly seems to find another 2 and moves on... I don't quite get what is going on but I'm sure that's not how it was intended. Unless it is a side effect of having a large number of Flickr images in the database, still, that no longer exist on disk...
Title: Re: Disable flickr?
Post by: RichardP on January 28, 2008, 03:45:48 am
Richard - the other thing is, has anybody noticed that the playback of the images you add isn't random (don't know if this was true for the Flickr stuff as well) it seems to get stuck on 2 images and goes back and forth between them up to 7 or 8 times, then suddenly seems to find another 2 and moves on... I don't quite get what is going on but I'm sure that's not how it was intended. Unless it is a side effect of having a large number of Flickr images in the database, still, that no longer exist on disk...

Curious. I did notice that, but didn't think anything of it, because I was fiddling so much. I might poke around under the hood, although I'll have to find where that is first...
Title: Re: Disable flickr?
Post by: Zaerc on January 28, 2008, 06:35:13 pm
Tried ticking the "Show files who are missing from disk" box in the webadmin's Media Files Sync screen?   They should have a "Delete from Database" button.
Title: Re: Disable flickr?
Post by: RichardP on January 28, 2008, 11:08:10 pm
Tried ticking the "Show files who are missing from disk" box in the webadmin's Media Files Sync screen?   They should have a "Delete from Database" button.

They do, and it works. But it's very tedious doing it one by one. We definately need a delete all or some such.
Title: Re: Disable flickr?
Post by: colinjones on January 29, 2008, 02:01:27 am
Tried ticking the "Show files who are missing from disk" box in the webadmin's Media Files Sync screen?   They should have a "Delete from Database" button.

They do, and it works. But it's very tedious doing it one by one. We definately need a delete all or some such.

Richard - I agree, that would be much better (I have about 200 to delete!), but did you end up making any progress on scripting it?

Actually - Zaerc is right, I can choose that option and delete the whole Flickr folder, with the files presumably as children in the database, this cleaned those out as well! I had to resync my own pictures for some reason, but all OK.
Title: Re: Disable flickr?
Post by: RichardP on January 29, 2008, 05:39:26 am

Richard - I agree, that would be much better (I have about 200 to delete!), but did you end up making any progress on scripting it?

Actually - Zaerc is right, I can choose that option and delete the whole Flickr folder, with the files presumably as children in the database, this cleaned those out as well! I had to resync my own pictures for some reason, but all OK.

I missed that - I was deleting the entries one by one, rather than the entire directory. I'll try it when I get home.

Sorry, Colin, havn't even looked at the script yet. I was out most of the weekend - had out of state visitors.

Zaerc - could you point me toward the webpage and/or PHP file that shows the files which are in the DB but not in the filesystem. I'll take a look at that as the starting point for the script, and also have so I can have a look at whether or not I feel competent enough to attempt to place a "DeleteAll" button on the webpage.

Best Regards,
Richard.
Title: Re: Disable flickr?
Post by: totallymaxed on January 29, 2008, 12:20:40 pm

Richard - I agree, that would be much better (I have about 200 to delete!), but did you end up making any progress on scripting it?

Actually - Zaerc is right, I can choose that option and delete the whole Flickr folder, with the files presumably as children in the database, this cleaned those out as well! I had to resync my own pictures for some reason, but all OK.

I missed that - I was deleting the entries one by one, rather than the entire directory. I'll try it when I get home.

Sorry, Colin, havn't even looked at the script yet. I was out most of the weekend - had out of state visitors.

Zaerc - could you point me toward the webpage and/or PHP file that shows the files which are in the DB but not in the filesystem. I'll take a look at that as the starting point for the script, and also have so I can have a look at whether or not I feel competent enough to attempt to place a "DeleteAll" button on the webpage.

Best Regards,
Richard.

Richard,

Go to Web Admin -> Files & Media -> Media Files Sync

Now look at the bottom of the righthand frame and you will see a "Show files who are missing from disk" check-box... just click it to show the missing from disk files as you browse.

Andrew
Title: Re: Disable flickr?
Post by: Zaerc on January 29, 2008, 09:19:35 pm
...
Zaerc - could you point me toward the webpage and/or PHP file that shows the files which are in the DB but not in the filesystem. I'll take a look at that as the starting point for the script, and also have so I can have a look at whether or not I feel competent enough to attempt to place a "DeleteAll" button on the webpage.
...

I would if I could, but I'm not that familiar with the webadmin site.
Title: Re: Disable flickr?
Post by: RichardP on January 31, 2008, 02:32:58 am
They do, and it works. But it's very tedious doing it one by one. We definately need a delete all or some such.

I've made some progress with placing a button on the webpage. When you click it, it will (hopefully) delete all the files from the current directory which are in the DB, but not on disk.

Is anyone willing to test it? I need to verify that on other systems besides mine, it does not remove from the database any files which exist on the disk, and that it does not have any other unexpected side-effect.

Installation will be a matter of replacing two files on the core (you can save the original ones first, in case you need to go back to the original).

I should have it ready to distribute this evening (morning of the 1st for the British and Americans).
Best Regards,
Richard.

Title: Re: Disable flickr?
Post by: colinjones on January 31, 2008, 12:32:22 pm
Richard - so you are saying this isn't an explicit delete of particular files, but checks if a set of files in a directory actually exist on the disk and deletes them from the db if they don't? So in other words a "clean up" function?

How does it determine if the files are on disk or simply not available if that disk isn't around at the time (disconnected from the network, or simply network issues like I am having at the moment!) Does it distinguish between files that come back as not there, and files that come back as "device offline"?
Title: Re: Disable flickr?
Post by: RichardP on February 05, 2008, 02:56:01 am
Richard - so you are saying this isn't an explicit delete of particular files, but checks if a set of files in a directory actually exist on the disk and deletes them from the db if they don't? So in other words a "clean up" function?

How does it determine if the files are on disk or simply not available if that disk isn't around at the time (disconnected from the network, or simply network issues like I am having at the moment!) Does it distinguish between files that come back as not there, and files that come back as "device offline"?

At the moment, it doesn't verify the files exist on the disk - but read on.

What it does is delete all the files from the DB that are in the list of files missing from the disk. (This may sound confusing until you look at the screen). This list is originally created (when you open the page or refresh it), by querying the DB with a SQL statement which obtains all the files in the current directory which are marked (in the DB) as missing AND which do not exist on disk.

So the upshot of it all is you would open the page and down the bottom you would see a list of missing files, and a button which offers to delete all of them. If the files are missing because the storage device is offline, you would know it and not use the button, I guess. Alternatively you could bring the device online, re-sync the directory, then hit the delete-all button to delete files which truly are missing from device.

Does this sound plausible, or am I misreading the code?

Colin, if you have storage devices that are sometimes offline, I'd really appreciate your testing the new page.

Best Regards,
Richard.

Title: Re: Disable flickr?
Post by: colinjones on February 05, 2008, 12:24:13 pm
You might see in other threads that I have been suffering from my network media being permanently offline! Couldn't bring it online over many builds.

I found a workaround today - finally, and have demonstrated that there is definitely an error of logic (or straight bug) in the LMCE code for detecting if network media is online or not. I have only just got my media online properly for the first time since buying all this hardware over 4 weeks ago, so you'll forgive me if I play with it for a while before starting to screw with my database :) maybe just before I start rebuild 10! In any case, I have MANY other issues to deal with that have languished as lower relative priorities as a result of this one, so I better get cracking on those now!

Will respond to your PM on USBIRT tomorrow.

Col.