#1881
|
|||
|
|||
![]()
Danke für die Konkretisierung
![]() Ich möchte eine Textdatei (.txt) mit folgendem Inhalt (so ähnlich wie das JDownloader bei youtube bereits macht): 1. Zeile der Link: https :// auf1. tv/aufrecht-auf1/ernst-wolff-im-interview-welche-minderheit-uns-lenkt-und-was-sie-will/ bzw.: https :// auf1. eu/videos/watch/413e81fe-10c8-45f5-b2fd-5bdd274da888?title=0&warningTitle=0&peertubeLink=0 Die nächsten Zeilen: Der Text aus der Video-Beschreibung. @ mgpai: Danke, falls du irgendwann Zeit findest ![]() |
#1882
|
|||
|
|||
![]()
So jetzt müsste alles wichtige drin stehen
![]() Die letzten Posts, einschl. diesem: 5, kannst du gerne wieder löschen, wenn du möchtest; der Übersichtlichkeit halber ![]() Last edited by mirino; 29.09.2021 at 17:17. |
#1883
|
|||
|
|||
![]() Quote:
![]() |
#1884
|
|||
|
|||
![]()
Thanks:
To make scripts is not difficult for me. To find time is very difficult for me. I hope i find time, thats not easy for me at this time and weeks. I will start to read this thread from beginning, if i find time there for. I will try my frist try-script. If it comes very late, i would be happy, you can give me a first script, that i can try, if it works ![]() Last edited by mirino; 29.09.2021 at 17:42. |
#1885
|
||||
|
||||
![]()
@mirino
Deine Antwort scheint sich für mgpai eher so zu lesen als hättest du wirklich einfach keine Zeit/Lust, ein Script selbst zu schreiben. Falls du dich unglücklich ausgedrückt hattest und eher sagen wolltest, dass du dir das mangels js Kenntnissen nicht zutraust solltest du ihn das ggf. wissen lassen ansonsten wartet er wohl auf deinen ersten Versuch, selbst eines zu erstellen ![]() Grüße, psp
__________________
JD Supporter, Plugin Dev. & Community Manager Erste Schritte & Tutorials || JDownloader 2 Setup Download ----------------------------------- On Vacation / Im Urlaub Start: 2023-12-09 End: TBA |
#1886
|
|||
|
|||
![]()
danke
![]() |
#1887
|
|||
|
|||
![]()
@mgpai: Here is my first try, more the idea, not a working script. Can you help me, to make it work?
Code:
// Write a .txt-file with Download-Link, fileName and the Video-Description. // Trigger: "A Download Started" if (link.isStarted () && link.isVideo ()) { var fileName = link.getName () var fileFolder = link.package.getDownloadFolder () + "/" ? var fileFolderName = fileFolder + fileName + "\.txt" var downloadLinkAsString = link.name var text = downloadLinkAsString + "\n" text = text + fileName + "\n\n" text = text + link.getComment () if (getPath (fileFolderName).exists ()) getPath (fileFolderName).rename (fileFolderName + ".bak") writeFile (fileFolderName, text, true) } 1. Contains link.package.getDownloadFolder () a "/" at the end? --> Answer: No 2. Is link.getComment () the Description on the HTML-Page of the Video? --> Answer: Returns the contents of the 'comment' field of link property, which is either set automatically by the plugin, or manually by the user. 3. Is "if (link.isStarted ()" sufficient to enable the triger "a download is started for each link that is downloaded"? --> Answer: Better to use 'stopped' trigger and run script only after link is 'finished'. 4. How can i strip of the ending (e.g. .mp4) of fileName or can we get a function getNameWithoutEnding ()? --> Answer: Check example in my script. 5. Has the Event-Scripter the functions: isVideo (), isAudio (), isPicture () and isBook () or can we get it for using in Event-Scripter? --> Answer: Can use 'myDownloadLink.getLinkInfo()' method. Last edited by mirino; 30.09.2021 at 10:43. |
#1888
|
|||
|
|||
![]() Quote:
![]()
Notes on your script:
Code:
/* Write link info to file Trigger: A download stopped */ if (link.finished && link.host == "joinpeertube.org") { var ext = getPath(link.downloadPath).extension; var file = link.downloadPath.replace(ext, "txt"); var data = [link.contentURL, link.name + "\n", link.comment].join("\n"); try { writeFile(file, data, true); } catch (e) {}; } Note: I use dot notations (undocumented) wherever possible, to access the properties instead of the documented object methods. |
#1889
|
|||
|
|||
![]()
Thanks for your script. I test it and it works
![]() But the text under the Button "Mehr anzeigen v" is missed. Can this be implemented to get with "link.comment"? I have edit your answers into my last post for the reason of easy reading. My new questions: 5. Is "link.host == "joinpeertube.org"" equal "link.getLinkInfo() == "joinpeertube.org""? 6. Does this "writeFile (file, data, true)" append Data to file or how can i append Data? 7. "To access the download url, you have to query contentURL and use pluginURL as fallback if necessary." "to query contentURL" is "link.contentURL". What do you mean with "use pluginURL" and ist this in your script example? 8. Thanks for this ![]() dot notations (undocumented), to access the properties, e.g. link.finished; link.name; link.comment; instead of the documented object methods, e.g. link.isFinished (); link.getName (); link.getComment (); Did you have more examples? I think a list could be usefull for me and other users ![]() Last edited by mirino; 30.09.2021 at 11:08. |
#1890
|
|||
|
|||
![]()
5. No. link.host or link.getHost(), returns the plugin host. link.getLinkInfo() returns for e.g., the following:
Code:
{ "group" : "VideoExtensions", "desc" : "Video File", "partNum" : -1 } Since the host is a video host, the script just queries the 'host name', instead of 'file type'. 6. 'true' = append, 'false' = do not append (this will not overwrite the file, but throw an error if a file with same name exists on disk). 7. The contentURL method for this host always returns the download url so fallback option is not required. For some hosts where the contentURL is protected (e.g. filecrypt), you can use pluginURL as fall back. For e.g.: Code:
var downloadUrl = link.contentURL || link.pluginURL; 8. Correct. Happy scripting. ![]() |
#1891
|
|||
|
|||
![]() Quote:
![]() |
#1892
|
|||
|
|||
![]()
@psp: Can you solve it?
@mgpai: see my post down Last edited by mirino; 30.09.2021 at 15:24. |
#1893
|
||||
|
||||
![]()
@mirino
1. Fixed truncated description for auf1.tv. Wait for the next update. You will have to remove- and re-add all affected URLs in order to get the full description as comment. 2. URLs are hidden for all non-moderators so mgpai cannot see your URLs. You have to remove the "http" so he can see them or even better: Send them to him via PN. ... but he won't be able to do anything about it because if 3: 3. Seems like either the vimeo video itself does not provide any description or we're not yet srtting that. I'll check this in a moment... -psp-
__________________
JD Supporter, Plugin Dev. & Community Manager Erste Schritte & Tutorials || JDownloader 2 Setup Download ----------------------------------- On Vacation / Im Urlaub Start: 2023-12-09 End: TBA |
#1894
|
||||
|
||||
![]()
@mirino
Unser Vimeo Plugin setzt die Videobeschreibungen grundsätzlich. Es handelt sich hier also nicht um einen Fehler! In diesem Fall ist jedoch auf vimeo selbst keine Beschreibung gegeben und unser Plugin kann natürlich nicht einfach erraten, dass es im Kontext/Referer irgendeine Webseite (in diesem Fall "wahrheitskongress.de/bla...") besuchen- und dort irgendeine Information herausziehen soll. Mit etwas mehr Arbeit könnte man das ebenfalls per EventScripter Script lösen oder eben ein eigenständiges Plugin basteln, das die Beschreibung herauszieht und auf die Vimeo Links setzt. Letzteres wird es von unserer Seite aus nicht geben, da es mehr Workaround als Feature ist daher bitte selbst ein entsprechendes Script oder Plugin schreiben... oder dem Uploader dieser Vimeo Inhalte bescheid geben, er möge doch bitte die Beschreibung mit auf Vimeo packen ![]() Grüße, psp
__________________
JD Supporter, Plugin Dev. & Community Manager Erste Schritte & Tutorials || JDownloader 2 Setup Download ----------------------------------- On Vacation / Im Urlaub Start: 2023-12-09 End: TBA |
#1895
|
|||
|
|||
![]()
deleted, because down new
Last edited by mirino; 30.09.2021 at 15:36. |
#1896
|
|||
|
|||
![]()
Das passt schon. Vielleicht versuche ich mich mal später an einem Event-Scripter-Script dafür (sehr viel später wahrscheinlich). Ich brauche allerdings die .txt-Datei mit den ersten beiden Zeilen, also ohne Video-Description. Ich freue mich sehr, dass mgpai mich so schnell und kompetent unterstützt.
![]() Viele Grüße zurück, Mirino Last edited by mirino; 30.09.2021 at 15:19. |
#1897
|
|||
|
|||
![]()
Vielen Dank für das schnelle Bearbeiten. Es funktioniert
![]() |
#1898
|
|||
|
|||
![]()
@mgpai: I am very happy that you support me so quickly and competently.
![]() I have tested this link (*): player.vimeo .com/video/605104717?h=a3aecf410c with password (without 3 Blanks): https ://www .wahrheitskongress .de/ On the vimeo-site there is no description, hence exists no link.description. 9. The script does'nt create a textfile. How can we fix it? I assume link.host != "joinpeertube.org". How must we code?: Code:
if (link.finished && (link.host == "joinpeertube.org" || link.host == "???")) { 10. It comes, per Copy & Clipboard, from this site: www .wahrheitskongress .de/2021-tag-1-1-interview-mit-die-weisse-bueffelkalbfrau/ 11. Is there any solution to get the link (*) from 10.? 12. Is there any solution to get the description from 10.? Last edited by mirino; 30.09.2021 at 15:38. |
#1899
|
||||
|
||||
![]() Quote:
Quote:
Jiaz wird sich das anschauen. In den Rohdaten ist der Text definitiv korrekt. Grüße, psp
__________________
JD Supporter, Plugin Dev. & Community Manager Erste Schritte & Tutorials || JDownloader 2 Setup Download ----------------------------------- On Vacation / Im Urlaub Start: 2023-12-09 End: TBA |
#1900
|
||||
|
||||
![]() Quote:
-psp-
__________________
JD Supporter, Plugin Dev. & Community Manager Erste Schritte & Tutorials || JDownloader 2 Setup Download ----------------------------------- On Vacation / Im Urlaub Start: 2023-12-09 End: TBA |
![]() |
Thread Tools | |
Display Modes | |
|
|