Jump to content
LaunchBox Community Forums

Recommended Posts

You will probably get more eyes on this if you upload it to the appropriate section of the downloads part of the forums.

Third-party Apps and Plugins - LaunchBox Community Forums (launchbox-app.com)

I have to say though that it doesnt appear to be working for me. Im trying with Cyberpunk 2077, which does have a video link in the metadata which is to the 2018 E3 trailer at 1:40 long, however the plugin returns this.

755753001_Screenshot(84).thumb.png.f325592b0fb520e2dcd002954fc39a68.png

 

 

 

Link to comment
Share on other sites

1 minute ago, maikeru1986 said:

i do feel it is not release worthy and is probably better to be tested first, like your issue with Cyberpunk2077.

Yeah thats fair. Maybe you can get a few people testing here and see what the results are, as obviously im a test group of one, and it could totally be me being a dumbass or something unique to my system. :) 

Link to comment
Share on other sites

1 hour ago, neil9000 said:

 as obviously im a test group of one, and it could totally be me being a dumbass or something unique to my system. :) 

Well, even if it's unique to your system it's still valuable input.

 

Did you place "youtube-dl" in both "system32" and "SysWOW64"? if not, could you do so and try again?

I'm thinking in needs to be in both because some type of redirection is happening. if so, perhaps I could fix that.

 

Edited by maikeru1986
Link to comment
Share on other sites

34 minutes ago, maikeru1986 said:

Well, even if it's unique to your system it's still valuable input.

 

Did you place "youtube-dl" in both "system32" and "SysWOW64"? if not, could you do so and try again?

I'm thinking in needs to be in both because some type of redirection is happening. if so, perhaps I could fix that.

 

Yeah i did, i put it in the system32 folder first and got the image i sent you. So i then also added it to the 64 folder also, i even closed launchbox and restarted, same UI error. Hmm, now i think sorta rationally, maybe i shulda restarted Windows itself after as well, as its the Windows folders themselves.

 

Link to comment
Share on other sites

Hey, thanks for trying again.

I think since "youtube-dl" is 32bit it is called from system32, but on 64bit systems it redirects to sysWOW64, which is why it needs to be in both. I thought this was your issue but I guess not. or maybe it's launchbox being 64bit, i honestly am not really sure.

I updated it to find the system directory and call from their so you can try v0.1.1 if you want. Now "youtube-dl" only needs to be in sysWOW64. However i think its best to just put everything in launchbox's plugins directory and call it from there.

will follow with another update soon.

Link to comment
Share on other sites

I'm assuming launchbox may be in different locations from user to user, so this is why i went for system folder initially.

I'm thinking now this is a bad idea, but am not sure how to get the plugins folder. I'm not sure if using a relative path will work.

I could get it from the "videopath" then edit the path to point to the plugins folder? but that seems like a hack (would be inline witht the rest of the program though lol).

Any ideas are very welcome. 

Link to comment
Share on other sites

2 hours ago, maikeru1986 said:

Any ideas are very welcome. 

In VSScraper.cs, add

private string pluginPath = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + "\\";

In the (4) "Process youtube_dl = new Process();" sections, change:

// youtube_dl.StartInfo.FileName = $@"{GetSystemDirectory()}\youtube-dl.exe";
// TO
youtube_dl.StartInfo.FileName = pluginPath + "youtube-dl.exe";

And place "youtube-dl.exe" inside the ../Plugins/Vidsnap Scraper/  folder.  Then there's no issue with the System32 or WoW-whatever folder issues. ;) 

Well, it at least worked the one time I tried. ?

  • Thanks 1
Link to comment
Share on other sites

1 hour ago, C-Beats said:

Should be able to do something similar to the below to get your plugin folder. Replace "PluginName" with the name of your plugin folder.


Path.Combine(Directory.GetParent(Directory.GetCurrentDirectory()).FullName, "Plugins", "PluginName")

 

Great thanks.

would this below also work or is it somehow bad practice or something? just curious

Path.Combine(Directory.GetCurrentDirectory(), "Plugins", "Plugin_Name")

should give ~Launchbox\Plugins\PluginName no?

Actually realised i've used this previously in another app, such a dumbass trying to overcomplicate things.

Thanks!

Link to comment
Share on other sites

5 minutes ago, JoeViking245 said:

In VSScraper.cs, add


private string pluginPath = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + "\\";

In the (4) "Process youtube_dl = new Process();" sections, change:


// youtube_dl.StartInfo.FileName = $@"{GetSystemDirectory()}\youtube-dl.exe";
// TO
youtube_dl.StartInfo.FileName = pluginPath + "youtube-dl.exe";

And place "youtube-dl.exe" inside the ../Plugins/Vidsnap Scraper/  folder.  Then there's no issue with the System32 or WoW-whatever folder issues. ;) 

Well, it at least worked the one time I tried. ?

I've just tried out @C-beats recommendation and it works fine.

I'll try yours too  (will just have to figure out how it works - for learing purposes).

Thanks!

Link to comment
Share on other sites

2 minutes ago, maikeru1986 said:

 (will just have to figure out how it works - for learing purposes).

There's a multitude of ways to get a directory/folder.  The 2 suggested are just a drop in the bucket of the possibilities.  The one I threw in may or may not be the best ("correct") way, but it worked.  lol

Link to comment
Share on other sites

4 minutes ago, C-Beats said:

The way @JoeViking245 posted would work as well but you need to get the parent of that location (or should) because any calls like that will direct you to the \\LaunchBox\Core\ folder and you want to start the Path.Combine at the \\LaunchBox\ level.

Interesting, I've tested it out and it seems to give me the path of where the dll is.  i.e. C:\Users\<Username>\LaunchBox\Plugins\Vidsnap_Scraper

It seemed to me that "GetExecutingAssembly()' referred to the dll.

Thanks, i'll have a look into it.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...