Author |
Message |
Registered: March 13, 2007 | Reputation: | Posts: 17,334 |
| Posted: | | | | I was wondering if I am just missing it... but is there is a way to filter on what you have locked?
Say for example I wanted to see all the profiles that I have the Special Features section locked for.
Say for example I ordered a box set that originally came with a book... but later releases came without the book. I got the later release... so I remove the book from my Other Features and lock the Special Features section. Now I know I have several things such as this in my collection. Either because I got a later release... or I bought used and they didn't have the book/statuette... whatever to sell with it.
Now say something is added to the program in the Special Features section in the next update. So now I want to update these profiles... knowing I wouldn't get the updates from online since they are locked. If I could filter on all profiles I have the Special Features locked it would make it easy for me to update the ones I need to without just trying to remember what all profiles I have Special Features locked on. | | | Pete |
|
Registered: March 14, 2007 | Posts: 2,337 |
| Posted: | | | | Quoting Addicted2DVD: Quote: I was wondering if I am just missing it... but is there is a way to filter on what you have locked? Not that I know of. Quote: Now say something is added to the program in the Special Features section in the next update. So now I want to update these profiles... knowing I wouldn't get the updates from online since they are locked. You do get updates even the fields are locked. Just unlock in preview window if you see an update for a field you have locked. Quote: If I could filter on all profiles I have the Special Features locked it would make it easy for me to update the ones I need to without just trying to remember what all profiles I have Special Features locked on. Now I don't follow... You mean you want to edit those fields yourself or get an update from online db? |
|
Registered: March 14, 2007 | Reputation: | Posts: 6,744 |
| Posted: | | | | Not natively, no. And I don't think CSV Export exports the locks. But this gave me the opportunity to toy with Linq and Lamda Expressions a bit more: Quote:
Only interesting for programmers:
Spoiler: (Select to view)
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Xml.Linq;
namespace DoenaSoft.FindSpecialFeatureLocks { public static class Program { public static void Main(String[] args) { try { if (args == null || args.Length == 0 || File.Exists(args[0]) == false) { Console.WriteLine("Invalid call. Please provide proper file name."); return; } XDocument doc = XDocument.Load(args[0]); IEnumerable<XElement> allDvds = doc.Element("Collection").Elements("DVD"); IEnumerable<XElement> filteredDvds = allDvds.Where(dvd => dvd.Element("Locks").Element("Features").Value == "true"); var dvdInfos = filteredDvds.Select(dvd => new { Name = dvd.Element("Title").Value, UPC = dvd.Element("UPC").Value, } ); foreach (var dvdInfo in dvdInfos) { Console.WriteLine(dvdInfo.Name); Console.WriteLine(dvdInfo.UPC); Console.WriteLine(); } } catch (Exception ex) { Console.WriteLine(ex.Message); } finally { Console.WriteLine("Press <Enter> to exit"); Console.ReadLine(); } } } }
This is a one-purpose tool. It'll give you exactly what you want: All your DVDs with a lock on Special Features. Nothing more, nothing less. You need to call it with a parameter where your exported collection.xml is stored, e.g. Quote:
FindSpecialFeatureLocks.exe D:\collection.xml
http://doena-soft.de/dvdprofiler/3.8.1/FindSpecialFeatureLocks.zip | | | Karsten DVD Collectors Online
| | | Last edited: by DJ Doena |
|
Registered: March 13, 2007 | Reputation: | Posts: 17,334 |
| Posted: | | | | Quoting Kulju: Quote: Quoting Addicted2DVD:
Quote: I was wondering if I am just missing it... but is there is a way to filter on what you have locked? Not that I know of.
Quote: Now say something is added to the program in the Special Features section in the next update. So now I want to update these profiles... knowing I wouldn't get the updates from online since they are locked. You do get updates even the fields are locked. Just unlock in preview window if you see an update for a field you have locked.
Quote: If I could filter on all profiles I have the Special Features locked it would make it easy for me to update the ones I need to without just trying to remember what all profiles I have Special Features locked on. Now I don't follow... You mean you want to edit those fields yourself or get an update from online db? Thanks... I wasn't I knew I could tell it to accept updates anyway... but then it would put back what I may have deleted. So I basically only wanted to know if there is a way for DVD Profiler to tell me which profiles has the Special Features (or any lock really) locked. This way if we did get something new in the Special Features section I could just load the profiles I have the special features locked on and fix them myself the way they should be for what I own. | | | Pete |
|
Registered: March 13, 2007 | Reputation: | Posts: 17,334 |
| Posted: | | | | Quoting DJ Doena: Quote: Not natively, no. And I don't think CSV Export exports the locks.
But this gave me the opportunity to toy with Linq and Lamda Expressions a bit more:
Quote:
Only interesting for programmers:
Spoiler: (Select to view)
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Xml.Linq;
namespace DoenaSoft.FindSpecialFeatureLocks { public static class Program { public static void Main(String[] args) { try { if (args == null || args.Length == 0 || File.Exists(args[0]) == false) { Console.WriteLine("Invalid call. Please provide proper file name."); } XDocument doc = XDocument.Load(args[0]); IEnumerable<XElement> allDvds = doc.Element("Collection").Elements("DVD"); IEnumerable<XElement> filteredDvds = allDvds.Where(dvd => dvd.Element("Locks").Element("Features").Value == "true"); var dvdInfos = filteredDvds.Select(dvd => new { Name = dvd.Element("Title").Value, UPC = dvd.Element("UPC").Value, } ); foreach (var dvdInfo in dvdInfos) { Console.WriteLine(dvdInfo.Name); Console.WriteLine(dvdInfo.UPC); Console.WriteLine(); } } catch (Exception ex) { Console.WriteLine(ex.Message); } finally { Console.WriteLine("Press <Enter> to exit"); Console.ReadLine(); } } } }
This is a one-purpose tool. It'll give you exactly what you want: All your DVDs with a lock on Special Features. Nothing more, nothing less.
You need to call it with a parameter where your exported collection.xml is stored, e.g.
Quote:
FindSpecialFeatureLocks.exe D:\collection.xml
http://doena-soft.de/dvdprofiler/3.8.1/FindSpecialFeatureLocks.zip Thanks Karsten... I will be checking it out! | | | Pete |
|
Registered: March 13, 2007 | Reputation: | Posts: 17,334 |
| Posted: | | | | You know what would really be good... a separate lock for Other Features. | | | Pete |
|
Registered: March 14, 2007 | Reputation: | Posts: 6,744 |
| Posted: | | | | Quoting Addicted2DVD: Quote: You know what would really be good... a separate lock for Other Features. Erm, there is no lock for other features | | | Karsten DVD Collectors Online
|
|
Registered: March 13, 2007 | Reputation: | Posts: 17,334 |
| Posted: | | | | That is what I am saying... it would be cool if there was a separate lock for Other Features... instead of having the Features lock all of it. | | | Pete |
|
Registered: March 14, 2007 | Reputation: | Posts: 6,744 |
| Posted: | | | | Quoting Addicted2DVD: Quote: That is what I am saying... it would be cool if there was a separate lock for Other Features... instead of having the Features lock all of it. Ah OK. I though you were asking for a variant of the program that could filter for "other" locks. | | | Karsten DVD Collectors Online
|
|
Registered: March 13, 2007 | Reputation: | Posts: 17,334 |
| Posted: | | | | Nope... just thinking out loud. Just not sure it would be worth a feature request. | | | Pete |
|
Registered: March 14, 2007 | Reputation: | Posts: 6,744 |
| Posted: | | | | But while we're at it. Here's an extended version of the previous program. Now you can specify the lock and it will also export a flag set to the location of the collection.xml Quote:
FindLocks.exe D:\collection.xml Features
will result in D:\FlagSetList_Features.lst to be imported via Collection -> Flags -> Load Flag Set http://doena-soft.de/dvdprofiler/3.8.1/FindLocks.zipAnd here's the code for those interested: Quote:
Spoiler: (Select to view)
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Xml.Linq;
namespace DoenaSoft.FindLocks { public static class Program { public static void Main(String[] args) { try { if (args == null || args.Length == 0 || File.Exists(args[0]) == false) { Console.WriteLine("Invalid call. Please provide proper file name."); return; } else if (args.Length < 2) { Console.WriteLine("Invalid call. Please provide Lock type."); return; } else if (CheckLockType(args[1]) == false) { Console.WriteLine("Invalid call. Please provide proper Lock type."); return; } XDocument doc = XDocument.Load(args[0]); IEnumerable<XElement> allDvds = doc.Element("Collection").Elements("DVD"); IEnumerable<XElement> filteredDvds = allDvds.Where(dvd => dvd.Element("Locks").Element(args[1]).Value == "true"); var dvdInfos = filteredDvds.Select(dvd => new { Name = dvd.Element("Title").Value, UPC = dvd.Element("UPC").Value, ID = dvd.Element("ID").Value, } ); using (StreamWriter sw = new StreamWriter((new FileInfo(args[0])).DirectoryName + @"\FlagSetList_" + args[1] + ".lst" , false, Encoding.GetEncoding("Windows-1252"))) { foreach (var dvdInfo in dvdInfos) { Console.WriteLine(dvdInfo.Name); Console.WriteLine(dvdInfo.UPC); Console.WriteLine(); sw.WriteLine(dvdInfo.ID); } } } catch (Exception ex) { Console.WriteLine(ex.Message); } finally { Console.WriteLine("Press <Enter> to exit"); Console.ReadLine(); } }
private static Boolean CheckLockType(String lockType) { switch (lockType) { case ("Entire"): case ("Covers"): case ("Title"): case ("MediaType"): case ("Overview"): case ("Regions"): case ("Genres"): case ("SRP"): case ("Studios"): case ("DiscInformation"): case ("Cast"): case ("Crew"): case ("Features"): case ("AudioTracks"): case ("Subtitles"): case ("EasterEggs"): case ("RunningTime"): case ("ReleaseDate"): case ("ProductionYear"): case ("CaseType"): case ("VideoFormats"): case ("Rating"): { return (true); } default: { return (false); } } } } }
| | | Karsten DVD Collectors Online
|
|
Registered: March 13, 2007 | Reputation: | Posts: 17,334 |
| Posted: | | | | Very cool! Thank You! | | | Pete |
|
Registered: March 14, 2007 | Reputation: | Posts: 6,744 |
| Posted: | | | | Now I'll go to bed. It's 1:16 a.m. already and "tomorrow" is a workday. Luckily the day after that is May 1st (national holiday in Germany). | | | Karsten DVD Collectors Online
| | | Last edited: by DJ Doena |
|
Registered: March 14, 2007 | Posts: 2,337 |
| Posted: | | | | Quoting Addicted2DVD: Quote: Thanks... I wasn't I knew I could tell it to accept updates anyway... Since 3.8.x there has been two checkboxes in preview windows. I don't have DVDP at hand, but if IIRC they are called "Accept" and "Locked". Accept [checked] +Locked [unchecked] = Your data will be overwritten by the update, no locks set. Accept [checked] +Locked [checked] = Your data will be overwritten by the update this once, but locks will stay on for the future Accept [unchecked] +Locked [checked] = Your data won't be overwritten by the update, lock is set. Accept [unchecked] +Locked [unchecked] = Your data won't be overwritten by the update, lock not is set. Locks won't prevent you seeing new updates. They just set if your local data will be overwritten by the update or not. You can always deside in preview windows. This is how it has always been. Locks don't prevent local editing. Quote: but then it would put back what I may have deleted. ??? Quote: So I basically only wanted to know if there is a way for DVD Profiler to tell me which profiles has the Special Features (or any lock really) locked. This way if we did get something new in the Special Features section I could just load the profiles I have the special features locked on and fix them myself the way they should be for what I own. I get what you're asking, but I don't get why. Just to make sure I get this right... For example: - At the moment you have "Booklet" entries in some profiles Other Features field. - Next release of DVDP may contain check box for booklet and you wan't to move that info from Other Features field to new check box. Am I even close?? If yes, why don't you just filter those profiles which has booklet in their Other features and fix them. The point I don't get is why to take locks in this equation? |
|
Registered: May 19, 2007 | Reputation: | Posts: 6,730 |
| Posted: | | | | Quoting Kulju: Quote: Locks won't prevent you seeing new updates. But flagging "Hide Updates for locked profiles" in "Tools -> Options -> Defaults" will. | | | It all seems so stupid, it makes me want to give up! But why should I give up, when it all seems so stupid?
Registrant since 05/22/2003 |
|
Registered: March 13, 2007 | Reputation: | Posts: 2,293 |
| Posted: | | | | Quoting Lewis_Prothero: Quote: Quoting Kulju:
Quote: Locks won't prevent you seeing new updates.
But flagging "Hide Updates for locked profiles" in "Tools -> Options -> Defaults" will. Ooh, handy... another little trick I didn't know that will be very useful for me as there are quite a few multi-season boxsets that I consider parents (and remove unnecessary data) where others don't as the child seasons don't have UPCs and now that 'everyone' uses the disc level profiles you can't enter a season by Disc 1 of the set any more. | | | It is dangerous to be right in matters where established men are wrong | | | Last edited: by Voltaire53 |
|