Author |
Message |
Registered: March 17, 2007 | Posts: 853 |
| Posted: | | | | During the last build I made the request that a disc count be added so me could see how many physical discs we owned. I went hunting for the request which spurred a lengthy conversation, but alas I cannot locate it. So I am going to make the request over again. I would like to have a disc counter so I can see how many physical discs are in my collection. |
|
Registered: May 9, 2007 | Posts: 1,536 |
| Posted: | | | | In the meantime, there is a plugin (Database Query) that gives you this information. | | | Hans |
|
Registered: March 17, 2007 | Posts: 853 |
| Posted: | | | | Quoting Staid S Barr: Quote: In the meantime, there is a plugin (Database Query) that gives you this information. How accurate is it? |
|
Registered: May 9, 2007 | Posts: 1,536 |
| Posted: | | | | The accuracy depends on the data provided, obviously.
For one thing, I think you need to have Disc IDs assigned to every disc. But other than that, you'll just have to try and judge whether it fits your purpose.
There was a discussion on how to do the counting properly in the Plugin Forum, but I can't find the place in the rather long topic. | | | Hans |
|
Registered: March 17, 2007 | Posts: 853 |
| Posted: | | | | The person who wrote the app did a great job. Unfortunately, it doesn't do what I want for the disc count it is very inaccurate. It depends on the Disc ID by the looks of it and anything without one doesn't show up. I am missing entire box sets. Oh well. I just wanted to thank the person who made it, but I still want a disc counter built into the program. |
|
Registered: March 28, 2007 | Reputation: | Posts: 1,299 |
| Posted: | | | | Quoting Lord Of The Sith: Quote: Unfortunately, it doesn't do what I want for the disc count it is very inaccurate. It depends on the Disc ID by the looks of it and anything without one doesn't show up. I am missing entire box sets.... I still want a disc counter built into the program. Wouldn't a built-in disc counter also be inaccurate? Without a new field for the number of discs I can't think of a way to do a disc counting system that doesn't use disc ids... KM | | | Tags, tags, bo bags, banana fana fo fags, mi my mo mags, TAGS! Dolly's not alone. You can also clone profiles. You've got questions? You've got answers? Take the DVD Profiler Wiki for a spin. |
|
Registered: March 15, 2007 | Reputation: | Posts: 5,459 |
| Posted: | | | | Quoting Astrakan: Quote: Quoting Lord Of The Sith:
Quote: Unfortunately, it doesn't do what I want for the disc count it is very inaccurate. It depends on the Disc ID by the looks of it and anything without one doesn't show up. I am missing entire box sets.... I still want a disc counter built into the program. Wouldn't a built-in disc counter also be inaccurate? Without a new field for the number of discs I can't think of a way to do a disc counting system that doesn't use disc ids...
KM You can have a disc entry without an ID attached, we simply need the program to count those and not IDs or profiles. Of course, if a profile hasn't had any discs added to it, it will still be inaccurate - but that will be the data entry at fault. | | | Last edited: by northbloke |
|
Registered: March 17, 2007 | Posts: 853 |
| Posted: | | | | Quoting Astrakan: Quote: Quoting Lord Of The Sith:
Quote: Unfortunately, it doesn't do what I want for the disc count it is very inaccurate. It depends on the Disc ID by the looks of it and anything without one doesn't show up. I am missing entire box sets.... I still want a disc counter built into the program. Wouldn't a built-in disc counter also be inaccurate? Without a new field for the number of discs I can't think of a way to do a disc counting system that doesn't use disc ids...
KM There would be a field when the DVD was entered # of Discs. Just like there is a year filed and production field and so on and so on. We would need to populate the fields as we added the DVD profiles. |
|
Registered: March 18, 2007 | Reputation: | Posts: 6,463 |
| Posted: | | | | Couldn't a simple script do this? Count all the <disc> entries in collection.xml? Excel would even do that, right? (WRONG. Tried it just now. A pain toi do it thyis way.)
If Mithi doesn't beat me to it, I'll cook up a little script of some form when I get home from "work" this morning. (I teach part-time). XSLT could work I think.
I will also maybe add a mouseover to the BulkEdit "Discs" column. But loading a plugin seems overkill for this if you don't use it for other things. Hmmm, on the other hand, BulkEdit creates one and only record per disc. If there are no discs, you still get one record, but the disc count colunmn = 0.
(and of course DVDProfileLoop tied to a simple counter script would also do it, and you could click it any time.) | | | Thanks for your support. Free Plugins available here. Advanced plugins available here. Hey, new product!!! BDPFrog. | | | Last edited: by mediadogg |
|
Registered: March 14, 2007 | Reputation: | Posts: 6,744 |
| Posted: | | | | The XSLT would look like: Quote: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt"> <xsl:template match="Collection"> <html> <body> <xsl:variable name="total" select="count(./DVD/Discs/Disc)" /> <xsl:value-of select="$total" /> </body> </html> </xsl:template> </xsl:stylesheet> But I don't know how to combine it with the collection.xml without touching it. Save this as collection.xsl beside your collection.xml and then add this line Quote: <?xml-stylesheet href="collection.xsl" type="text/xsl"?> between Quote: <?xml version="1.0" encoding="windows-1252"?> and Quote: <Collection> in your collection.xml and open the collection.xml with your browser. It'll take a minute but it will spill out a disc number. | | | Karsten DVD Collectors Online
| | | Last edited: by DJ Doena |
|
Registered: March 18, 2007 | Reputation: | Posts: 6,463 |
| Posted: | | | | Wow, so fast!
Here is another one, for you DOS command-line hacks:
type c:\collection.xml | find "<Disc>" /C
spits out a count that will be correct if your box set parents don't duplicate the discs - some do.
In one case I tried, I just flagged all the parents, then reversed flags before export of collection.xml. That got me the correct count. Of course, in this case, the child profiles must have the discs defined.
By the way, to Astrakan: "number of discs" is already available internally to plugins. | | | Thanks for your support. Free Plugins available here. Advanced plugins available here. Hey, new product!!! BDPFrog. | | | Last edited: by mediadogg |
|
Registered: March 13, 2007 | Reputation: | Posts: 2,217 |
| Posted: | | | | Quoting DJ Doena: Quote: But I don't know how to combine it with the collection.xml without touching it. Simply get a XSL-Processor. e.g. Saxon-Bjava -jar saxon8.jar -novw collection.xml YOUR.xsl will process it. Alternative queries: (lifted of an older posting from me) <xsl:value-of select="count(/Collection/DVD[CollectionType='Owned']/ID)"/>Counts <DVD> that have at least one DiscID, so Movie-Boxsets should be left out, TV-Boxsets should be counted. <xsl:value-of select="count(/Collection/DVD[CollectionType='Owned']/Discs/Disc/DiscIDSideA)"/>And for a little fun: this one counts the DiscIDs itself, thus giving you the number of silvery round objects that you own. cya, Mithi PS And now I go beating mediadogg ... | | | Mithi's little XSLT tinkering - the power of XML --- DVD-Profiler Mini-Wiki |
|
Registered: March 18, 2007 | Reputation: | Posts: 6,463 |
| Posted: | | | | Quoting Mithi: Quote: PS And now I go beating mediadogg ... Ha ha! And you are sooooo enjoying it, right? | | | Thanks for your support. Free Plugins available here. Advanced plugins available here. Hey, new product!!! BDPFrog. |
|