ReconX Posted December 17, 2020 Share Posted December 17, 2020 I have a small program I am working on to store physical copy blu-rays in a database. What happens so far is that you input, "Name" and "Year", press a button, and it creates a file in the format of "Name (Year).mkv". These files are stored in a folder that my Plex server can see, and that creates a list in Plex of the copies that I have. But, I also want to add "UPC" to that information without affecting the filename. I have a listview that sees the folder, and displays it in the GUI. Would it be best for me to record this data in a txt file in the format of; "Name|Year|UPC", and have the listview call the information that way? How do I update the txt file if I delete or change a file? I'm not looking for anyone to write and provide me the code I need, I just want to be pointed in the correct direction. Link to comment Share on other sites More sharing options...
Danp2 Posted December 17, 2020 Share Posted December 17, 2020 UPC as in Universal Product Code? Can you share why you would need that information? As far as where to place it, how about in the file itself? Looks like the file spec supports tags and comments. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
ReconX Posted December 17, 2020 Author Share Posted December 17, 2020 2 minutes ago, Danp2 said: UPC as in Universal Product Code? Can you share why you would need that information? As far as where to place it, how about in the file itself? Looks like the file spec supports tags and comments. Yes, Universal Product Code. I want to store this information so that I can revisit it later. Some movies have many variations of releases such as the movie, "Uncle Buck". It comes in a single release blu-ray, but also as a double feature including "Fletch". Link to comment Share on other sites More sharing options...
JockoDundee Posted December 17, 2020 Share Posted December 17, 2020 42 minutes ago, ReconX said: I want to store this information so that I can revisit it later. But if you can scan the UPC can’t you skip the data entry of the title/year altogether? Code hard, but don’t hard code... Link to comment Share on other sites More sharing options...
ReconX Posted December 18, 2020 Author Share Posted December 18, 2020 25 minutes ago, JockoDundee said: But if you can scan the UPC can’t you skip the data entry of the title/year altogether? Plex unfortunately doesn't pick up UPC codes. My initial plan was to just input the UPC code and have the other information generated from a source. bluray.com has the feature where I can type in the UPC code and it finds the exact copy that I have. But, wouldn't bluray.com need an API for me to get that information? Uncle Buck \ Fletch - UPC = 025192193392 Link to comment Share on other sites More sharing options...
Danp2 Posted December 18, 2020 Share Posted December 18, 2020 1 hour ago, ReconX said: But, wouldn't bluray.com need an API for me to get that information? You could screen scrape it with the built-in IE commands or with Webdriver.There's also this -- https://www.barcodespider.com/025192193392 and they offer an API, but it's not free. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
jchd Posted December 18, 2020 Share Posted December 18, 2020 For storage and flexible querying of such data, I'd recommend looking at SQLite. See help. There's a small learning curve but it's worth the burden in many, many cases. This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now