News:

Support for jDownloads 3 has been ended
Since 17 August 2023 Joomla.org has discontinued support for Joomla 3.x. Therefore, we will no longer offer official support for our Joomla 3 jDownloads version 3.9.x from January 2024.
Please update your website to the latest Joomla version (Joomla 4 or Joomla 5) as soon as possible. Afterwards, please update jDownloads to the latest published version. The longer you delay, the more difficult the upgrade process for your website is likely to be.

Main Menu
Support-Forum

Screenshots/Thumbnails: Neuerstellung

Started by muecke06, 20.03.2017 16:07:33

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

muecke06

Hallo zusammen,

ich hänge an einem Problem fest, wofür bis hierhin keine Lösung finden konnte. Auch die Forum-Suche brachte keine entsprechenden Ergebnisse.

Aktueller Stand:
Kategorien: 1807
Downloads: 13095

Daten werden von Windowsservern per FreeFileSync täglich in die entsprechenden Ordner des Hostings synchronisiert. Per Cron läuft die scan.php täglich und aktualisiert entsprechend das Downloadportal.
98% der Daten sind geschützt, also nur nach Login erreichbar. Bevor jemand fragt, dies ist ein Fachhändlerportal. Hier stellen wir unseren weltweiten Fachhändlern besondere und sensible Daten zur Verfügung.
So weit so gut funktioniert das auch alles.

Zum Thema: Screenshots/Thumbnails: Neuerstellung
Im Ordner: \images\jdownloads\screenshots: 5218 Dateien
Im Ordner: \images\jdownloads\screenshots\thumbnails: 5216 Dateien

Ich schließe daraus, das die Thumbnails aus den Screenshots erstellt werden. Eine Neuerstellung der Thumbs ist ja per Konfiguration in jDownloads möglich.
Auch soweit OK.

Aber es gibt nur etwas 5218 Dateien - also Screenshots. Die Konfiguration ist so, das diese aus jpg und pdf erstellt werden sollen und unter dem Strich gibt es wesentlich mehr Dateien von denen (etwa 9000 insgesamt)

Frage:
Funktioniert dies per scan.php nicht?
Habe ich eine Möglichkeit die Screenshot Erstellung (also alles NEU) per Hand anzukurbeln?

Datenbeispiel:
Ordner -|- deutsch / 123.jpg
            |- englisch / 123.jpg
      
bedeutet: Ich habe gleichnamige Dateien in verschiedensten Unterordnern. Diese Struktur finde ich aber nicht im Ordner \screenshots wieder. Ich gehe deswegen davon aus, das es für die Datei 123.jpg nur einen Screenshot gibt, richtig?

Was kann ich tun, damit ich für jedes jpg und jede PDF auch einen entsprechenden Screenshot habe?
123.jpg enthält entsprechend der Sprache und aichtbare Schriftanteile. Wie kann ich es bewerkstelligen, das ich für die deutsche und auch die englische Version von 123.jpg ein ensprechenden Screenshot/Thumbnail bekomme?

Gruß Steffen
  •  

ColinM

Steffen
First thank you for the clear explanation, even when I used Google Translate as my German is only good as a tourist!

One feature of jD is that you can have Download with the same title in different categories, actually you can use the same title in the same category.  This is used for example where one has multiple versions of the same downloadable file.  Classically one would the version to distinguish them to the user but that is not necessary in principle.

The link to the relevant image, and in consequence the thumbnail, is held in the database entry for the the Download so there is no apparent need for them to be indexed explicitly in the directory.

The two pics below were created from the front end. First one shows two Downloads with identical titles.  Each had a png file added which also dad the same name but the actual pics were different as can be seen.
The second pic shows the directory listing of the screenshots directory.  JD automatically renamed the second image so in that location the file names are unique.

So the basic mechanism works OK.  But I have not yet tried with uploading files to the jDownloads dir and activating a scan.

Before I test with the upload and then auto monitor could you please advise on your settings in the jD Config - Pictures Tab for the Thumbnails section.  Also please note the comment that in the 'Use this also for Automonitoring' there is the comment

" Warning: It is not recommended to use this option when adding a large number of image files because server are timeouts may occur."
This comment should also been added to making pdf thumbnails.

So it might be the case one time you uploaded many files and  that the server ran out of time.

Colin
Colin M
  •  

muecke06

Hallo Colin,

danke für deine Erklärung.
Dann habe ich den Grundmechanismus von jDownloads ja verstanden und liege mit meinen Vermutungen richtig.

Konfiguration:
Thumbnailerstellung ist für pdf UND jpg aktiviert, AUCH bei der automatischen Überwachung der Verzeichnisse.

Die täglichen Änderungen durch die scan.php belaufen sich vielleicht im Schnitt auf 20 Dateien. Ich denke das dies der Server schafft und keinen Timeout verursacht.

Für mich ist es aber wichtig, den Bestand erst einmal komplett mit Thumbnails zu versehen.
Habe ich eine Möglichkeit, die Screenshoterstellungen (vielleicht mit Verzeichnisangabe) händisch zu starten und so die Daten Stück für Stück zu vervollständigen?
Wird die Arbeit von jDownloads während der automatischen Überwachung protokolliert, so daß Timeouts etc. zu erkennen wären? Wenn ja, wo kann ich die Logs dafür finden?

Eine Idee von mir wäre noch:
1. jDownloads offline zu schalten
2. alle Kategorien und Downloads löschen
3. Alle Daten im Downloadverzeichnis löschen
4. Screen und Thumbs löschen
5. Alle Daten "Portionsweise" wieder hineinkopieren, zwischendrin die scan.php ansteuern
6. ggf. LogFiles etc. prüfen ob jDownloads/Server richtig gearbeitet haben.

Neue Anwendung für die Zukunft:
Vielleicht ist es eine Idee, die Ordnerstruktur der Downloadverzeichnisse unterhalb von screenshots zu übernehmen und die screenshots (Dateiname.jpg) und Thumbails (Dateiname_thumb:jpg) dort einzusortieren.
Dann gäbe es für mein angeführtes Beispiel für jedes jpg gleichen Namens auch den entsprechend richtigen Screenshot.
Wäre eine Umsetzung möglich/sinnvoll?

Ich habe etwa 13000 Files, davon sind ca. 9000 Files JPG und PDF.
Wie kann ich das sinnvoll reparieren/lösen?

Danke und beste Grüße
Steffen
  •  

ColinM

Steffen
For logging you need to ensure that field "Activate log function for Downloads? " in jD Config - Downloads Tab is set to Yes. That is the default setting.  You can look at the log file by clicking on Logs panel in jD Control panel.  But it does not record a timeout because if the server has timed out jD does not know!

Arno is just rewriting the scan.php routine to make it faster and it will go into test in the next few days.  It will be part of the 3.2.47 update which will be released as soon as testing of new facilities has been completed.

Extract from monitor log  Note two identical files in different categories
Download added Public Downloads/topcat-sub1b/97-downloada3-1.pdf
Download added Public Downloads/topcat-sub1b/Steffen01.png
Download added Public Downloads/topcat-sub1a/97-downloada3-1.pdf
Download added Public Downloads/topcat-sub1a/Steffen01.png
Download added Public Downloads/topcat-sub1a/18-test.pdf
Download added Public Downloads/topcat-sub1a/Steffen02.png

The Downloads are created OK. but if the files with same name are created in front end then one of the files is renamed and then each Download has an individual image created.  However if the creation is via the Scan monitor the Downloads are created OK but there is only one pic created by name so we now have two downloads sharing the same picture.  So I have reproduced your problem.  More details are shown in the attached pictures. It also applies to the Thumbnails of course.

I understand your suggestion is that the images/jdownloads directory should follow the same structure as the main jdownloads directory.  This would solve the problem but I do not think we can do this in the present jD 3.2.x series, but I will ask Arno what are his thoughts. Another solution is to create unique names for the created images based on say the date and a random number. Obviously a temporary solution is not to use the same file name.

Solving the current problem you have needs more thought.

Colin

[gelöscht durch Administrator]
Colin M
  •  

Arno

Hallo Steffen,
Ich werde mir das heute (oder spätestens morgen) genauer ansehen. Bin unterwegs.
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •  

muecke06

Hallo Arno, hallo Colin,

vielen Dank für euren Einsatz.
Ich sehe das ihr die Punkte reproduzieren konntet und ihr Sie verstanden habt.

Ich kann euch gern mit Tests (Backup-Hosting) auf unserem umfangreichen jDownload-Portal unterstützen.
Mein Englisch ist leider sehr begrenzt ;-/, wenn es ins Detail geht sollten wir deutsch sprechen ;-)

Idee:
unter Konfiguration -> Bilder gibt es den Punkt: "Alle Thumbnails beim Speichern neu erstellen?"
Theoretisch könnte man hier auch einen Punkt "Alle Screenshots beim Speichern neu erstellen?" ergänzen.
Sollte es eine Anpassung in Sachen Dateiname für die Screenshots geben, wie Colin erwähnt, könnte man so alle Screenshots neu erstellen lassen.

Auf der anderen Seite habe ich Zweifel, das dies bei 9000 Dateien (wie bei uns) erfolgreich abgeschlossen wird. Ich denke das da bei vielen der Server streikt.
Wenn eine solche Funktion auf bestimmte Kategorien/Subkategorien anwendbar wäre, dann kann man sich bei solch großen Datenmenge langsam durcharbeiten.

Beste Grüße
Steffen
  •  

Arno

Hallo Steffen,
entschuldige bitte das ich mich erst am Wochenende darum kümmern konnte.

QuoteFür mich ist es aber wichtig, den Bestand erst einmal komplett mit Thumbnails zu versehen.
Habe ich eine Möglichkeit, die Screenshoterstellungen (vielleicht mit Verzeichnisangabe) händisch zu starten und so die Daten Stück für Stück zu vervollständigen?
Die aktuell integrierte Funktion kann dies nicht leisten. Für solch eine große Anzahl war sie auch nicht vorgesehen und du bist wohl der einzige in 10 Jahren mit einer solch großen Anzahl.

QuoteWird die Arbeit von jDownloads während der automatischen Überwachung protokolliert, so daß Timeouts etc. zu erkennen wären? Wenn ja, wo kann ich die Logs dafür finden?
Nein diese Daten werden bisher nicht erfasst.

QuoteEine Idee von mir wäre noch:
1. jDownloads offline zu schalten
2. alle Kategorien und Downloads löschen
3. Alle Daten im Downloadverzeichnis löschen
4. Screen und Thumbs löschen
5. Alle Daten "Portionsweise" wieder hineinkopieren, zwischendrin die scan.php ansteuern
6. ggf. LogFiles etc. prüfen ob jDownloads/Server richtig gearbeitet haben.
Ja das könntest du probieren. Allerdings wäre es dann wohl ratsam auch mit entsprechend großzügigen Server Einstellungen zu arbeiten. Allerdings solltest du dich im Anschluß daran hüten, wieder eine "Neuerstellung" über die Konfiguration  zu starten. Da dies erneut mit Timeouts abbrechen würde.

Ideal wäre für deinen Fall ein externes seperates Script, welches durch die Nutzung von Sessions praktisch auch stundenlang laufen könnte, da es sich in kurzen Abständen immer wieder neu aufruft. Ein solches Script könnte ich dir aber nicht kostenlos erstellen.

Quote
I understand your suggestion is that the images/jdownloads directory should follow the same structure as the main jdownloads directory.  This would solve the problem but I do not think we can do this in the present jD 3.2.x series, but I will ask Arno what are his thoughts. Another solution is to create unique names for the created images based on say the date and a random number. Obviously a temporary solution is not to use the same file name.
Colin, I think the biggest problem is for steffen to create succesful the missing thumbnails.
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •  

muecke06

Hallo Arno, hallo Colin,

Arno, das stimmt.
Mein größtes Problem sind die fehlenden Thumbnails. Hier wäre es sicher sinnvoll, eindeutige Zufallszahlen oder ähnliches anstelle der Dateinamen zu verwenden. Wenn dies integriert/angepasst werden könnte, dann wäre ich euch unendlich dankbar.

Im 2. Schritt würde ich dann unser Downloadportal Stück für Stück mit oben genannten Schritten einmal neu aufbauen. Ich denke das funktioniert.

Wenn dies gemacht ist, würde es dann nur noch täglich minimale Änderungen am Dateibestand geben, was die scan.php dann anschließend problemlos leisten kann.

Gruß Steffen
  •  

Arno

QuoteHier wäre es sicher sinnvoll, eindeutige Zufallszahlen oder ähnliches anstelle der Dateinamen zu verwenden. Wenn dies integriert/angepasst werden könnte, dann wäre ich euch unendlich dankbar.
Hier verstehe ich nicht ganz was du meinst.
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •  

muecke06

Hallo Arno,

siehe den Eingangspost, Stichwort "Datenbeispiel".
Colin hat dies in Post 3 nachvollzogen und bestätigt.

Kurz und Knapp:
Habe ich innerhalb ALLER downloads 2 Dateien mit gleichen Dateinamen, wird für beide Dateien das gleiche Thumbnail benutzt (da im selben Ordner abgelegt). Kommt eine 3.Datei mit gleichem Namen hinzu, wird hier ein Thumbnail generiert, das bestehende überschrieben und dieses Thumbnail wird dann für alle 3 Dateien benutzt.

Ich vermute das der Dateiname zum passenden Thumb per DB zum download festgehalten wird, von daher ist es egal wie die Datei heißt. Ein eindeutiger Name würde dann dieses Problem lösen.

Gruß Steffen
  •  

Arno

QuoteColin hat dies in Post 3 nachvollzogen und bestätigt.
Ja richtig. Ich habe die thumberstellung leicht überarbeitet und werde hier noch am WE eine aktualisierte Datei posten.
Wäre nett wenn du die dann einmal testen könntest.
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •  

ColinM

@Arno
As each Download has a unique ID perhaps a solution would be to append that id to the picture name when creating/editing a Download.  It could be added to the code for all future Downloads, that is a retrofit would not be necessary.

This could be done for video and audio files as well so that they also get unique names.

On the challenge of re-sizing to get icons I would suggest a separate tool that could select the starting category; that is the tool would work down the limited directory tree.  If no category selected then default to all.  Could add not to Config to direct people to the Resize Tool.  In general I would suggest that the Config is not a place where a large 'action' should occur and that maybe jD should make more use of tools for these more intensive action.
Colin
Colin M
  •  

Arno

@Colin,
Your idea with the ID sounds good. But I have in the moment not the time for it. So I have only the currently method modified a little bit. Maybe can we use the ID a little bit later.

You have right, the configuration part is not the right place for the image recreation process. I want to move it to the tools page. But first in the new 3.7 series.
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •  

ColinM

Arno
Yes first the new version v47 for Joomla! 3.7 with php 7 etc
Colin
Colin M
  •